- Python 100%
In most cases this being more assecurative for things where were we might have run into errors (theoretically or not), but in one case this was an actual mistake of calling the function again instead of taking its error. |
||
|---|---|---|
| .gitignore | ||
| .python-version | ||
| main.py | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
From pool to a publication page
This repository contains a helper script for extracting publication information from the TRR379 Knowledge Pooling Tool, enriching it with information obtained via doi.org content negotiation if a DOI is present, and producing a markdown file (with required front matter) which can be added to the TRR website.
We recommend using uv run. For example, this command will create a publication page and save it in the given directory:
uv run main.py --pid https://doi.org/10.1038/s41398-025-03374-8 --outdir /tmp/publications
- If the
--pidargument is skipped, all available publication records will be processed. - If the
--outdirargument is skipped, the markdown content will be printed to the standard output instead. - When saving, the file name will be generated automatically using available metadata, PID component, or PID hash.
- To override automatic generation when processing a single record with
--pid,--filenameargument can be used.
To displayy CLI help, use:
uv run main.py --help
We recommend running from the directory containing the script.
Web requests (in particular those to the pool API) will be cached (with a TTL of 2 hours) in .cache.
A copy of the spdx license list will be downloaded and saved in the same directory.
The cache can be safely removed, to force re-retrieval of information.