petermr / tigr2ess

Materials for TIGR2ESS workshop in Delhi Feb 2019 - joint UK(Cambridge) - India project on Food Security.
Other
4 stars 10 forks source link

getpapers on Windows 10 - minor edit required in an installation step #7

Closed ay-amityadav closed 5 years ago

ay-amityadav commented 5 years ago

Operating system: Windows 10

The installation steps were followed from contentmine/getpapers, which in turn refers to blahah/installing-node-tools for the initial steps.

Step 1: Installing nodeJS. From the downloads page, the latest version nvm-setup.zip is downloaded. The latest version is 1.1.7. The file is uzipped and the included installer is run. This step runs smoothly.

Step 2: installing node. This is done by running nvm install 7. The output for this is:

C:\Users\amit>nvm install 7
Downloading node.js version 7.10.1 (64-bit)...
Complete
Creating C:\Users\amit\AppData\Roaming\nvm\temp

Downloading npm version 4.2.0... Complete
Installing npm v4.2.0...

Installation complete. If you want to use this version, type

nvm use 7.10.1

Next, we issue the command nvm use 7. And it results in the following error message:

C:\Users\amit>nvm use 7
7.0.0
node v7.0.0 (64-bit) is not installed.

This is because we have to issue the command nvm use 7.10.1 instead of nvm use 7, as mentioned in the above Step 2 output. Doing so results in the smooth execution of the command and the output is:

C:\Users\amit>nvm use 7.10.1
Now using node v7.10.1 (64-bit)

Step 3: installing getpapers. Issuing the command npm install --global getpapers installs getpapers, although there are some warnings. The output for this is:

C:\Users\amit>npm install --global getpapers
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm WARN deprecated hoek@2.16.3: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated boom@2.10.1: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated cryptiles@2.0.5: This version is no longer maintained. Please upgrade to the latest version.
C:\Program Files\nodejs\getpapers -> C:\Program Files\nodejs\node_modules\getpapers\bin\getpapers.js
C:\Program Files\nodejs
`-- getpapers@0.4.17
  +-- chalk@1.0.0
  | +-- ansi-styles@2.2.1
  | +-- escape-string-regexp@1.0.5
  | +-- has-ansi@1.0.3
  | | +-- ansi-regex@1.1.1
  | | `-- get-stdin@4.0.1
  | +-- strip-ansi@2.0.1
  | `-- supports-color@1.3.1
  +-- commander@2.7.1
  | `-- graceful-readlink@1.0.1
  +-- crossref@0.1.2
  | +-- got@5.1.0
  | | +-- create-error-class@2.0.1
  | | | `-- capture-stack-trace@1.0.1
  | | +-- is-plain-obj@1.1.0
  | | +-- is-redirect@1.0.0
  | | +-- node-status-codes@1.0.0
  | | +-- object-assign@4.1.1
  | | +-- parse-json@2.2.0
  | | | `-- error-ex@1.3.2
  | | |   `-- is-arrayish@0.2.1
  | | +-- pinkie-promise@1.0.0
  | | | `-- pinkie@1.0.0
  | | +-- read-all-stream@3.1.0
  | | | `-- pinkie-promise@2.0.1
  | | |   `-- pinkie@2.0.4
  | | +-- unzip-response@1.0.2
  | | `-- url-parse-lax@1.0.0
  | `-- request@2.65.0
  |   +-- aws-sign2@0.6.0
  |   +-- bl@1.0.3
  |   | `-- readable-stream@2.0.6
  |   |   +-- process-nextick-args@1.0.7
  |   |   `-- string_decoder@0.10.31
  |   +-- caseless@0.11.0
  |   +-- combined-stream@1.0.7
  |   | `-- delayed-stream@1.0.0
  |   +-- forever-agent@0.6.1
  |   +-- form-data@1.0.1
  |   | `-- async@2.6.1
  |   |   `-- lodash@4.17.11
  |   +-- har-validator@2.0.6
  |   | +-- chalk@1.1.3
  |   | | +-- has-ansi@2.0.0
  |   | | | `-- ansi-regex@2.1.1
  |   | | +-- strip-ansi@3.0.1
  |   | | `-- supports-color@2.0.0
  |   | +-- commander@2.19.0
  |   | +-- is-my-json-valid@2.19.0
  |   | | +-- generate-function@2.3.1
  |   | | | `-- is-property@1.0.2
  |   | | +-- generate-object-property@1.2.0
  |   | | +-- is-my-ip-valid@1.0.0
  |   | | +-- jsonpointer@4.0.1
  |   | | `-- xtend@4.0.1
  |   | `-- pinkie-promise@2.0.1
  |   |   `-- pinkie@2.0.4
  |   +-- hawk@3.1.3
  |   | +-- boom@2.10.1
  |   | +-- cryptiles@2.0.5
  |   | +-- hoek@2.16.3
  |   | `-- sntp@1.0.9
  |   +-- http-signature@0.11.0
  |   | +-- asn1@0.1.11
  |   | +-- assert-plus@0.1.5
  |   | `-- ctype@0.5.3
  |   +-- json-stringify-safe@5.0.1
  |   +-- mime-types@2.1.21
  |   | `-- mime-db@1.37.0
  |   +-- node-uuid@1.4.8
  |   +-- oauth-sign@0.8.2
  |   +-- qs@5.2.1
  |   +-- stringstream@0.0.6
  |   +-- tough-cookie@2.2.2
  |   `-- tunnel-agent@0.4.3
  +-- got@2.9.2
  | +-- duplexify@3.6.1
  | | +-- end-of-stream@1.4.1
  | | +-- inherits@2.0.3
  | | +-- readable-stream@2.3.6
  | | | +-- core-util-is@1.0.2
  | | | +-- isarray@1.0.0
  | | | +-- process-nextick-args@2.0.0
  | | | +-- string_decoder@1.1.1
  | | | `-- util-deprecate@1.0.2
  | | `-- stream-shift@1.0.0
  | +-- infinity-agent@2.0.3
  | +-- is-stream@1.1.0
  | +-- lowercase-keys@1.0.1
  | +-- nested-error-stacks@1.0.2
  | +-- object-assign@2.1.1
  | +-- prepend-http@1.0.4
  | +-- read-all-stream@2.2.0
  | +-- statuses@1.5.0
  | `-- timed-out@2.0.0
  +-- lodash@3.10.1
  +-- matched@0.4.4
  | +-- arr-union@3.1.0
  | +-- async-array-reduce@0.2.1
  | +-- extend-shallow@2.0.1
  | | `-- is-extendable@0.1.1
  | +-- fs-exists-sync@0.1.0
  | +-- glob@7.1.3
  | | +-- fs.realpath@1.0.0
  | | +-- inflight@1.0.6
  | | | `-- wrappy@1.0.2
  | | +-- minimatch@3.0.4
  | | | `-- brace-expansion@1.1.11
  | | |   +-- balanced-match@1.0.0
  | | |   `-- concat-map@0.0.1
  | | +-- once@1.4.0
  | | `-- path-is-absolute@1.0.1
  | +-- has-glob@0.1.1
  | | `-- is-glob@2.0.1
  | |   `-- is-extglob@1.0.0
  | +-- is-valid-glob@0.3.0
  | +-- lazy-cache@2.0.2
  | | `-- set-getter@0.1.0
  | |   `-- to-object-path@0.3.0
  | |     `-- kind-of@3.2.2
  | |       `-- is-buffer@1.1.6
  | `-- resolve-dir@0.1.1
  |   +-- expand-tilde@1.2.2
  |   | `-- os-homedir@1.0.2
  |   `-- global-modules@0.2.3
  |     +-- global-prefix@0.1.5
  |     | +-- homedir-polyfill@1.0.1
  |     | | `-- parse-passwd@1.0.0
  |     | +-- ini@1.3.5
  |     | `-- which@1.3.1
  |     |   `-- isexe@2.0.0
  |     `-- is-windows@0.2.0
  +-- mkdirp@0.5.1
  | `-- minimist@0.0.8
  +-- progress@1.1.8
  +-- requestretry@1.13.0
  | +-- extend@3.0.2
  | +-- lodash@4.17.11
  | +-- request@2.88.0
  | | +-- aws-sign2@0.7.0
  | | +-- aws4@1.8.0
  | | +-- caseless@0.12.0
  | | +-- form-data@2.3.3
  | | | `-- asynckit@0.4.0
  | | +-- har-validator@5.1.3
  | | | +-- ajv@6.7.0
  | | | | +-- fast-deep-equal@2.0.1
  | | | | +-- fast-json-stable-stringify@2.0.0
  | | | | +-- json-schema-traverse@0.4.1
  | | | | `-- uri-js@4.2.2
  | | | |   `-- punycode@2.1.1
  | | | `-- har-schema@2.0.0
  | | +-- http-signature@1.2.0
  | | | +-- assert-plus@1.0.0
  | | | +-- jsprim@1.4.1
  | | | | +-- assert-plus@1.0.0
  | | | | +-- extsprintf@1.3.0
  | | | | +-- json-schema@0.2.3
  | | | | `-- verror@1.10.0
  | | | |   `-- assert-plus@1.0.0
  | | | `-- sshpk@1.16.1
  | | |   +-- asn1@0.2.4
  | | |   +-- assert-plus@1.0.0
  | | |   +-- bcrypt-pbkdf@1.0.2
  | | |   +-- dashdash@1.14.1
  | | |   | `-- assert-plus@1.0.0
  | | |   +-- ecc-jsbn@0.1.2
  | | |   +-- getpass@0.1.7
  | | |   | `-- assert-plus@1.0.0
  | | |   +-- jsbn@0.1.1
  | | |   +-- safer-buffer@2.1.2
  | | |   `-- tweetnacl@0.14.5
  | | +-- is-typedarray@1.0.0
  | | +-- oauth-sign@0.9.0
  | | +-- performance-now@2.1.0
  | | +-- qs@6.5.2
  | | +-- safe-buffer@5.1.2
  | | +-- tough-cookie@2.4.3
  | | | +-- psl@1.1.31
  | | | `-- punycode@1.4.1
  | | +-- tunnel-agent@0.6.0
  | | `-- uuid@3.3.2
  | `-- when@3.7.8
  +-- restler@3.4.0
  | +-- iconv-lite@0.2.11
  | +-- qs@1.2.0
  | +-- xml2js@0.4.0
  | | +-- sax@0.5.8
  | | `-- xmlbuilder@10.1.1
  | `-- yaml@0.2.3
  +-- sanitize-filename@1.6.1
  | `-- truncate-utf8-bytes@1.0.2
  |   `-- utf8-byte-length@1.0.4
  +-- version_compare@0.0.3
  +-- winston@2.3.1
  | +-- async@1.0.0
  | +-- colors@1.0.3
  | +-- cycle@1.0.3
  | +-- eyes@0.1.8
  | +-- isstream@0.1.2
  | `-- stack-trace@0.0.10
  `-- xml2js@0.4.19
    +-- sax@1.2.4
    `-- xmlbuilder@9.0.7

Step 4: issuing command getpapers outputs the following:

C:\Users\amit>getpapers

  Usage: getpapers [options]

  Options:

    -h, --help                output usage information
    -V, --version             output the version number
    -q, --query <query>       search query (required)
    -o, --outdir <path>       output directory (required - will be created if not found)
    --api <name>              API to search [eupmc, crossref, ieee, arxiv] (default: eupmc)
    -x, --xml                 download fulltext XMLs if available
    -p, --pdf                 download fulltext PDFs if available
    -s, --supp                download supplementary files if available
    -t, --minedterms          download text-mined terms if available
    -l, --loglevel <level>    amount of information to log (silent, verbose, info*, data, warn, error, or debug)
    -a, --all                 search all papers, not just open access
    -n, --noexecute           report how many results match the query, but don't actually download anything
    -f, --logfile <filename>  save log to specified file in output directory as well as printing to terminal
    -k, --limit <int>         limit the number of hits and downloads
    --filter <filter object>  filter by key value pair, passed straight to the crossref api only
    -r, --restart             restart file downloads after failure