From d9f848734a4b241a1104bfa17ebcd491a09803a2 Mon Sep 17 00:00:00 2001 From: Itamar Oren Date: Sun, 26 Feb 2023 20:41:10 -0500 Subject: [PATCH] added the 'anime' cli command --- anime_fromCLI.js | 11 +++++++++++ ionconfig.json | 1 + package.json | 5 +++-- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 anime_fromCLI.js create mode 100644 ionconfig.json diff --git a/anime_fromCLI.js b/anime_fromCLI.js new file mode 100644 index 0000000..8421aff --- /dev/null +++ b/anime_fromCLI.js @@ -0,0 +1,11 @@ +#!/usr/bin/env node + +import animeMain from "./anime/getAndSave.js"; + + +function fromCLI() { + const argsRaw = [...process.argv].slice(2); + animeMain(argsRaw); +} + +fromCLI(); \ No newline at end of file diff --git a/ionconfig.json b/ionconfig.json new file mode 100644 index 0000000..e2a5359 --- /dev/null +++ b/ionconfig.json @@ -0,0 +1 @@ +{"apath":"","vpath":"C:\\Program Files\\VideoLAN\\VLC\\vlc.exe"} \ No newline at end of file diff --git a/package.json b/package.json index ffcffef..1056b50 100644 --- a/package.json +++ b/package.json @@ -4,12 +4,13 @@ "description": "", "main": "main.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "node ./anime/fromCLI.js" }, "author": "ION606", "license": "ISC", "bin": { - "ion": "./main.js" + "ion": "./main.js", + "anime": "./anime_fromCLI.js" }, "dependencies": { "@ffmpeg-installer/ffmpeg": "^1.1.0",