egaia make

Create indexes and html pages for items in a collection. This utility reads and formats the data contained in item metadata files, and copies distribution copies of the items to the directory set as pub_path in the configuration file.

Usage

egaia make --help
egaia make [ --force | --delete ] [ --nolinks ] [ TARGET... ]

Options

--help
Display this help text and exit.
--force
Force overwriting of existing files in the output directory. Currently only applies to the copying of derivatives during item page generation.
--delete
Delete the specified elements for the item(s), instead of creating them, when used in combination with the targets json, collection-page, database, collection-preview, or item-pages. Run the command egaia make indexes to rebuild html indexes with the specified collection and its items omitted. This command does not remove derivatives, thumbnails, or empty item/collection directories.
--nolinks
Do not produce links to the parent collection or indexes in an item page. This option allows for the publication of unlisted items, which would otherwise link to missing collection pages or to indexes that do not actually contain a link to the item in question.

Targets

all
Process all targets, with the exception of home-page and static.
json
Convert item metadata to json format, for further processing by egaia or for import into other applications. The json output is required for generation of item indexes, previews, and html pages.
collection-page
Generate an html description page for the current collection.
database
Update subject, creator, coverage, type, and language databases with metadata from each item in the current collection. These databases are used for creating the html indexes (see below).
item-previews
Generate an html preview describing each item in the current collection, for inclusion in the various catalogue indexes and in the collection description page. Previews are stored in a hidden directory at the top of the pub_path directory. Note that the previews will be created by the index generator if they do not already exist, but they will not be updated automatically if the collection metadata changes.
collection-preview
Generate an html preview describing the current collection, for inclusion in the collections index.
item-pages
Generate an html description page for each item in the current collection. New or modified distribution-format files will be copied into the pub_path directory using hardlinks if possible (available on Unix-based systems, if the source and target directories are on the same disk), or otherwise as copies. Source docx and svg files will also be copied into the public directory, to allow downstream collaborators to modify these and return to the archive curator.
indexes
Regenerate the collection and item html indexes for the entire archive. This is necessary if items have been added or if any linked metadata fields have changed.
home-page
Generate a home page for the archive, using the input file specified in the archive configuration settings.
static
Copy the static directory and generate error pages using the html template for the site. This is mainly useful for development purposes, where the template and styles have been modified.

Items and collections

This tool stores the identity of processed pages inside the configured pub_path directory, so it is possible to update an html catalogue incrementally using collections that are stored in different places. If this is not what you want to do – for instance, if you simply want to export one collection on its own – you should update the configuration settings by modifying the “local” configuration file. The easiest way to modify this setting is with the following command:

$ egaia config --set pub_path:/path/to/the/directory

Templates

The html generated by egaia includes css classes intended to work with the Bootstrap 3 framework; to modify the default css, include a customized version of the Bootstrap theme in the static/ directory.

The string variables used in the default template (e.g., ${Home}, $date, or ${Keywords}) will be replaced by localized terms and phrases.

Remote embeds

If you have set remote_embeds = True in the configuration, this utility will output an iframe for each remote embed url field given in the metadata, rather than embedding local files. This option is the default because, with regard to video serving, it is much simpler to link to a hosting service (Internet Archive, YouTube, Vimeo, etc.) than it is to provide access to a video in multiple formats and resolutions on a self-hosted site. The remote embed field is not reserved for videos, however; any content that can be served in an iframe will generally work. For example, books hosted at the Internet Archive can be successfully embedded using the URL extracted from the “share” code, which might look like this:

http://www.archive.org/embed/BOOK_ID

Note that the remote_embed_url must be the URL for embedding, not the URL for the description page. Rember to provide the bare URL (http://...), not the full iframe code. For instance, the appropriate URL for some popular video hosting services will have the following formats:

YouTube
https://www.youtube.com/embed/VIDEO_ID
Vimeo
https://player.vimeo.com/video/VIDEO_ID
Internet Archive
https://archive.org/embed/VIDEO_ID

You can use the egaia archivedotorg tool to upload video files, along with all their associated metadata, to the Internet Archive; this will also automatically populate the remote embed url field in your metadata spreadsheet.