pyiso4
An attempt to implement the ISO 4 standard for journal titles abbreviations in Python, as described in Section 7.1 of the ISSN Manual. Inspired by abbrevIso by @marcinwrochna.
Install and use
pip install --upgrade git+https://github.com/pierre-24/pyiso4.git
Usage:
$ iso4abbreviate "Journal of the American Chemical Society"
J. Am. Chem. Soc.
You can abbreviate multiple titles at the same time:
$ iso4abbreviate "Journal of Chemical Physics" "Journal of Physical Chemistry A"
J. Chem. Phys.
J. Phys. Chem. A
By default, the program abbreviate using this list of abbreviation (slightly modified version of LTWA 2017)
and this list of stopwords.
You can change that using --ltwa and --stopwords to provide your own files (with the same syntax).
As for rule 7.1.11, namely that abbreviations of generic words such as part, etc. are omitted unless they are required,
the program removes them by default.
To change this behavior, use --keep-part.
Known issues
A list of failed tests is found here. It currently fails
- to fulfil rule 7.1.7 of the manual: keep prepositions in expressions (like
in vivo) and place/personal name intact, - to fulfil rules 7.1.2, 7.1.3 and 7.1.8 of the same manual (but this is of lesser importance),
- on compound words (such as
microengineering), except if explicitly found in the LTWA, - on some ligatures (handle the common
œandæ)
Python API
from pyiso4.ltwa import Abbreviate
# create an abbreviator (using the default LTWA)
abbreviator = Abbreviate.create()
# abbreviate something
abbreviation = abbreviator('Journal of the American Chemical Society', remove_part=True)
Contributions
Contributions, either with issues or pull requests are welcomed.
If you can to contribute, this is the usual deal: start by forking, then clone your fork
git clone (...)
cd pyiso4
Then setup... And you are good to go :)
python -m venv venv # a virtualenv is always a good idea
source venv/bin/activate
make install # install what's needed for dev
Don't forget to work on a separate branch, and to run the linting and tests:
make lint # flake8
make test # unit tests
Metadata
Release files for pyiso4 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyiso4-0.1.6.tar.gz | 430.5 kB | Without provenance | Details for pyiso4-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyiso4-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for pyiso4-0.1.6-py3-none-any.whl |
Total release size: 859.6 kB
Release files / pyiso4-0.1.6.tar.gz
| Download URL | pyiso4-0.1.6.tar.gz |
|---|---|
| Size | 430.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
014947983b9302398bd4de0760eb243e54e32ca2bcfff5f1b5eadc25acbbbd03
|
|
BLAKE2b-256 checksum How to use checksums |
c521af4fc6f90fab08bd646915a612515efd6cb14f8225cb34e72c48c4e2fc48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.18
|
Release files / pyiso4-0.1.6-py3-none-any.whl
| Download URL | pyiso4-0.1.6-py3-none-any.whl |
|---|---|
| Size | 429.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2a4331a7ecb88d91da7fb7fba95062029875cce827d1c0d7299702756cca1b99
|
|
BLAKE2b-256 checksum How to use checksums |
6de3e9037eb59eb496b289c0b1cb73c95b88c096d39f42a0d8d833be7097d1c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.18
|
Security for pyiso4 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.