Skip to main content

No project description provided

Project description

Glutinator is a modest static Web site generator specializing in scholarly journal articles.

Glutinator was developed by the LOCKSS Program and is available under a 3-Clause BSD License.

Glutinator is the Latin word for “bookbinder”. Although it can be made to rhyme with “Terminator”, it actually sounds like “glue” + “Tina” + “tore”.

Overview

Glutinator’s main command, generate-static-site (or gss), takes as input an inventory file as input and produces a static site.

  • The --inventory option is mandatory. The value is the inventory file.

  • The --base-url option is mandatory. The value is the base URL of the live static website, for <meta> tags that require an absolute URL value.

  • By default, the Glutinator configuration file is glutinator.yaml (in the current directory), but this can be overridden with the --configuration option.

  • By default, the output directory is static-site (in the current directory), but this can be overridden with the --output-directory option.

Inventory File

The inventory file is JSON data that conforms to the JSON Schema file src/lockss/glutinator/resources/jsonschema/root.json. Hierarchically:

  • The root object consists of metadata which is always null and publishers which is a list of Publisher objects.

  • A Publisher object consists of metadata which is a PublisherMetadata object and journals which is a list of Journal objects.

  • A Journal object consists of metadata which is a JournalMetadata object and journal_volumes which is a list of JournalVolume objects.

  • A JournalVolume object consists of metadata which is a JournalVolumeMetadata object and journal_issues which is a list of JournalIssue objects.

  • A JournalIssue object consists of metadata which is a JournalIssueMetadata object and journal_articles which is a list of JournalArticle objects.

  • A JournalArticle object consists of metadata which is a ModelItem object, and an optional license_type from the enum LicenseType.

  • Publisher and Journal further have an optional logo field which can be a file:: reference to an image.

All the above objects are in the lockss.glutinator.item module and their definitions are easier to read in code than in JSON Schema. The JSON Schema is generated from Pydantic by the dev/generate_jsonschema_item.py script. The exception is the ModelItem class which is in lockss.glutinator.csl_data, generated from the CSL-JSON standard by the dev/generate-python-csl-json script, which requires installing the dev dependency group of Glutinator. In the future, there will likely be a similar object native to Glutinator, not derived from CSL-JSON.

Static Site

Structure

The static site mirrors the hierarchical structure of the inventory file:

  • index.html is a gallery of publishers.

  • <p.metadata.id>/index.html is a gallery of journals in the publisher p. The menu and breadcrumbs use the label p.metadata.name. For each journal j, the gallery uses the label j.metadata.name.

  • <p.metadata.id>/<j.metadata.id>/index.html is a gallery of journal volumes in the journal j from publisher p. The menu and breadcrumbs use the label j.metadata.name. For each journal volume v, the gallery uses the label v.metadata.name.

  • <p.metadata.id>/<j.metadata.id>/<v.metadata.id>/index.html is a gallery of journal issues in journal volume v from journal j from publisher p. The menu and breadcrumbs use the label v.metadata.short_name. For each journal issue i, the gallery uses the label i.metadata.name.

  • <p.metadata.id>/<j.metadata.id>/<v.metadata.id>/<i.metadata.id>/index.html is a table of contents of journal articles in journal issue i from journal volume v from journal j from publisher p. The menu and breadcrumbs use the label i.metadata.short_name. For each journal article a, the gallery uses the label a.metadata.title.

  • <p.metadata.id>/<j.metadata.id>/<v.metadata.id>/<i.metadata.id>/<a.metadata.id>/index.html is a landing page for journal article a in journal issue i from journal volume v from journal j from publisher p. The menu and breadcrumbs use the label a.metadata.title_short.

    • The main body displays the article title (a.metadata.title), list of authors (a.metadata.author), and DOI (a.metadata.DOI). For each author at index i, if a.metadata.custom.author_email[i] is defined, a mailto: link is generated, and if a.metadata.custom.author_affiliation[i] is defined, the corresponding author affiliation is appended. Finally, the body ends with a CC BY 4.0 or CC BY-NC-ND 4.0 license blurb if applicable from a.license_type.

    • The menu sidebar displays the article title, compact list of author names, DOI, and published online date.

    • If a.metadata.custom.article_pdf is a file:: reference, the corresponding file is linked to as <p.metadata.id>/<j.metadata.id>/<v.metadata.id>/<i.metadata.id>/<a.metadata.id>/article_pdf/<a.metadata.id>.pdf.

    • Likewise, if a.metadata.custom.metadata_jats is a file:: reference, the corresponding file is linked to as <p.metadata.id>/<j.metadata.id>/<v.metadata.id>/<i.metadata.id>/<a.metadata.id>/metadata_jats/<a.metadata.id>.xml.

Skin

Glutinator currently comes with a single skin called Editorial (by HTML5 UP, used under a Creative Commons license). The Jinja template files are in src/lockss/glutinator/resources/editorial. In the future there may be more than one skin, and skins may be grouped into a common subdirectory of src/lockss/glutinator/resources.

Other Commands

Glutinator also has an unpack-sources (or us) command, which unpacks LOCKSS v1 AU gzipped tarballs from --input-directory (by default sources) to --output-directory (by default sources-unpacked). Given an AU nickname n, the tarballs are either plain (<n>.tgz), or split and sequentially numbered (<n>.tgz.0, <n>.tgz.1, etc. or <n>.tgz.00, <n>.tgz.01, etc. or <n>.tgz.000, <n>.tgz.001, etc.). The nicknames are found in the Glutinator configuration file as a list under the source-aus key.

Glutinator also has boilerplate commands: copyright, license, usage and version.

Each command (and the glutinator command itself) comes with a --help option that displays a help message focusing on the corresponding command.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lockss_glutinator-0.1.0.dev7.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lockss_glutinator-0.1.0.dev7-py3-none-any.whl (1.5 MB view details)

Uploaded Python 3

File details

Details for the file lockss_glutinator-0.1.0.dev7.tar.gz.

File metadata

  • Download URL: lockss_glutinator-0.1.0.dev7.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Linux/6.12.9-arch1-1

File hashes

Hashes for lockss_glutinator-0.1.0.dev7.tar.gz
Algorithm Hash digest
SHA256 80db1cccd08f0fd399a891c0189344b8a57098419217fe9cf885495866366fc3
MD5 f26e9352b7a4d6e7b601cfaa50144a6f
BLAKE2b-256 f364d0662c85daf078f913b6475c5abea0f2505072ae4d31b59de9d6a03832b2

See more details on using hashes here.

File details

Details for the file lockss_glutinator-0.1.0.dev7-py3-none-any.whl.

File metadata

File hashes

Hashes for lockss_glutinator-0.1.0.dev7-py3-none-any.whl
Algorithm Hash digest
SHA256 3d12cfb2532f74d0c52c1c9acfbf0713ce83973198b2e8d91e8caaf8a27b0ae6
MD5 6d28e3ff092d55ea46b445f12bd46569
BLAKE2b-256 418d028ae0f0e8eab48d4948cbb2e71b8cf80bb712d89f0756d8937d1d20e2e1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page