Giter Club home page Giter Club logo

red_oxide's Introduction

red_oxide

CLI to help uploading to REDacted, inspired by REDBetter.

Installing

  1. Install intermodal and add it to your PATH
  2. Install lame, sox & flac and add them to your PATH
  3. 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
      --concurrency <CONCURRENCY>
          How many tasks (for transcoding as example) should be run in parallel, defaults to your CPU count
      --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, note that all the options can be specified via the CLI as well and are fully optional in this config file (will be merged with the CLI options if specified)

{
  "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,
  "skip_hash_check": false,
  "skip_spectrogram": false,
  "allowed_transcode_formats": ["Flac", "Mp3320", "Mp3V0"],
  "concurrency": 16
}

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

  1. Extract the files from the zip
  2. Run the PreferExternalManifest.reg file and let it overwrite the registry entry
  3. Copy the sox.exe.manifest file to the folder where sox.exe is located
  4. 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

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

red_oxide's People

Contributors

devyukine avatar screxyscroo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.