Skip to main content

No project description provided

Project description

bibcites

Command-line utility which reads a BibTeX file, finds entries with a DOI, looks up the corresponding number of citations using OpenCitations, saves this number to the addendum field of each entry, and writes results to a new BibTex file.

Installation

python -m pip install bibcites should do the trick.

Usage

Usage: bibcites [OPTIONS] BIBFILE

  Reads a BibTeX file (BIBFILE), finds entries with a DOI, looks up the
  corresponding number of citations using OpenCitations
  (https://opencitations.net), saves this number to the 'addendum' field of
  each entry, and writes results to a new BibTex file.

  Optionally, using option -s, print out a list of entries with DOI sorted by
  number of citations.

Options:
  -o TEXT     output BibTex file
  -f TEXT     format of text to save to 'addendum' field
  -s          print list sorted by cites
  -v          enable verbose output
  -t TEXT     only process entries of this type (may be used several times to
              process several types)
  -n INTEGER  size limit for OpenCitations queries
  --help      Show this message and exit.

bibcites myfile.bib will read the contents of myfile.bib, look up all entries with a DOI field in OpenCitations, append “[X citations]” to the addendum field of each entry, and save the result to myfile_withcites.bib

  • To get verbose output, use -v option.
  • To set a custom file name for the output BibTeX file, use the -o <customfilename> option.
  • To set a custom format to the addendum field, use the -f option, e.g., -f 'Cited {:s} times'. Use the {:s} specifier because the citation count is a string.
  • To print out a list of processed entries, sorted by decreasing number of citations, use the -s option.
  • To process only entries of certain types, use the -t option one or more times, e.g., -t article -t book.
  • To limit the size of OpenCitations queries, use -n option (default is -n 50).

Contact

All questions and suggestions are welcome and should be directed at Mathieu Daëron.

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

bibcites-2.0.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bibcites-2.0.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file bibcites-2.0.1.tar.gz.

File metadata

  • Download URL: bibcites-2.0.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.6

File hashes

Hashes for bibcites-2.0.1.tar.gz
Algorithm Hash digest
SHA256 b72b1b326c281de6f10f8f8582bbf5f32c0b405599d122e87c7269b6ac5158aa
MD5 fe3fbea4d1fd6b91db9dbdd4d1a6810b
BLAKE2b-256 8dffafc91718f97b63d935070eb040a8bd235717e83ae8e2021a94492237beb9

See more details on using hashes here.

File details

Details for the file bibcites-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: bibcites-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.6

File hashes

Hashes for bibcites-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 79ae65295b99085c2c7180a7615c7b548bc9a31fcd750e427d6910724591b194
MD5 8d3647e8db76f119afe863b339d99974
BLAKE2b-256 b0f81d190a483e23d067b96a055a5f728108b8bf89b1b4b83c21deffcaaf83fb

See more details on using hashes here.

Supported by

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