red_oxide
CLI to help uploading to REDacted, inspired by REDBetter.
Installing
- Install intermodal and add it to your PATH
- Install lame, sox & flac and add them to your PATH
- download the latest release from here
Usage
CLI
Transcode subcommand (red_oxide transcode)
You have to specify api-key, torrent-directory, content-directory, transcode-directory & spectrogram-directory either via the config file or via the CLI
Transcode FLACs to other co-existing formats
Usage: red_oxide transcode [OPTIONS] [URLS]...
Arguments:
[URLS]... The Perma URLs (PL's) of torrents to transcode
Options:
--debug
If debug logs should be shown
-a, --automatic-upload
If the upload should be done automatically
--transcode-in-parallel
If multiple formats should be transcoded in parallel (this will increase memory & cpu usage a lot, make sure you can handle it)
--api-key <API_KEY>
The Api key from Redacted to use there API with
--content-directory <CONTENT_DIRECTORY>
The path to the directory where the downloaded torrents are stored
--transcode-directory <TRANSCODE_DIRECTORY>
The path to the directory where the transcoded torrents should be stored
--torrent-directory <TORRENT_DIRECTORY>
The path to the directory where the torrents should be stored
--spectrogram-directory <SPECTROGRAM_DIRECTORY>
The path to the directory where the spectrograms should be stored
-c, --config-file <CONFIG_FILE>
The path to the config file
-f, --allowed-transcode-formats <ALLOWED_TRANSCODE_FORMATS>
List of allowed formats to transcode to, defaults to all formats if omitted [possible values: flac24, flac, mp3320, mp3-v0]
-m, --move-transcode-to-content
If the transcode should be moved to the content directory, useful when you want to start seeding right after you upload
--skip-hash-check
If the hash check of the original torrent should be skipped, defaults to false, not recommended and if enabled done at own risk!
--skip-spectrogram
If the spectrogram check of the original torrent should be skipped, defaults to false, not recommended and if enabled done at own risk!
-d, --dry-run
If this is a dry run, no files will be uploaded to Redacted
-h, --help
Print help
Example config.json
This is useful if you don't want a super long CLI command and your configs do not change often
{
"api_key": "YOUR_API_KEY",
"torrent_directory": "FULL_PATH_WHERE_TORRENT_FILES_WILL_BE_STORED",
"content_directory": "FULL_PATH_WHERE_CONTENT_IS_LOCATED",
"transcode_directory": "FULL_PATH_WHERE_TRANSCODED_CONTENT_WILL_BE_PUT",
"spectrogram_directory": "FULL_PATH_WHERE_SPECTROGRAMS_WILL_BE_PUT",
"move_transcode_to_content": true,
"automatic_upload": true
}
Notes for people using sox under windows
if you use the binaries from here, and you want utf-8 support for paths (this is needed for Japanese/Chinese/Korean names in paths for example) you have to download the files from here and follow the steps below
- Extract the files from the zip
- Run the PreferExternalManifest.reg file and let it overwrite the registry entry
- Copy the sox.exe.manifest file to the folder where sox.exe is located
- Enjoy sox working with utf-8 paths :)
Built With
- Rust - The language used
- clap - CLI Framework
- tokio - Async runtime
- reqwest - HTTP client
- serde - Serialization/Deserialization
- intermodal - Used for Torrent Hash checking & creation
- audiotags - Reading/Writing Audio Metadata
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Versioning
We use Semantic Versioning for versioning. For the versions available, see the tags on this repository.
Authors
- DevYukine - Initial Work
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT See the LICENSE.md file for details