diff options
author | Sebastian Dziallas <sebastian@when.com> | 2009-12-02 16:06:49 (GMT) |
---|---|---|
committer | Sebastian Dziallas <sebastian@when.com> | 2009-12-02 16:06:49 (GMT) |
commit | 43015f95b3c01fe57043b47df65f12825cb868ab (patch) | |
tree | a3b3f4925d0cf2d8e3cd6c7eb87af5596e5534c6 | |
parent | 93623f42992a490fc98e586679c68b9b4a4ae5b1 (diff) |
randomly include a few ebooks (datastore inclusion still missing)
-rwxr-xr-x | copy-to-datastore.py | 7 | ||||
-rw-r--r-- | soas-aslo-and-content.ks | 14 |
2 files changed, 21 insertions, 0 deletions
diff --git a/copy-to-datastore.py b/copy-to-datastore.py index c52292c..04c23c7 100755 --- a/copy-to-datastore.py +++ b/copy-to-datastore.py @@ -67,6 +67,13 @@ def create_entry(filename, meta): create_content_file(metadata_path, 'tags', tags) files = ( + ("All.pdf", + {"title": "Trailblazing by the Royal Society", + "mime_type": "application/pdf", + "description": "Three and a half centuries of Royal Society publishing", + "tags": "Science", "History", + }), + ("pg11589-images.epub", {"title": "Les Voyages Extraordinaires de Jules Verne", "mime_type": "application/epub+zip", diff --git a/soas-aslo-and-content.ks b/soas-aslo-and-content.ks index 133b12c..1a4ce6b 100644 --- a/soas-aslo-and-content.ks +++ b/soas-aslo-and-content.ks @@ -129,6 +129,20 @@ for epub in $EPUB ; do cp -p $bundle $BUNDLES_DIR done +# more CC licensed e-books for us +BOOK="$BOOK http://trailblazing.royalsociety.org/pdf/All.pdf" # Royal Society +BOOK="$BOOK http://www.liberliber.it/biblioteca/c/collodi/pinocchio/epub/collodi_pinocchio.epub" # Pinocchio + +for book in $BOOK ; do + url=$book + remote_file=$(basename $(curl -4 -s -L -w %{url_effective} -I $url | tail -1)) + bundle=$CACHE_DIR/$remote_file + if [ ! -f $bundle ] ; then + curl -s -4 -L $url > $bundle + fi + cp -p $bundle $BUNDLES_DIR +done + # get the script to install the activities cp -p $WD/../install-activity.py . chmod a+x ./install-activity.py |