Skip to main content

Python Citations Generator

Project description

pycite: Python Citations Generator

DOI PyPI version fury.io Project Status Codecov Test-Package PyPI license Documentation Status Total Downloads Monthly Downloads Weekly Downloads Maintenance GitHub last commit GitHub issues GitHub issues-closed

pycite is a simple to use python citations generator.

Supported Reference Styles

  • Harvard

Supported Paper Sources

  • NCBI

  • Pubmed

  • ScienceDirect

  • JSTOR (Support dropped on 5th November 2021 Why? Uses dynamic JS that we do not want to work with for now.)

Supported file formats

pycite generates citations given a file of the following types:

  • Text files (.txt)

Installation

The simplest way to install the latest release is as follows:

pip install pycite

To install the development version:

Open the Terminal/CMD/Git bash/shell and enter

pip install git+https://github.com/Nelson-Gon/pycite.git

# or for the less stable dev version
pip install git+https://github.com/Nelson-Gon/pycite.git@dev

Otherwise:

# clone the repo
git clone git@github.com:Nelson-Gon/pycite.git
cd pycite
python3 setup.py install

Usage

Script Mode

To use at the command line, please use:

python -m pycite -i testfiles/testlinks.txt -o testfiles/citations.txt

To get help:

python -m pycite --help
#usage: __main__.py [-h] -i INPUT_FILE -o OUTPUT_FILE
#
#optional arguments:
#  -h, --help            show this help message and exit
#  -i INPUT_FILE, --input-file INPUT_FILE
#                        Path to an input file
#  -o OUTPUT_FILE, --output-file OUTPUT_FILE
#                        Path to an output file

Programming Mode

First, one needs to create an object of class PyCite

from pycite.pycite import PyCite
# Need an input-output file pair 
my_citations = PyCite(input_file="testfiles/testlinks.txt", output_file="testfiles/citations.txt")

To generate citations, one simply calls the cite method.

# This will write citations in the provided output file 
my_citations.cite()

The above creates citations as required (only the first line shown here). See citations.txt for the full file.

Pohorille A, Wilson MA, & Shannon G (2017)  Flexible Proteins at the Origin of Life Life (Basel), 7(2),  23.  [Accessed 16/Sep/2021]

Note

pycite is free software that the author hopes could be of use to someone else and enable them to perform reproducible science.

If you have any concerns, especially regarding the papers used to test that the software works, please contact the author. In the event that you notice that any of the papers used in the tests has been retracted, please immediately inform the author to remove that paper.

Thank you very much and keep building,

For Science!

To report any issues, suggestions or improvement, please do so at issues.

“Before software can be reusable it first has to be usable.” – Ralph Johnson

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

pycite-0.1.3.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

pycite-0.1.3-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file pycite-0.1.3.tar.gz.

File metadata

  • Download URL: pycite-0.1.3.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.15

File hashes

Hashes for pycite-0.1.3.tar.gz
Algorithm Hash digest
SHA256 de728e29076509b450dae19429380c3430c4a9333162ec000dc25141cf2e43b7
MD5 3b7ec984e2136eb1171dce239d2c06da
BLAKE2b-256 9e68a6ac31097cf54d9c2bd919b437a7c98060471c519d0ac9ba8c0011c389e2

See more details on using hashes here.

File details

Details for the file pycite-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pycite-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.15

File hashes

Hashes for pycite-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3d99d4106e24bba798043defcedd4c786b74b2574dabf82684667bdfda187b77
MD5 55a2a7fb4f52f6b553b04acdab3a9912
BLAKE2b-256 96c3450ad2024fab5d94770743a6f489015b18bc2e66dcfff6d021323e041122

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