Skip to main content

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

Project description

HugoBlox ORCID Importer

CI License: MIT Python

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

Features

  • imports ORCID works into Hugo publication bundles
  • imports ORCID funding records into Hugo project bundles
  • writes index.md and cite.bib for publications, plus project index.md bundles for grants
  • enriches DOI-based publication 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 and grants reliably via DOI and ORCID 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

# Import publications and grant/project bundles into custom folders
hugoblox-orcid-import 0000-0003-1471-5827 --output content/publications --projects-output content/project

# Keep publication import only
hugoblox-orcid-import 0000-0003-1471-5827 --no-import-grants

Output

Publication bundles may contain:

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

Project/grant bundles are written to content/project/ (or --projects-output) and include grant metadata such as the funder, grant number, amount, and dates in index.md.

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.3.0.tar.gz (24.9 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.3.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for hugobloxorcid-0.3.0.tar.gz
Algorithm Hash digest
SHA256 fb2cb71aeef2b5653509373cd18de42b857e17691435c50e37850e0d7c9bbba0
MD5 49773c307c63d2a15aa5590dc224bad0
BLAKE2b-256 a450a72c9cd0f0c71a7f9ac131e542790272b71a870bf4808a8662615c76103d

See more details on using hashes here.

Provenance

The following attestation bundles were made for hugobloxorcid-0.3.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.3.0-py3-none-any.whl.

File metadata

  • Download URL: hugobloxorcid-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 14.6 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 05b2808e9253fda8ac0cb3f0757a9f52918876e5baff1e68918bad9696f88af3
MD5 d6fdc32f343c6e7c5d2e867d21b9defa
BLAKE2b-256 44f6ba59dfa79dbb246e1158e3a1b96a87a7dab985abd5994d700765d3e6c295

See more details on using hashes here.

Provenance

The following attestation bundles were made for hugobloxorcid-0.3.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