Skip to content

zarch/rsnd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rsnd

Raiplay Sound CLI Client

rsnd is a command-line tool designed to download audio content from Raiplay Sound.

Features

  • Fetches and downloads audio files from Raiplay Sound.
  • Caches HTML pages and metadata to improve download efficiency.
  • Allows specifying download and cache directories.

Table of Contents

Installation

Prerequisites

  • Rust: Ensure you have Rust installed. You can install Rust using rustup.

Building from Source

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.

Usage

❯ 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

Example

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.

Contributing

Contributions are welcome! Please follow these steps to contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes.
  4. Ensure all tests pass (cargo test).
  5. Format the code (cargo fmt).
  6. Lint the code (cargo clippy).
  7. Commit your changes (git commit -am 'Add new feature').
  8. Push to the branch (git push origin feature-branch).
  9. Create a new Pull Request.

Running Tests

Run the tests using Cargo:

cargo test

Code Formatting

Ensure your code is formatted according to Rust standards:

cargo fmt

Linting

Check your code for common mistakes and improve readability:

cargo clippy

Code Coverage

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.

License

This project is licensed under the Apache2/MIT License. See the LICENSE file for more details.

About

Raiplay sound CLI client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages