MarkHershey / arxiv-dl

Command-line ArXiv & CVF (CVPR, ICCV, WACV) Paper Downloader
https://pypi.org/project/arxiv-dl/
MIT License
34 stars 6 forks source link

Option to provide a .txt file containing links to papers #6

Closed coenschoof closed 6 months ago

coenschoof commented 10 months ago

Hi,

Sometimes I need to download a large volume of Arxiv papers. Would it be possible to provide a .txt file containing the links?

MarkHershey commented 10 months ago

Hi @coenschoof , there are many convenient ways to do that with the existing version.

Assume you have a papers.txt file at your current directory that looks like this:

1512.03385
https://arxiv.org/abs/2103.15538
2304.04415
https://arxiv.org/pdf/1512.03385.pdf
https://openaccess.thecvf.com/content/CVPR2021/html/Lin_Real-Time_High-Resolution_Background_Matting_CVPR_2021_paper.html

where each line is a URL / ArxivID of a paper to download.

On Linux or MacOS, you can do this:

awk 'NF' papers.txt | xargs paper

which pipe all non-empty lines from the txt file to arxiv-dl as arguments.

arxiv-dl supports multiple arguments natively.