Skip to content

Alpha Test SNH

ShweataNHegde edited this page Jul 28, 2021 · 1 revision

Alpha-Testing

Upgrade

Upgrading to the latest version before running.

pip install pygetpapers --upgrade

I already have the latest version

Requirement already satisfied: pygetpapers in c:\users\shweata\appdata\local\programs\python\python38\lib\site-packages (0.0.7.1)
Requirement already satisfied: requests in c:\users\shweata\appdata\local\programs\python\python38\lib\site-packages (from pygetpapers) (2.25.1)
Requirement already satisfied: tqdm in c:\users\shweata\appdata\local\programs\python\python38\lib\site-packages (from pygetpapers) (4.61.1)
Requirement already satisfied: dict2xml in c:\users\shweata\appdata\local\programs\python\python38\lib\site-packages (from pygetpapers) (1.7.0)
Requirement already satisfied: configargparse in c:\users\shweata\appdata\local\programs\python\python38\lib\site-packages (from pygetpapers) (1.5)
Requirement already satisfied: coloredlogs in c:\users\shweata\appdata\local\programs\python\python38\lib\site-packages (from pygetpapers) (15.0.1)
Requirement already satisfied: lxml in c:\users\shweata\appdata\local\programs\python\python38\lib\site-packages (from pygetpapers) (4.6.3)
...

Help

INPUT:

pygetpapers --help

OUTPUT:

usage: pygetpapers [-h] [--config CONFIG] [-v] [-q QUERY] [-o OUTPUT]
                   [--save_query] [-x] [-p] [-s] [-z] [--references REFERENCES]
                   [-n] [--citations CITATIONS] [-l LOGLEVEL] [-f LOGFILE]
                   [-k LIMIT] [-r RESTART] [-u UPDATE] [--onlyquery] [-c]
                   [--makehtml] [--synonym] [--startdate STARTDATE]
                   [--enddate ENDDATE] [--terms TERMS] [--api API]
                   [--filter FILTER]

Welcome to Pygetpapers version 0.0.7.1. -h or --help for help

optional arguments:
  -h, --help            show this help message and exit
  --config CONFIG       config file path to read query for pygetpapers
  -v, --version         output the version number
  -q QUERY, --query QUERY
                        query string transmitted to repository API. Eg.
                        "Artificial Intelligence" or "Plant Parts". To escape
                        special characters within the quotes, use backslash.
                        Incase of nested quotes, ensure that the initial quotes
                        are double and the qutoes inside are single. For eg:
                        `'(LICENSE:"cc by" OR LICENSE:"cc-by") AND
                        METHODS:"transcriptome assembly"' ` is wrong. We should
                        instead use `"(LICENSE:'cc by' OR LICENSE:'cc-by') AND
                        METHODS:'transcriptome assembly'"`
  -o OUTPUT, --output OUTPUT
                        output directory (Default: Folder inside current working
                        directory named )
  --save_query          saved the passed query in a config file
  -x, --xml             download fulltext XMLs if available or save metadata as
                        XML
  -p, --pdf             download fulltext PDFs if available (only eupmc and arxiv
                        supported)
  -s, --supp            download supplementary files if available (only eupmc
                        supported)
  -z, --zip             download files from ftp endpoint if available (only eupmc
                        supported)
  --references REFERENCES
                        Download references if available. (only eupmc
                        supported)Requires source for references
                        (AGR,CBA,CTX,ETH,HIR,MED,PAT,PMC,PPR).
  -n, --noexecute       report how many results match the query, but don't
                        actually download anything
  --citations CITATIONS
                        Download citations if available (only eupmc supported).
                        Requires source for citations
                        (AGR,CBA,CTX,ETH,HIR,MED,PAT,PMC,PPR).
  -l LOGLEVEL, --loglevel LOGLEVEL
                        Provide logging level. Example --log warning
                        <<info,warning,debug,error,critical>>, default='info'
  -f LOGFILE, --logfile LOGFILE
                        save log to specified file in output directory as well as
                        printing to terminal
  -k LIMIT, --limit LIMIT
                        maximum number of hits (default: 100)
  -r RESTART, --restart RESTART
                        Reads the json and makes the xml files. Takes the path to
                        the json as the input (only eupmc supported)
  -u UPDATE, --update UPDATE
                        Updates the corpus by downloading new papers. Takes the
                        path of metadata json file of the orignal corpus as the
                        input. Requires -k or --limit (If not provided, default
                        will be used) and -q or --query (must be provided) to be
                        given. Takes the path to the json as the input.
  --onlyquery           Saves json file containing the result of the query in
                        storage. (only eupmc supported)The json file can be given
                        to --restart to download the papers later.
  -c, --makecsv         Stores the per-document metadata as csv.
  --makehtml            Stores the per-document metadata as html.
  --synonym             Results contain synonyms as well.
  --startdate STARTDATE
                        Gives papers starting from given date. Format: YYYY-MM-DD
  --enddate ENDDATE     Gives papers till given date. Format: YYYY-MM-DD
  --terms TERMS         Location of the txt file which contains terms serperated
                        by a comma which will beOR'ed among themselves and AND'ed
                        with the query
  --api API             API to search [eupmc,
                        crossref,arxiv,biorxiv,medrxiv,rxivist] (default: eupmc)
  --filter FILTER       filter by key value pair (only crossref supported)

Version number

Output the version number and exit

pygetpapers -v
C:\Users\shweata>pygetpapers -v
WARNING: Please specify a query

pygetpapers asks me to specify a query instead of just output the version number.