You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The images thing is interesting, actually. There are a number of organisations which might like to have a OneZoom tree with only their images on it. I imagine this would be quite easy to do, now that we have a docker image. Here’s how I think we could do it:
We require the “image partner” to place their images in a folder, in jpeg format, recommended to be square, and named either by the species name (e.g. Homo_sapiens.jpg) or by the OTT (ott_770315.jpg). We could also allow an image rating to be encoded like this, by prefixing the name with a number, e.g. 45000_Homo_sapiens.jpg. We also state that the IPTC "Copyright Notice”, “Credit Line”, and "Licensor URL" fields can be filled out for use in the OneZoom display.
The image partner downloads the “OneZoom-complete” docker image and runs it, specifying the image folder above as a volume mount
The image partner logs in to the docker image and runs a (new) script that does the following:
3a) Look in the mounted image volume and go through the files and folders. For each jpg file, we snip off any leading number. Then any names that does not start with “ott_” is looked up using the OpenTree TNRS (with context, if necessary) and mapped to OTTs.
3b) We (optionally) delete the existing images in images_by_ott
3c) All images that are have an OTT or have been mapped to OTTs in step 3 are added to the images_by_ott table:
images_by_ott.src is set to src_flags[‘bespoke’] (i.e.1)
images_by_ott.src_id is allocated sequentially.
We must also move the jpg file to a new file of that name within the images hierarchy
images_by_ott.rating is set to the value form the filename (if any, otherwise 25000)
images_by_ott.url is set to the IPTC "Licensor URL” (if any), and we also have a parameter in the script to set the default
images_by_ott.rights is set to the IPTC "Credit Line” (if any), and we also have a parameter in the script to set the default
images_by_ott.license is set to the IPTC "Copyright Notice” (if any), and we also have a parameter in the script to set the default
all images are marked as “verified”. We have a parameter which is normally unset which, if set, flags all images as PD
3d) We rationalise all the image flags in case we didn’t delete the existing images in step 4
This is all coded up and pushed to main (see #469). There is currently a bug in the pathway, though.
hyanwong
changed the title
System for users spinning up their own system to have own images
Debug system for users spinning up their own system to have own images
Mar 10, 2022
Notes from Yan sent by e-mail saved here...
The images thing is interesting, actually. There are a number of organisations which might like to have a OneZoom tree with only their images on it. I imagine this would be quite easy to do, now that we have a docker image. Here’s how I think we could do it:
1a) We also allow images to be in a subfolder as long as that subfolder is named using one of the OpenTree TNRS concepts (https://github.com/OpenTreeOfLife/germinator/wiki/TNRS-API-v3#contexts), e.g. “Land_plants”.
The image partner downloads the “OneZoom-complete” docker image and runs it, specifying the image folder above as a volume mount
The image partner logs in to the docker image and runs a (new) script that does the following:
3a) Look in the mounted image volume and go through the files and folders. For each jpg file, we snip off any leading number. Then any names that does not start with “ott_” is looked up using the OpenTree TNRS (with context, if necessary) and mapped to OTTs.
3b) We (optionally) delete the existing images in images_by_ott
3c) All images that are have an OTT or have been mapped to OTTs in step 3 are added to the images_by_ott table:
We must also move the jpg file to a new file of that name within the images hierarchy
3d) We rationalise all the image flags in case we didn’t delete the existing images in step 4
3e) The script runs picProcess.py
The text was updated successfully, but these errors were encountered: