Compare commits

...

23 Commits

Author SHA1 Message Date
Nemo 4d1bea0d0f run local prettier instead of global one 2023-12-14 15:40:23 +05:30
Nemo a94395ea9d drop node 16 2023-12-14 15:15:41 +05:30
Nemo 8019310674 fix prettier warnings 2023-12-14 15:15:31 +05:30
Nemo 1a2d485d10 dependency updates 2023-12-14 11:34:36 +05:30
dependabot[bot] 7cce1333f1 Bump prettier from 3.0.0 to 3.0.1
Bumps [prettier](https://github.com/prettier/prettier) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.0.0...3.0.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-05 09:30:21 +05:30
Nemo 1b9a02fa20 prettier fixes 2023-07-31 15:02:08 +05:30
dependabot[bot] cbc90f7110 Bump prettier from 2.8.8 to 3.0.0
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.8 to 3.0.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.8...3.0.0)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-31 15:02:08 +05:30
dependabot[bot] b785434c45 Bump ytdl-core from 4.11.4 to 4.11.5
Bumps [ytdl-core](https://github.com/fent/node-ytdl-core) from 4.11.4 to 4.11.5.
- [Release notes](https://github.com/fent/node-ytdl-core/releases)
- [Commits](https://github.com/fent/node-ytdl-core/compare/v4.11.4...v4.11.5)

---
updated-dependencies:
- dependency-name: ytdl-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-15 09:35:06 +05:30
dependabot[bot] 7c43700c11 Bump cacheable-request and got
Bumps [cacheable-request](https://github.com/jaredwray/cacheable-request) and [got](https://github.com/sindresorhus/got). These dependencies needed to be updated together.

Updates `cacheable-request` from 7.0.2 to 10.2.7
- [Release notes](https://github.com/jaredwray/cacheable-request/releases)
- [Commits](https://github.com/jaredwray/cacheable-request/commits)

Updates `got` from 12.3.1 to 12.5.3
- [Release notes](https://github.com/sindresorhus/got/releases)
- [Commits](https://github.com/sindresorhus/got/compare/v12.3.1...v12.5.3)

---
updated-dependencies:
- dependency-name: cacheable-request
  dependency-type: indirect
- dependency-name: got
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-05 13:31:07 +05:30
dependabot[bot] 33741a50e7 Bump prettier from 2.8.7 to 2.8.8
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.7 to 2.8.8.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.7...2.8.8)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-05 13:30:42 +05:30
dependabot[bot] 3bd269e517 Bump semver from 7.3.7 to 7.5.3
Bumps [semver](https://github.com/npm/node-semver) from 7.3.7 to 7.5.3.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.3.7...v7.5.3)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-05 13:30:29 +05:30
dependabot[bot] 2a67cc7c0b Bump ytdl-core from 4.11.3 to 4.11.4
Bumps [ytdl-core](https://github.com/fent/node-ytdl-core) from 4.11.3 to 4.11.4.
- [Release notes](https://github.com/fent/node-ytdl-core/releases)
- [Commits](https://github.com/fent/node-ytdl-core/compare/v4.11.3...v4.11.4)

---
updated-dependencies:
- dependency-name: ytdl-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-14 11:17:29 +05:30
dependabot[bot] 51a50b8a11 Bump minimist from 1.2.7 to 1.2.8
Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.7 to 1.2.8.
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.7...v1.2.8)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-07 01:02:24 +05:30
dependabot[bot] 7c97cc9bc3 Bump http-cache-semantics from 4.1.0 to 4.1.1
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-07 01:02:17 +05:30
dependabot[bot] ce3c11a820 Bump prettier from 2.8.2 to 2.8.7
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.2 to 2.8.7.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.2...2.8.7)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-07 01:02:11 +05:30
dependabot[bot] d376b3ad3d Bump ytdl-core from 4.11.2 to 4.11.3
Bumps [ytdl-core](https://github.com/fent/node-ytdl-core) from 4.11.2 to 4.11.3.
- [Release notes](https://github.com/fent/node-ytdl-core/releases)
- [Commits](https://github.com/fent/node-ytdl-core/compare/v4.11.2...v4.11.3)

---
updated-dependencies:
- dependency-name: ytdl-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-07 01:01:46 +05:30
dependabot[bot] 6af3c1da60 Bump prettier from 2.8.1 to 2.8.2
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.1 to 2.8.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.1...2.8.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-10 06:34:07 +00:00
dependabot[bot] 68bf09689a Bump prettier from 2.8.0 to 2.8.1
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.0 to 2.8.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.0...2.8.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-13 11:41:46 +05:30
dependabot[bot] 84c23243d3 Bump mocha from 10.1.0 to 10.2.0
Bumps [mocha](https://github.com/mochajs/mocha) from 10.1.0 to 10.2.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v10.1.0...v10.2.0)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-13 11:39:33 +05:30
dependabot[bot] 1e9bace48d Bump prettier from 2.7.1 to 2.8.0
Bumps [prettier](https://github.com/prettier/prettier) from 2.7.1 to 2.8.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.7.1...2.8.0)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-24 11:02:23 +05:30
dependabot[bot] 00af711bf6 Bump minimist from 1.2.6 to 1.2.7
Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.6 to 1.2.7.
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.6...v1.2.7)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-15 17:37:05 +05:30
dependabot[bot] 278aebf32f Bump mocha from 10.0.0 to 10.1.0
Bumps [mocha](https://github.com/mochajs/mocha) from 10.0.0 to 10.1.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v10.0.0...v10.1.0)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-18 15:02:27 +05:30
dependabot[bot] 1743561886 Bump ytdl-core from 4.11.1 to 4.11.2
Bumps [ytdl-core](https://github.com/fent/node-ytdl-core) from 4.11.1 to 4.11.2.
- [Release notes](https://github.com/fent/node-ytdl-core/releases)
- [Commits](https://github.com/fent/node-ytdl-core/compare/v4.11.1...v4.11.2)

---
updated-dependencies:
- dependency-name: ytdl-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-07 15:08:21 +05:30
7 changed files with 224 additions and 1762 deletions

View File

@ -4,7 +4,7 @@ jobs:
tests:
strategy:
matrix:
node: ["18", "16"]
node: ["18", "20", "21"]
name: Run NPM Stuff
runs-on: ubuntu-latest
steps:

View File

@ -52,14 +52,12 @@ You need to pass 2 parameters, a Youtube URL and a output CUE filename. YouTube
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
$ youtube-cue --audio-file audio.m4a "https://www.youtube.com/watch?v=WzpmVxvoBoc" "The Groovy Nobody - Solarium.cue"
"The Groovy Nobody - Solarium.cue" saved
## Personal Usage
I have this in my `.bashrc` to download, split, tag, and import albums:
I have this in my `.bashrc` to download, split, tag, and import albums using beet:
```shell
function ytdl.album() {

1949
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -12,14 +12,14 @@
"license": "MIT",
"devDependencies": {
"mocha": "^10.0.0",
"prettier": "^2.3.2"
"prettier": "^3.1.0"
},
"dependencies": {
"console-log-level": "^1.4.1",
"get-artist-title": "^1.3.1",
"minimist": "^1.2.5",
"update-notifier": "^6.0.2",
"ytdl-core": "^4.8.2"
"minimist": "^1.2.8",
"update-notifier": "^7.0.0",
"ytdl-core": "^4.11.5"
},
"repository": {
"type": "git",

View File

@ -1,5 +1,10 @@
import fs from "fs";
/** code to create a new CUE file, as per the standard
* with a REM PERFORMER, TITLE, FILE attribute
* and a list of tracks provided as input
*/
// https://en.wikipedia.org/wiki/Cue_sheet_(computing)
export function generate(data, outputFile) {
try {

View File

@ -41,8 +41,8 @@ var firstPass = function (line) {
let track = matches.groups["trackl"]
? +matches.groups["trackl"]
: matches.groups["trackr"]
? +matches.groups["trackr"]
: null;
? +matches.groups["trackr"]
: null;
return {
track: track,
start: {
@ -161,7 +161,11 @@ var dropInvalid = function (e) {
export function parse(
text,
options = { artist: "Unknown", forceTimestamps: false, forceDurations: false }
options = {
artist: "Unknown",
forceTimestamps: false,
forceDurations: false,
},
) {
_options = options;
let durations = false;

View File

@ -152,7 +152,7 @@ describe("Parser", function () {
let result = parse(
`1. Artist - Title 5:00
2. Another Artist - Another Title 4:20`,
{ forceTimestamps: true }
{ forceTimestamps: true },
);
assert.deepEqual(result[0].end, {
ts: "00:4:20",
@ -174,7 +174,7 @@ describe("Parser", function () {
let result = parse(
`1. Artist - Title 1:00
2. Another Artist - Another Title 1:15`,
{ forceDurations: true }
{ forceDurations: true },
);
assert.deepEqual(result[0], {
track: 1,