#curl #download #bulk #json-file #text-file #document

app curler

A simple rust programme to bulk-curl documents

2 releases

0.1.2 Mar 13, 2025
0.1.0 Mar 9, 2025

#318 in Command line utilities

Download history 95/week @ 2025-03-05 161/week @ 2025-03-12

256 downloads per month

MIT license

10KB
162 lines

Installation

Prebuilt binaries can be found here.

Cargo

cargo install curler

Building from source

git clone https://github.com/JayanAXHF/curler
cd curler
cargo build --release

To run, run cargo run

Details

JSON Mode

  1. Create a .json file. For ease of use, create a paths.json file in the same directory as the executable.
  2. The format for the .json file is as follows:
{
	"files": [
		{
			"name": "worksheet.pdf",
			"url": "https://sample.gg"
		},
		{
			"name": "worksheet_ak.pdf",
			"url": "https://sample.gg/sample"
		}
		...
	]
}

Text Mode

  1. Create a text file. The program defaults to paths.txt files in the current directory.
  2. The format for the text file is as follows:
filename, url
file2, url
.
.
.

The Programme

This program was made to make it easier for me to download school worksheets, but is compatible with all files. The path to the input file is the path to the .json or text file with the list of files. Subject is used to create a directory where all the downloaded files are stored. Defaults to ./.

Available Options: -s, --subject <SUBJECT> The subject, or directory, to download the files to. [Defaults to ./]

-f, --file-path <FILE_PATH> The path to the JSON/txt file containing the URLs to download

-m, --max-threads <MAX_THREADS> Maximum number of threads to use [default: 4]

--mode <MODE> Possible values: - json: Parse .json file (default) - text: Parse text file

Dependencies

~1.5–2.6MB
~49K SLoC