Raiplay Sound CLI Client
rsnd
is a command-line tool designed to download audio content from Raiplay Sound.
- Fetches and downloads audio files from Raiplay Sound.
- Caches HTML pages and metadata to improve download efficiency.
- Allows specifying download and cache directories.
Clone the repository and build the project using Cargo:
git clone https://github.com/zarch/rsnd.git
cd rsnd
cargo build --release
The compiled binary will be located in target/release/rsnd.
❯ rsnd --help
Usage: rsnd [OPTIONS] --url <URL>
Options:
-u, --url <URL> URL of the HTML page
-f, --folder <FOLDER> Path to the local folder [default: .]
-c, --cache <CACHE> Path to the cache folder [default: /tmp]
-h, --help Print help
-V, --version Print version
To download the audiobook "I Tree Moschettieri":
❯ ./target/release/rsnd --url https://www.raiplaysound.it/audiolibri/itremoschettieri \
--folder=libri/itremoschettieri \
--cache=cache
This will download the audiobook files to libri/itremoschettieri
and use cache as the cache directory.
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch (git checkout -b feature-branch).
- Make your changes.
- Ensure all tests pass (cargo test).
- Format the code (cargo fmt).
- Lint the code (cargo clippy).
- Commit your changes (git commit -am 'Add new feature').
- Push to the branch (git push origin feature-branch).
- Create a new Pull Request.
Run the tests using Cargo:
cargo test
Ensure your code is formatted according to Rust standards:
cargo fmt
Check your code for common mistakes and improve readability:
cargo clippy
You can check the code coverage using grcov:
Install grcov:
cargo install grcov
Generate the coverage report:
export CARGO_INCREMENTAL=0
export RUSTFLAGS='-Cinstrument-coverage'
export LLVM_PROFILE_FILE='rsnd-%p-%m.profraw'
cargo build
cargo test
grcov . --binary-path ./target/debug/ -s . -t html --branch --ignore-not-existing -o ./target/coverage/
Open ./target/coverage/index.html to view the coverage report.
This project is licensed under the Apache2/MIT License. See the LICENSE file for more details.