egaia archivedotorg¶
Publish videos, along with a subset of their Dublin Core metadata, to the Internet Archive and embed the published versions in html pages generated by egaia. This command also allows you to update remote item metadata.
Usage¶
egaia archivedotorg --help
egaia archivedotorg ( --upload | --update ) [ --collection=COLLECTION ]
[ --item=ITEM ] [ --dry-run ]
egaia archivedotorg --update-docx --item=ITEM
Options¶
--help
- Show this help text and exit.
--upload
- Upload files to the Internet Archive. If no item is specified, all video files in the current collection will be uploaded. Note that only the h264 derivative of each video will be uploaded, as the Internet Archive produces its own reduced-scale derivatives.
--update
- Update remote metadata, without re-uploading the videos themselves.
--collection=COLLECTION
- The collection to which you will upload the files. By default this is opensource_movies. Note that you can’t create your own collection on Internet Archive; this must be done on request by Archive staff.
--item=ITEM
- Update only this item. ITEM can be a filename or a bare UUID; if a filename is provided, the UUID will be extracted and the h264 derivative uploaded.
--dry-run
- Do not actually upload anything, but simply print the metadata that will be uploaded.
--update-docx
- Insert an embed URL into the metadata document without actually uploading an item to the Internet Archive. This is primarily useful for situations where an upload was successful but the metadata update failed for some reason.
Since Internet Archive produces new derivatives, this tool avoids confusion by
stripping “df-h264” from the input filename, and providing remote filenames of
the format UUID.mpeg4
. Currently the Internet Archive will derive
reduced-scale videos in mp4 and ogv formats. The embedded video player included
in html output from egaia make
should include an HD/SD toggle, as well as
links to the Internet Archive item description page, where the HD video can
be downloaded.
On successful upload, this tool will populate the item’s “remote embed url” metadata field with the appropriate Internet Archive URL. Any item for which this field has already been set will be ignored by this tool and not re-uploaded.
To overwrite an existing file, you must delete the contents of this field but
also remove the remote file through the Internet Archive web interface or on
the command line, using the default ia
tool that is installed along with
egaia:
$ ia delete UUID
Configuration¶
This tool makes use of the Internet Archive Python library. You will need to create a user account at <http://archive.org/account>.
To automatically create a config file with your archive.org credentials, you
can use the ia
command-line tool, which should be installed automatically
along with egaia
:
$ ia configure
Enter your archive.org credentials below to configure 'ia'.
Email address: user@example.com
Password:
Config saved to: /home/user/.config/ia.ini
Your config file will be saved to $HOME/.config/ia.ini
, or $HOME/.ia
if
you do not have a .config
directory in $HOME
. Alternatively, you can
specify your own path to save the config to via ia --config-file
'~/.ia-custom-config' configure
.
Please see the Internet Archive Python library help pages for details, at <https://internetarchive.readthedocs.io/en/latest/quickstart.html>.