Fetches publications from HAL
Project description
Lektor-HAL
A plugin for Lektor that uses the HAL API to easily maintain an up-to-date list of publications on a static website.
HAL is an open archive where authors can deposit scholarly documents from all academic fields.
Configuration
Add lektor-hal to the [packages] section of your .lektorproject file.
In ./configs/hal.ini, the query field must be specified, following to the
HAL docs
Example:
query = ((authIdHal_s:my-id-hal) OR (authFullName_s:"My Name"))
Usage
Example
<ul class="publications" id="publications">
{% for publi in hal_publications %}
<li>
<a href={{ publi.link }}>{{ publi.title }}</a>
@
{{ publi.where }} -
{{ publi.authors|join(', ') }}
({{ publi.date }})
</li>
{% endfor %}
</ul>
Two global variables are available in your jinja template, hal_publications and
hal_request.
hal_publications
A list of Publications, a dataclass with the following attributes:
raw: A dict containing everything about this publication returned by the HAL API.title: The title of the publicationhal_id: The HAL ID of the publicationauthors: A list of strings (author names)date: A string (producedDate_s)type: The publication type, eg "ART", "COMM", "POSTER", etc/
and properties:
link: URL pointing to the HAL resourcewhere: returns where the article was published (journalTitle_sorconferenceTitle_sif missing)
hal_request
URL used for the HAL API request.
Known caveat
Lektor will not 'know' that the page must be rebuilt when new entries are returned by the HAL API request. As a workaround, the plugin allows to mark any page as "dirty", so it is rebuilt everytime. Add this to the template that uses the publications list:
{{ volatile() }}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lektor-hal-0.1.2.tar.gz.
File metadata
- Download URL: lektor-hal-0.1.2.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43d8cad235d2074235207ecfec5120f08706c26aeb50f41be17d91febf8391c4
|
|
| MD5 |
078a23f2392bd73313e5b2bf8ea72137
|
|
| BLAKE2b-256 |
b45e9388b27a564bda58fc47ea4b54ff70e82ca6b8bd32c775f90ec51df5eaeb
|
File details
Details for the file lektor_hal-0.1.2-py3-none-any.whl.
File metadata
- Download URL: lektor_hal-0.1.2-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95d110ff171b83941fd4f804c78e1cdb067bb6bf7e88a5763e50e9fc02697a28
|
|
| MD5 |
1cf243c445cbb18f3f3b09381c628c22
|
|
| BLAKE2b-256 |
e70f7b3b305440f907772448df9abfb3e79fc519b024430d9ec02964ebfde756
|