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

youtube-cue

v1.0.10

Published

Generates Cue sheet from Youtube URL

Downloads

31

Readme

youtube-cue npm Libraries.io dependency status for latest release NPM Snyk Vulnerabilities for npm package Total Dependencies

Generate CUE sheet from timestamps in youtube video description.

What is this for?

  1. If you have DJ-mix or album on YouTube that you'd like to generate a CUE sheet for.
  2. The video has timestamps in the video description.
  3. The video is publicly available on Youtube.

youtube-cue will read the video description, get the timestamps and generate a CUE sheet accordingly. It will also work if track durations are used instead of timestamps.

Anti-features

  1. It does not download tracks from YouTube
  2. It does not split your tracks
  3. It does not tag your tracks.

For all of the above, there are better tools available, such as youtube-dl, m4acut, mp3splt, cuetools, beets and many more. youtube-cue tries to do one thing well.

Installation

npm install -g youtube-cue

Upgrade

npm update -g youtube-cue

Usage

You need to pass 2 parameters, a Youtube URL and a output CUE filename. YouTube short URLs (youtu.be) are accepted. You can additionally pass a audio-file argument which is used for the FILE specified in the CUE file.

youtube-cue [--audio-file audio.m4a] <youtube_url> [output_file]

Options
  --help, Show help
  --audio-file, Input Audio File (optional) that is written to the CUE sheet

The default audio file is set to %VIDEOTITLE.m4a
The default output file is set to %VIDEOTITLE.cue

where $VIDEOTITLE is the title of the YouTube video.

Generally the parser detects whether numbers are positional timestamps or track durations.
To enforce a desired interpretation you can use these flags:

--timestamps Parse as positional timestamps (relative to the start of the playlist)
--durations Parse as track durations

The above 2 are only needed to force behaviour in
very specific edge cases, they should not be required for most files.

Examples
  $ youtube-cue --audio-file audio.m4a "https://www.youtube.com/watch?v=THzUassmQwE"
    "T A Y L O R  S W I F T – Folklore [Full album].cue" saved
  $ youtube-cue "https://youtu.be/THzUassmQwE" folklore.cue
    folklore.cue saved

Personal Usage

I have this in my .bashrc to download, split, tag, and import albums:

function ytdl.album() {
  cd $(mktemp -d)
  youtube-dl -f "bestaudio[ext=m4a]" --output "audio.m4a" "$1"
  youtube-cue --audio-file "audio.m4a" "$1" tracks.cue
  m4acut -C tracks.cue "audio.m4a" && \
  trash audio.m4a && \
  beet import -map .
}

HACKING

  • If it does not work on a specific video, please attach the complete output
  • Pull Requests are welcome that add support for a better parser without breaking the existing tests
  • Please add tests for any new functionality

License

Licensed under the MIT License