Skip to main content

Import ORCID publications into HugoBlox/Hugo publication bundles with DOI enrichment, PDF fetching, and cover generation.

Project description

HugoBlox ORCID Importer

CI License: MIT Python

Import publications from ORCID into HugoBlox/Hugo content/publications/ bundles, with optional Crossref DOI enrichment, PDF download, and cover image generation.

Features

  • imports ORCID works into Hugo leaf bundles
  • writes index.md and cite.bib
  • enriches DOI-based records from Crossref
  • downloads index.pdf when a reachable PDF is available
  • generates featured.png from the PDF
  • avoids orphan screenshots when no PDF could be fetched
  • skips already imported publications reliably via DOI and ORCID work identifiers
  • includes a monthly GitHub Actions sync workflow for hands-free updates
  • includes optional HugoBlox template overrides for APA-style publication pages

Installation

Requires Python 3.10 or newer.

cd /path/to/hugobloxorcid
python -m pip install -e .[pdf]

If you only need the core importer:

python -m pip install -e .

Usage

Console entry point

hugoblox-orcid-import 0000-0003-1471-5827

Script wrapper

python scripts/orcid_import.py 0000-0003-1471-5827

Common options

# Rebuild all bundles and try to fetch PDFs
hugoblox-orcid-import 0000-0003-1471-5827 --force

# Regenerate one known slug
hugoblox-orcid-import 0000-0003-1471-5827 --only-slug 2025-mediendidaktik-als-implementierungswissenschaft-der --force

# Skip PDF fetching entirely
hugoblox-orcid-import 0000-0003-1471-5827 --no-download-pdf

Output

Each publication bundle may contain:

  • index.md
  • cite.bib
  • index.pdf when available
  • featured.png when generated from the PDF

featured.png is only kept when index.pdf exists.

Optional HugoBlox site overrides

Optional layout overrides are included under:

examples/hugo-site-overrides/

These can be copied into a HugoBlox site if you want the same APA-style citation rendering and publication metadata layout used during development.

Monthly GitHub Actions sync

The repository now includes .github/workflows/monthly-orcid-sync.yml for an automated ORCID refresh on the 1st day of each month and via manual dispatch.

Set these repository variables in GitHub:

  • ORCID_ID required – the ORCID iD to sync
  • PUBLICATIONS_PATH optional – defaults to content/publications
  • ORCID_IMPORT_ARGS optional – extra CLI flags such as --no-download-pdf

The workflow commits changes only when new publication bundles are added, and reruns skip already imported entries by matching DOI and ORCID work ID.

Development

python -m pip install -e .[pdf]
python -m compileall src
python -m unittest discover -s tests -p 'test_*.py'
python scripts/orcid_import.py --help
hugoblox-orcid-import --help

For maintainers, PyPI publishing is automated via .github/workflows/publish.yml using GitHub trusted publishing.

For contributions, see CONTRIBUTING.md.

Repository layout

src/hugobloxorcid/        Python package
scripts/orcid_import.py   Simple wrapper script
examples/                 Optional HugoBlox layout overrides
.github/workflows/        Basic CI for GitHub

License

MIT

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

hugobloxorcid-0.2.0.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

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

hugobloxorcid-0.2.0-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file hugobloxorcid-0.2.0.tar.gz.

File metadata

  • Download URL: hugobloxorcid-0.2.0.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hugobloxorcid-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5b3b212174b5c8ea73c5f24a179cd8baafcc259508e06d8313fcc3910cf58668
MD5 eb95c1d74bafa69f1517e333304d6026
BLAKE2b-256 5901a1477717eb9306743b9b0a4a21f588759db1aebeb8e1ef03c5afd8e08af2

See more details on using hashes here.

Provenance

The following attestation bundles were made for hugobloxorcid-0.2.0.tar.gz:

Publisher: publish.yml on mkalz/hugobloxorcid

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hugobloxorcid-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: hugobloxorcid-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hugobloxorcid-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f13d105d1a6f0b6a2b5fa1efed715bdac27a6314a8256c1634678d45e419a7e4
MD5 efa7ddbbff9247f61477da123ba6cce0
BLAKE2b-256 427d295d2d0aa08534c26b4a978d01c6c81fcf2f6806555369d42ac09211ab94

See more details on using hashes here.

Provenance

The following attestation bundles were made for hugobloxorcid-0.2.0-py3-none-any.whl:

Publisher: publish.yml on mkalz/hugobloxorcid

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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