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:
- Add the links directly to the input file.
- Invoke the
prepare-urls
command like this:
python -m references_parser prepare-urls in.txt
- 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>}
}
- Here, you can fill in the fields
origin
(mandatory) andbase
with the required information. - 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file references_parser-1.2.0.tar.gz
.
File metadata
- Download URL: references_parser-1.2.0.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 101b3548be278b14f37b547f833146cdb224c6fed051e00ac6632ac1a35046a0 |
|
MD5 | 1be0c38a92f9e2897d710b07e2f451cd |
|
BLAKE2b-256 | 6c0ee0fc529f01a29198ccee5034e202a7e177121e898ec5aa6a16cd5288a143 |
File details
Details for the file references_parser-1.2.0-py3-none-any.whl
.
File metadata
- Download URL: references_parser-1.2.0-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab69ccbaadcd26c1a08af89ae8136276276318089ad242c69f27809ed5bc6fe1 |
|
MD5 | c292f08b4cf7a1f428d402f02931869d |
|
BLAKE2b-256 | f73bc1d559c37d5ee1bc3d63036dc7e6a921329ac134a71d3c8aed0dd62178c2 |