2 releases
0.1.2 | Mar 13, 2025 |
---|---|
0.1.0 | Mar 9, 2025 |
#318 in Command line utilities
256 downloads per month
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
- Create a
.json
file. For ease of use, create apaths.json
file in the same directory as the executable. - 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
- Create a
text
file. The program defaults topaths.txt
files in the current directory. - 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