Skip to main content

RefCatch

A Python package for processing academic references from plaintext files. RefCatch extracts references from text files (markdown, txt, etc.), attempts to find their DOIs using the CrossRef API, and outputs the results.

Installation

pip install refcatch

Or install directly from the repository:

git clone https://github.com/AhsanKhodami/refcatch.git
cd refcatch
pip install -e .

Publishing to PyPI

To publish RefCatch to PyPI:

# Install build and twine
pip install build twine

# Build the package
python -m build

# Upload to PyPI (use --repository-url https://test.pypi.org/legacy/ for TestPyPI)
python -m twine upload dist/*

Usage

As a Python Package

from refcatch import refcatch

# Basic usage
refcatch("path/to/references.md", "path/to/output.md")

# With all options
refcatch(
    input_file="path/to/references.md", 
    output_file="path/to/output.md",
    doi_file="path/to/dois.txt",  # Optional, will be auto-generated if not provided
    log=True  # Set to False to disable logging
)

Command Line Interface

# Basic usage
refcatch references.md

# Specify output file
refcatch references.md -o output.md

# Specify DOI file and run silently
refcatch references.md -o output.md -d dois.txt --silent

Example

Input file (references.md):

1.	Wong WL, Su X, Li X, et al. Global prevalence of age-related macular degeneration and disease burden projection for 2020 and 2040: a systematic review and meta-analysis. Lancet Glob Health. 2014;2(2):e106-116.
2.	Flaxman SR, Bourne RRA, Resnikoff S, et al. Global causes of blindness and distance vision impairment 1990-2020: a systematic review and meta-analysis. Lancet Glob Health. 2017;5(12):e1221-e1234.

Output file:

1.	Wong WL, Su X, Li X, et al. Global prevalence of age-related macular degeneration and disease burden projection for 2020 and 2040: a systematic review and meta-analysis. Lancet Glob Health. 2014;2(2):e106-116.
    DOI: 10.1016/S2214-109X(13)70145-1
2.	Flaxman SR, Bourne RRA, Resnikoff S, et al. Global causes of blindness and distance vision impairment 1990-2020: a systematic review and meta-analysis. Lancet Glob Health. 2017;5(12):e1221-e1234.
    DOI: 10.1016/S2214-109X(17)30393-5

Features

  • Extracts references from plaintext files
  • Makes multiple attempts to find DOIs with different search strategies
  • Outputs references with their DOIs
  • Saves DOIs to a separate file
  • Optional logging of the process
  • Simple command-line interface

License

MIT

Metadata

Release files for refcatch 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for refcatch 0.1.1
File Size Uploaded Provenance Actions
refcatch-0.1.1.tar.gz 7.5 kB Without provenance Details for refcatch-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for refcatch 0.1.1
File Interpreter ABI Platform Actions
refcatch-0.1.1-py3-none-any.whl Python 3 none any Details for refcatch-0.1.1-py3-none-any.whl

Total release size: 14.8 kB

Release files / refcatch-0.1.1.tar.gz

Download URL refcatch-0.1.1.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b26351cc4c377aaa3f06da97f9c8243534b83160db4b9fc8ca93ac5108fbf622
BLAKE2b-256 checksum
How to use checksums
1daef69299d00adab4880c1ffdd19d9eb054f3d20ba16922ea2b47bc3a1b50e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.13

Release files / refcatch-0.1.1-py3-none-any.whl

Download URL refcatch-0.1.1-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
150410a758bacea87400fafd3e9d7b34f7048f98ca74422099771016d9ca027b
BLAKE2b-256 checksum
How to use checksums
04841dc5e39ee9a2aefff48d98b022fdb49452eced1e54d8c2f2446a970adeaf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.13

Security for refcatch 0.1.1

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page