Add package-upgrade notice and --version

pull/77/head
Nemo 1 year ago
parent 2eadb53b8f
commit 30effce43b
  1. 10
      index.js
  2. 1463
      package-lock.json
  3. 1
      package.json
  4. 5
      src/package.js

@ -5,12 +5,18 @@ import { parse } from "./src/parser.js";
import { generate } from "./src/cue.js";
import minimist from "minimist";
import exit from "process";
import updateNotifier from "update-notifier";
import pkg from "./src/package.js";
updateNotifier({ pkg }).notify();
let argv = minimist(process.argv.slice(2), {
string: "audio-file",
});
if (argv._.length < 1 || argv.help) {
if (argv.version) {
console.log(pkg.version);
} else if (argv._.length < 1 || argv.help) {
console.log(`Usage
$ youtube-cue [--audio-file audio.m4a] <youtube_url> [output_file]
@ -32,6 +38,8 @@ if (argv._.length < 1 || argv.help) {
The above 2 are only needed to force behaviour in very specific edge cases, they should
not be required for most files.
--version Print version
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

1463
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -18,6 +18,7 @@
"console-log-level": "^1.4.1",
"get-artist-title": "^1.3.1",
"minimist": "^1.2.5",
"update-notifier": "^5.1.0",
"ytdl-core": "^4.8.2"
},
"repository": {

@ -0,0 +1,5 @@
import { createRequire } from "module";
const require = createRequire(import.meta.url);
const data = require("../package.json");
export default data;
Loading…
Cancel
Save