Skip to main content

Python Citations Generator

Project description

pycite: Python Citations Generator

DOI PyPI version fury.io Project Status Codecov Test-Package Build Status 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

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 gives us (only the first line is 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. 

Notes

This software is provided freely. If you have any concerns, please contact the author. Specifically, the papers used to test that the software works have been randomly chosen. In the event that you notice that any of those papers has been retracted, please immediately inform the author to remove that paper from the tests.

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.2.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

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

pycite-0.1.2-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pycite-0.1.2.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.6.14

File hashes

Hashes for pycite-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2c6bd6515d6e6d3745d537f42f65007ac84ba3c4388da19a0da88e7962b70181
MD5 76ebfa73ee87f1ef4ac28949c5608947
BLAKE2b-256 e7674b9918ff7662ef0d2f43002a1239754ff51853458e7c15b2dd7a2681c523

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pycite-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.6.14

File hashes

Hashes for pycite-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a3e3e069493bc814d4a4156f3db2e0e73fb44309699a26f50a8fedad3742563c
MD5 fcd350ef35c4211b52aeb580a00a609c
BLAKE2b-256 708741cf682b7137eba8e6887f49eb7ebf4ce41c1ea5d6b932ada8506ec3ed42

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