npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

red-trul

v2.3.9

Published

`red-trul` is a lightweight utility designed to non-interactively conditionally transcode FLAC releases, generating and uploading torrents.

Downloads

107

Readme

red-trul: RED TRanscode & UpLoad

red-trul is a lightweight utility designed to non-interactively conditionally transcode FLAC releases, generating and uploading torrents.

  • Detects the edition and media (edition group) of a release.
  • Transcodes Lossless and 24-bit Lossless to Lossless, MP3 (320), and MP3 (V0) when the edition group lacks the specific transcode.
  • Copies image files from the original, excluding everything else.
  • Maintains the original folder structure.
  • Rejects releases with bad tagging or incorrect bit-rate (for 24-bit FLAC).

API access

Requires an API key with Torrents capability, created from the settings page at RED. No further authorization is needed.

Install

You need:

  • nodejs version 16 or later.
  • flac
  • lame
  • sox
  • ffmpeg
  • perl
npm install -g red-trul

Use

Usage: red-trul [OPTIONS] flac-dir

Options:
      --version           Show version number                          [boolean]
  -i, --info-hash         Torrent hash. Required unless an origin.yaml exists in
                           flac-dir.
      --torrent-id        Use the given torrent id. Alternative to --info-hash.
      --api-key           'Torrents'-capable API token. env-definable as RED_API
                          _KEY
  -o, --torrent-dir       Where to output torrent files           [default: "."]
  -t, --transcode-dir     Output directory of transcodes
      --no-flac           Don't transcode into FLAC                    [boolean]
      --no-v0             Don't transcode into V0                      [boolean]
      --no-320            Don't transcode into 320                     [boolean]
      --no-upload         Don't upload anything                        [boolean]
      --always-transcode  Always transcode (if tagged correctly)       [boolean]
  -h, --help              Show help                                    [boolean]

Example

# RED_API_KEY is set in env.
# --announce=https://.../announce is optional is the 'User' capability is given.

red-trul --info-hash=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
    --torrent-dir=/home/lfen/rtorrent/watch \
    '/home/lfen/Music/TNO Project - There Is No Obsession EP (Flac24)'
# [-] using announce: https://flacsfor.me/<redacted>/announce
# [-] fetch torrent info...
# [-] analyze filelist...
# [-] ffprobe 6 files...
# [+] Required tags are present, would transcode this
# [-] permalink: https://redacted.ch/torrents.php?torrentid=4521975
# [-] grouplink: https://redacted.ch/torrents.php?id=2123754
# [-] fetch torrentgroup...
# [-] Transcoding /home/lfen/Music/TNO Project - There's No Obsession (2019) - WEB FLAC
# [-] Transcoding 01. TNO Project - Eradicating Deviants.flac...
# [-] Transcoding 02. TNO Project - Oneirology (Dance 4 Me).flac...
# [-] Transcoding 03. TNO Project - Exitus Letalis.flac...
# [-] Transcoding 04. TNO Project - Mendacium & Spem.flac...
# [-] Transcoding 05. TNO Project - Neural Interrogation.flac...
# [-] Transcoding 06. TNO Project - N05A (Who Are U).flac...
# [-] Transcoding /home/lfen/Music/TNO Project - There's No Obsession (2019) - WEB V0
# >> [3140914] Using 4 transcoding processes.
#
# [-] Transcoding /home/lfen/Music/TNO Project - There's No Obsession (2019) - WEB 320
# >> [3140942] Using 4 transcoding processes.
#
# [-] Uploading...
# [-] Write torrents to /home/lfen/rtorrent/watch/...
# [*] Done!

Advanced: post-download hook and watch directory.

This script runs well non-interactively. Post-download example scripts are available for qbittorrent and rtorrent. Beside configuring a post-download script for the torrent client, also configure it to use the torrent-dir of trul as watch dir for new torrents, and download those to the transcode dir to start seeding.

On Linux, use red-trul-flock to avoid running multiple instances of red-trul. This waits until the current invocation finishes before starting, like a queue. TODO for macos