Skip to main content

getpaper - papers download made easy!

Project description

getpaper

Paper downloader

getting started

Install the library with:

pip install getpaper

Usage

Downloading papers

After the installation you can either import the library into your python code or you can use the console scripts, for example:

download download download_pubmed --pubmed 22266545 --folder papers --name pmid

Downloads the paper with pubmed id into the folder 'papers' and uses the pubmed id as name

download download download_doi --doi 10.1519/JSC.0b013e318225bbae --folder papers

Downloads the paper with DOI into the folder papers, as --name is not specified doi is used as name

Parsing the papers

You can parse the downloaded papers with the unstructure library. For example if the papers are in the folder test, you can run:

getpaper/parse.py parse_folder --folder /home/antonkulaga/sources/getpaper/test

You can also parse papers on a per file basis, for example:

getpaper/parse.py parse_paper --paper /home/antonkulaga/sources/getpaper/test/22266545.pdf

Indexing papers

We also provide features to index the papers with openai or lambda embeddings and save them in chromadb vector store. For openai embeddings to work you have to create .env file and specify your openai key there, see .env.template as example For example if you have your papers inside data/output/test/papers folder and you want to make a ChromaDB index at data/output/test/index you can do it by:

python getpaper/index.py index_papers --papers data/output/test/papers --folder data/output/test/index --collection mypapers --chunk_size 6000

Examples

You can run examples.py to see usage examples

Additional requirements

Detectron2 is required for using models from the layoutparser model zoo but is not automatically installed with this package. For MacOS and Linux, build from source with:

pip install 'git+https://github.com/facebookresearch/detectron2.git@e2ce8dc#egg=detectron2'

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

getpaper-0.1.2.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

getpaper-0.1.2-py2.py3-none-any.whl (8.8 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: getpaper-0.1.2.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for getpaper-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c5c814e18df72653349961371eec05e98885008238bb7b0a2232286054de9b59
MD5 3c802c67b077c7cc67f319c66b402774
BLAKE2b-256 86ced6fdea296af26fa918acabf610d57bb5def22503fe9407461c36ebe29bf8

See more details on using hashes here.

File details

Details for the file getpaper-0.1.2-py2.py3-none-any.whl.

File metadata

  • Download URL: getpaper-0.1.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for getpaper-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c88bf299ce26a49e49cd4f6066860c913b66ab7ff0b0c2600132df52ec6b4731
MD5 63af9d7ab9fc6b2dd6c5b6a868046120
BLAKE2b-256 75c81449002b9badda2c1e63eba682ba5289a9e09e73034a2858a652f124375e

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