About
How a hub's datasets are cited and described: BibTeX, RIS, APA, text and CSL-JSON, DataCite JSON, JSON-LD, Turtle and RDF/XML from one record with real dates and version relations, the signposting of the landing, cached QR codes with ETags, the canonical identity of a dataset and its concept DOI, the hub's own Cite us as data, and a sitemap of the landings
Provides
Reference
CitationService
/cite-us/cite-us/<key>/<fmt>/datasets/<int:dataset_id>/cite/<fmt>/datasets/<int:dataset_id>/cite/qr.<ext>/datasets/<int:dataset_id>/qr/datasets/<int:dataset_id>/qr//datasets/export-bibtex-content/<int:dataset_id>/datasets/export-bibtex/<int:dataset_id>/doi/<path:doi>/bibtex/doi/<path:doi>/bibtex//doi/<path:doi>/qr/doi/<path:doi>/qr/
dataset.view.headdataset.view.primary_actionsdataset.view.scriptshome.aside
Commands
-
$
splent feature:citation references-load [FILE]Load the hub's references, its 'Cite us', from a TOML file (FILE, or the one CITATION_REFERENCES_FILE names), updating each by its key.
Run them in your workspace once the feature is installed in the selected product.
Configuration
| Setting | Default | What it does |
|---|---|---|
CITATION_QR_LOGO |
empty | An image in the product's static folder for the middle of the QR codes. Empty takes dataset's DATASET_QR_LOGO, and with neither the QR has none. |
CITATION_QR_CACHE_SECONDS |
86400
|
How long a browser may keep a QR code before asking again, in seconds. A DOI's QR never changes, and the ETag makes a second ask a 304. |
CITATION_REFERENCES_FILE |
empty | A TOML file of the hub's own references, its "Cite us", from the product's package (references.py says its shape). Empty seeds none. |
CITATION_HOME_CARD |
true
|
Whether the home page has the "Cite us!" card, when the hub has references. |
CITATION_COSTLY_PER_MINUTE |
60
|
The answers that cost the most one address may have a minute (CT-3): a QR code drawn, and a dataset's Turtle or RDF/XML. Past it, a 429 with Retry-After; what a cache holds is answered whatever the count. 0 for no limit. |
These are the defaults. A product changes them in its own pyproject.toml, under [tool.splent.config], or in .env.deploy in production.
Dependencies
In product lines
-
openhubs_spl
Optional in this line
Needs
datasetauth
Extension points
citation/cite_us.htmlhooks/citation_dataset_button.htmlhooks/citation_dataset_dialog.htmlhooks/citation_dataset_head.htmlhooks/citation_home_card.html
CitationService
Reference
Other features fill its hook slots. A refinement can override its templates and services or extend its models without forking it.
Compatibility
>=3.13
>=1.30.0
rdflib==7.1.4qrcode[pil]==7.4.2