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",