Skip to main content

Install

pip install references-parser

Usage

Use help to see CLI parameters

➜ python -m references_parser parse --help        
Usage: python -m references_parser parse [OPTIONS] PATH

Options:
  -s, --save TEXT         Path to file where to save the result of parsing.
  -p, --parser TEXT       Parser to use. Available parsers: ieee, ssau.
                          Default: ssau.
  -v, --verbose           Whether to print output to stdout or not
  -b, --beautify INTEGER  Number of line wraps between references. Default: 1
  --help                  Show this message and exit.

Usual way of using the script

python -m references_parser parse in.txt

Website references

It's hard to fully parse a website automatically, so some manual interactions are required.

How to add a website reference:

  1. Add the links directly to the input file.
  2. Invoke the prepare-urls command like this:
python -m references_parser prepare-urls in.txt
  1. Then, the URL in the file will be replaced with a BibTeX-annotated URL:
@online{Google,
    title={Google},
    date={18.05.2023},
    year={2023},
    origin={TODO: Author or place or corp here},
    base={TODO: Base resource title here},
    url={<https://google.com>}
}
  1. Here, you can fill in the fields origin (mandatory) and base with the required information.
  2. Then, you can use parsers as usual, but pay attention that the result contains [Б.м.], which you may want to delete.

Examples

Follow examples folder to see input and outputs file examples

Contribution

If you want to improve the program - just fork it and make a pool request

Metadata

Release files for references-parser 1.2.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 references-parser 1.2.1
File Size Uploaded Provenance Actions
references_parser-1.2.1.tar.gz 8.5 kB Without provenance Details for references_parser-1.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for references-parser 1.2.1
File Interpreter ABI Platform Actions
references_parser-1.2.1-py3-none-any.whl Python 3 none any Details for references_parser-1.2.1-py3-none-any.whl

Total release size: 18.6 kB

Release files / references_parser-1.2.1.tar.gz

Download URL references_parser-1.2.1.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d59f4679eed8d32e0588e4aae9ae2c886d3174e3b76e9fc59c3fd540fccccd20
BLAKE2b-256 checksum
How to use checksums
80f366908807dcf13cac9b382b77ded7b79f7572c213c4d2ddd8e758b3c8655f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / references_parser-1.2.1-py3-none-any.whl

Download URL references_parser-1.2.1-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
defbe892ab70b51c25630dc71aaae84fa31ff4aed37382e6606f6a7ac6f8de6c
BLAKE2b-256 checksum
How to use checksums
bf12b14c03d498a6ef014a4a9c1763b435510b1e3eaad10e9dca114c4fa1c423
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Security for references-parser 1.2.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.

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