Additional examples of how to use @jjake's A python interface to archive.org
Last active
October 16, 2015 19:28
-
-
Save apperceive/ec72cad77b7803ff438a to your computer and use it in GitHub Desktop.
Internet Archive python command line interface examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# assign CC license to item metadata, in this case CC Atribution | |
ia metadata <indentifier> --modify="licenseurl:http://creativecommons.org/licenses/by/4.0/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add notes and other useful fields to archive item metadata | |
# this will show, along with title, license, description and other meta on detail page | |
# it appears that notes and description will accespt links, but not javascript | |
# links to gallery.html assume it is one of item's files | |
ia metadata <identifier> --modify="notes:What can we put here? <a href='http://apperceptions.org' class='btn btn-primary'>a link?</a>" | |
ia metadata <identifier> --modify="description:<a class='btn btn-primary btn-lg' href='http://www.archive.org/download/apperceptions_<identifier>/gallery.html'>Click here to view gallery</a>" | |
ia metadata <identifier> --modify="creator:apperceptions" | |
# can use any part of date format Y-m-d h:m:s | |
ia metadata <identifier> --modify="date: 2015-10-16" | |
ia metadata <identifier> --modify="title:Cat Photos" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# can't modify (at least not after initial archive item creation) - read only | |
ia metadata <identifier> --modify="uploader:apperceptions" | |
ia metadata <identifier> --modify="updater:apperceptions" | |
ia metadata <identifier> --modify="adder:apperceptions" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set multiple subject tags for Internet Archive items using python command line interface | |
ia metadata <identifier> --modify="subject:<tag1>" --modify="subject:<tag2>" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# always include the mediatype or it will default to 'data' | |
# | |
# media types are: image, movies, audio, texts, article, collection, data, education. etree, other, web, software | |
# | |
# | |
ia upload <identifier> "<identifier>_<CamalCaseName_images.zip" --metadata="mediatype:texts" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment