Skip to main content

Tool for parsing bibtex in ssau's format

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

references_parser-1.1.1.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

references_parser-1.1.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file references_parser-1.1.1.tar.gz.

File metadata

  • Download URL: references_parser-1.1.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for references_parser-1.1.1.tar.gz
Algorithm Hash digest
SHA256 05fa6e856fad0c57ab287a17ecdc10a7c84ddc2782d16adab3fbb5e9723f3b13
MD5 dcdd961088b5ba6d500ee4b16e372e0d
BLAKE2b-256 6e02437587f212e417d06ed90093f4f1d7735fa443f6a6a770a95e2357c461a2

See more details on using hashes here.

File details

Details for the file references_parser-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for references_parser-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 31a8cf3491f224cab44a096076b470937fe761a1ae47df4afc40263cbcf2c4a3
MD5 b60bbf94bfb2fbf1470b4cf85ef5f8e2
BLAKE2b-256 a6a2da09af62a61e04c8f0e9cb01643574e3659bcfac2ba634bf3a602d1034c3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page