Skip to content

Instantly share code, notes, and snippets.

@portableant
Created August 5, 2019 11:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save portableant/3b32bf74b1b06f061ccc7911deb35fa2 to your computer and use it in GitHub Desktop.
Save portableant/3b32bf74b1b06f061ccc7911deb35fa2 to your computer and use it in GitHub Desktop.
ADAPL for sketchfab
* Before screen ADAPL for web links
integer occ, linkocc, urlok
text testurl[0]
x1 = null
linkocc = 1
urlok = 0
testurl = ''
if zL = 'OPACN' or zL = 'Do NOT Display on OPAC' or zL = 'TEMPR' or zL = 'Temporary record' {
} else {
urlok = 0
testurl = ''
testurl = 'http://data.fitzmuseum.cam.ac.uk/id/object/' + %0
urlok = openurl(testurl, 0)
if urlok = 200 {
linkocc = repcnt(x1) + 1
x1[linkocc] = testurl
x2[linkocc] = 'Collections Explorer'
}
}
occ = 1
while occ <= repcnt(I3) {
if I4[occ] = 'Sketchfab' {
urlok = 0
testurl = ''
testurl = 'https://sketchfab.com/3d-models/' + I3[occ]
urlok = openurl(testurl, 0)
if urlok = 200 {
linkocc = repcnt(x1) + 1
x1[linkocc] = testurl
x2[linkocc] = 'Sketchfab'
}
}
occ = occ + 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment