Skip to content

Creates a citation for each PDF and transforms the data into a format that Zotero can accept (currently RIS).

Notifications You must be signed in to change notification settings

asaltveit/create-biblio

Repository files navigation

Create Biblio

Creates a citation for each PDF in a given folder (and all sub-folders) and adds them to an RIS file which can be uploaded to Zotero and/or other programs which accept RIS format.

Any output file may need to be cleaned up by the user.

Set-up

  1. If you don't have git, you'll need to install it:
  1. Clone this repo to your local computer:
    git clone https://github.com/asaltveit/create-biblio.git
  2. Enter the project folder:
    cd create-biblio
  3. If you don't have Python3, install that:
  1. pip should be included with Python3, but if it isn't, see here:

For Windows

  1. Create a virtual environment to install the dependencies in:
    python -m venv .venv
  2. Start the virtual environment:
    .venv\Scripts\activate.bat

For every other operating system

  1. Create a virtual environment to install the dependencies in:
    python3 -m venv .venv
  2. Start the virtual environment:
    source .venv/bin/activate

Continuing for everyone

  1. Install the package prerequisites for this project:
    pip install -r requirements.txt
  2. If you're setting up for development, you can install both the program and dev requirements with:
    pip install -r requirements-dev.txt

Run

python3 create_biblio.py --inputPath="path/to/folder" --outputPath="optional/path/to/file.ris"

If you get a python error, try:

python create_biblio.py --inputPath="path/to/folder" --outputPath="optional/path/to/file.ris"

Outputs:

  • file.ris

Notes

  • If the output file name is not given, default creates the file name from the input path like "path/to/folder" -> folder.ris
  • The output file will be placed in the input folder
  • The output file will include citation info for all PDFs.
  • The .ris file won't be written to if there are no citations to write.

Further Work

  • A full set of unit tests
  • Additional output file types

About

Creates a citation for each PDF and transforms the data into a format that Zotero can accept (currently RIS).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages