When using the example command i.e.
quickscrape \
--url https://peerj.com/articles/384 \
--scraper journal-scrapers/scrapers/peerj.json \
--output peerj-384
--outformat bibjson
I encountered an issue where the scaper was instead resolved to:
/home/workshop/peerj-384/journal-scrapers/scrapers/peerj.json
(instead of /home/workshop/journal-scrapers/scrapers/peerj.json)
This was reported as a failure at this line
program.scraperdir = path.resolve(program.scraperdir);
I believe the issue is caused by the following line which changes the working directory to the output directory:
process.chdir(program.output);
tld = process.cwd();
Moving these two lines till after all absolute paths are determined fixed the problem for me.
When using the example command i.e. quickscrape \ --url https://peerj.com/articles/384 \ --scraper journal-scrapers/scrapers/peerj.json \ --output peerj-384 --outformat bibjson
I encountered an issue where the scaper was instead resolved to: /home/workshop/peerj-384/journal-scrapers/scrapers/peerj.json (instead of /home/workshop/journal-scrapers/scrapers/peerj.json)
This was reported as a failure at this line program.scraperdir = path.resolve(program.scraperdir);
I believe the issue is caused by the following line which changes the working directory to the output directory: process.chdir(program.output); tld = process.cwd();
Moving these two lines till after all absolute paths are determined fixed the problem for me.