Skip to content

Instantly share code, notes, and snippets.

@apperceive
Last active October 16, 2015 19:28
Show Gist options
  • Save apperceive/ec72cad77b7803ff438a to your computer and use it in GitHub Desktop.
Save apperceive/ec72cad77b7803ff438a to your computer and use it in GitHub Desktop.
Internet Archive python command line interface examples
# assign CC license to item metadata, in this case CC Atribution
ia metadata <indentifier> --modify="licenseurl:http://creativecommons.org/licenses/by/4.0/"
# 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"
# 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"
# Set multiple subject tags for Internet Archive items using python command line interface
ia metadata <identifier> --modify="subject:<tag1>" --modify="subject:<tag2>"
# 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