Skip to content

pygetpapers

Radhu Ladani edited this page May 1, 2021 · 2 revisions

Usage

  • Type the command pygetpapers to run the help.

help

Queries are build using -q flag.

The query format can be found at http://europepmc.org/docs/EBI_Europe_PMC_Web_Service_Reference.pdf

A condensed guide can be found at https://github.com/petermr/pygetpapers/wiki/query-format

Sample queries:

  1. The following query downloads 100 full text xmls, pdfs and supplementary files along with the csv and json(default) for the topic "lantana" and saves them in a directory called "test".

    pygetpapers -q "lantana" -k 100 -o "test" --supp -c -p -x

    1

  2. The following query just prints out the number of hits for the topic lantana

    pygetpapers -n -q "lantana"

    n

  3. The following query just creates the csv output for metadata of 100 papers on the topic lantana in an output directory called "test"

    pygetpapers --onlyquery -q "lantana" -k 100 -o "test" -c

    3

  4. The following query just create the html output for metadata of 100 papers on the topic lantana in an output directory called "test"

    pygetpapers --onlyquery -q "lantana" -k 100 --makehtml -o "test"

    Screenshot (717)

  5. The following nested query downloads 100 full text xmls, pdfs files along with the csv and json(default) for the topic "(lantana camara) AND (eichhornia crassipes)" using logical AND keyword and saves them in a directory called "test"

    pygetpapers -q "(lantana camara) AND (eichhornia crassipes)" -k 100 -o "test" -c -p -x

    AND

  6. If the user wants to update an existing corpus in the directory test which has eupmc_resuts.json with 100 papers of query lantana along with their xmls and pdfs, the following query can be used:

    pygetpapers --update "C:\Users\DELL\test\eupmc_results.json" -q "lantana" -k 10 -x -p

  7. If user wants to download pdfs for a corpus in the directory test which has eupmc_resuts.json which originally only had xmls, or the query broke in between and they want to restart the download of pdfs and xmls, they can use the following query

    pygetpapers --restart "C:\Users\DELL\test\eupmc_results.json" -o "test" -x -p -q "lantana"

    5

  8. If user wants references then following query download references.xml file if available. Requires source for references (AGR,CBA,CTX,ETH,HIR,MED,PAT,PMC,PPR)

    pygetpapers -q "lantana" -k 10 -o "test" -c -x --references PMC

    rrr

    rr

  9. if user wants synonym then --synonym provides results which contain synonyms as well

    pygetpapers --onlyquery -q "lantana" -k 10 -o "test" -c --synonym

    s