https://github.com/cthoyt/citation-url
Parse URLs for DOIs, PubMed identifiers, PMC identifiers, arXiv identifiers, etc.
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 2 DOI reference(s) in README -
✓Academic publication links
Links to: ncbi.nlm.nih.gov, joss.theoj.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.4%) to scientific vocabulary
Repository
Parse URLs for DOIs, PubMed identifiers, PMC identifiers, arXiv identifiers, etc.
Basic Info
- Host: GitHub
- Owner: cthoyt
- License: mit
- Language: Python
- Default Branch: main
- Size: 88.9 KB
Statistics
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
citation-url
Parse URLs for DOIs, PubMed identifiers, PMC identifiers, arXiv identifiers, etc.
This module has a single parse() function that takes in a URL and gives back
a parse status (success, unknown, or irreconcilable), a prefix, and
an identifier. If the status is unknown or irreconcilable, the prefix will
be left as None and the identifier will match the input:
```python
from citation_url import parse, Status
parse("https://joss.theoj.org/papers/10.21105/joss.01708") (Status.success, 'doi', '10.21105/joss.01708')
parse("http://www.ncbi.nlm.nih.gov/pubmed/34739845") (Status.success, 'pubmed', '34739845')
parse("https://example.com/true-garbage") (Status.unknown, None, 'https://example.com/true-garbage')
parse("https://example.com/true-garbage") (Status.unknown, None, 'https://example.com/true-garbage')
parse("http://msb.embopress.org/content/13/11/954.full.pdf") (Status.irreconcilable, None, 'http://msb.embopress.org/content/13/11/954.full.pdf') ```
🕵️ Why?
I wanted to be able to curate a list of papers in
Zotero, Mendeley, or any
other modern citation manager, make an XML export in the EndNote format, extract
and normalize the messy contents in the electronic-resource-num, text-urls,
and pdf-urls fields, then ensure that there are corresponding entries
on Wikidata using the Su Lab's
Wikidata Integrator.
Reuse this functionality with:
shell
$ python -m citation_url.endnote --help
🚀 Installation
The most recent release can be installed from PyPI with:
bash
$ pip install citation_url
The most recent code and data can be installed directly from GitHub with:
bash
$ pip install git+https://github.com/cthoyt/citation-url.git
👐 Contributing
Contributions, whether filing an issue, making a pull request, or forking, are appreciated. See CONTRIBUTING.md for more information on getting involved.
👋 Attribution
⚖️ License
The code in this package is licensed under the MIT License.
🍪 Cookiecutter
This package was created with @audreyfeldroy's cookiecutter package using @cthoyt's cookiecutter-snekpack template.
🛠️ For Developers
See developer instrutions
The final section of the README is for if you want to get involved by making a code contribution. ### Development Installation To install in development mode, use the following: ```bash $ git clone git+https://github.com/cthoyt/citation-url.git $ cd citation-url $ pip install -e . ``` ### 🥼 Testing After cloning the repository and installing `tox` with `pip install tox`, the unit tests in the `tests/` folder can be run reproducibly with: ```shell $ tox ``` Additionally, these tests are automatically re-run with each commit in a [GitHub Action](https://github.com/cthoyt/citation-url/actions?query=workflow%3ATests). ### 📖 Building the Documentation ```shell $ tox -e docs ``` ### 📦 Making a Release After installing the package in development mode and installing `tox` with `pip install tox`, the commands for making a new release are contained within the `finish` environment in `tox.ini`. Run the following from the shell: ```shell $ tox -e finish ``` This script does the following: 1. Uses [Bump2Version](https://github.com/c4urself/bump2version) to switch the version number in the `setup.cfg` and `src/citation_url/version.py` to not have the `-dev` suffix 2. Packages the code in both a tar archive and a wheel 3. Uploads to PyPI using `twine`. Be sure to have a `.pypirc` file configured to avoid the need for manual input at this step 4. Push to GitHub. You'll need to make a release going with the commit where the version was bumped. 5. Bump the version to the next patch. If you made big changes and want to bump the version by minor, you can use `tox -e bumpversion minor` after.Owner
- Name: Charles Tapley Hoyt
- Login: cthoyt
- Kind: user
- Location: Bonn, Germany
- Company: RWTH Aachen University
- Website: https://cthoyt.com
- Repositories: 489
- Profile: https://github.com/cthoyt
GitHub Events
Total
Last Year
Committers
Last synced: over 3 years ago
All Time
- Total Commits: 49
- Total Committers: 1
- Avg Commits per committer: 49.0
- Development Distribution Score (DDS): 0.0
Top Committers
| Name | Commits | |
|---|---|---|
| Charles Tapley Hoyt | c****t@g****m | 49 |
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 47 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 4
- Total maintainers: 1
pypi.org: citation-url
Parse URLs for DOIs, PubMed identifiers, PMC identifiers, arXiv identifiers, etc.
- Homepage: https://github.com/cthoyt/citation-url
- Documentation: https://citation-url.readthedocs.io/
- License: MIT
-
Latest release: 0.1.1
published over 4 years ago