Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a script to download photos #5

Closed
hyanwong opened this issue Sep 28, 2017 · 4 comments
Closed

Provide a script to download photos #5

hyanwong opened this issue Sep 28, 2017 · 4 comments

Comments

@hyanwong
Copy link
Member

hyanwong commented Sep 28, 2017

For museums etc we need a way to populate the pics dir so that the OneZoom instance is completely stand-alone, and will work without an internet connection (NB: this will still not allow the display of external pages such as wikipedia, though).

We cannot do this over ssh/rsync. Instead, we probably want a python script that looks up the image IDs from the database table and downloads them over http if they are missing from the pics directory (or if their updated time in the eol_updated table is more recent than the created time on an existing picture)

@hyanwong
Copy link
Member Author

hyanwong commented Oct 12, 2017

For information only, at the moment, we are doing

rsync -av -e 'ssh -p 7777' web2py@dev.onezoom.org:OneZoomComplete/applications/OneZoom/static/FinalOutputs/pics/ static/FinalOutputs/pics

From within the OZtree dir, but that only works if you have ssh access to the server

hyanwong added a commit that referenced this issue Oct 13, 2017
@hyanwong
Copy link
Member Author

With 5b723f4 we should now be maintaining the modification timestamps on image thumbnails. That means we should be able to use If-Modified-Since requests over http to get only updated images

@hyanwong
Copy link
Member Author

NB: with the new arrangement of images, we need a different rsync command. Something like:

rsync -av -e 'ssh -p 7777' web2py@dev.onezoom.org:OneZoomComplete/applications/OZtree/static/FinalOutputs/img/ static/FinalOutputs/img

Which still, of course, needs the ssh password

@hyanwong
Copy link
Member Author

Given that we can now package a docker image with the thumbnails included, I think we can close this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants