Compare commits
10 commits
09dacac6ef
...
26c240e374
Author | SHA1 | Date | |
---|---|---|---|
![]() |
26c240e374 | ||
![]() |
f7fdc3a2f5 | ||
![]() |
14993423fe | ||
![]() |
07691dbfb3 | ||
![]() |
8abbb37d43 | ||
![]() |
f1668c80ec | ||
![]() |
c8df278775 | ||
![]() |
07497740bb | ||
![]() |
80839dfd20 | ||
![]() |
fccac75326 |
7 changed files with 2340 additions and 43 deletions
1
.github/workflows/build-linux-mac.yml
vendored
1
.github/workflows/build-linux-mac.yml
vendored
|
@ -38,7 +38,6 @@ jobs:
|
|||
run: |
|
||||
# install dependencies and build
|
||||
npm i
|
||||
npm run build
|
||||
npm run make-${{ matrix.osName }}-${{ matrix.arch }}
|
||||
|
||||
- name: Upload linux/mac builds to GH release
|
||||
|
|
3
.github/workflows/build-windows.yml
vendored
3
.github/workflows/build-windows.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: Release lollipop windows
|
||||
name: Release lollipop for windows
|
||||
|
||||
on:
|
||||
push:
|
||||
|
@ -32,7 +32,6 @@ jobs:
|
|||
run: |
|
||||
# install dependencies and build
|
||||
npm i
|
||||
npm run build
|
||||
npm run make-${{ matrix.osName }}-${{ matrix.arch }}
|
||||
|
||||
- name: Upload windows build to GH release
|
||||
|
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,4 +1,3 @@
|
|||
node_modules
|
||||
dist
|
||||
build
|
||||
package-lock.json
|
||||
build
|
2325
package-lock.json
generated
Normal file
2325
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
14
package.json
14
package.json
|
@ -15,7 +15,7 @@
|
|||
"typescript": "^5.4.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@distube/ytdl-core": "^4.13.6",
|
||||
"@distube/ytdl-core": "^4.14.3",
|
||||
"chalk": "^4.1.2",
|
||||
"commander": "^12.1.0",
|
||||
"easy-table": "^1.2.0",
|
||||
|
@ -27,11 +27,11 @@
|
|||
"dev": "nodemon src/app.ts",
|
||||
"build": "tsc",
|
||||
"build-w": "tsc -w",
|
||||
"make-linux-x64": "pkg --targets node20-linux-x64 --compress GZip dist/app.js -o build/lollipop-linux-x64",
|
||||
"make-linux-arm64": "pkg --targets node20-linux-arm64 --compress GZip dist/app.js -o build/lollipop-linux-arm64",
|
||||
"make-win-x64": "pkg --targets node20-win-x64 --compress GZip dist/app.js -o build/lollipop-win-x64",
|
||||
"make-win-arm64": "pkg --targets node20-win-arm64 --compress GZip dist/app.js -o build/lollipop-win-arm64",
|
||||
"make-macos-x64": "pkg --targets node20-macos-x64 --compress GZip dist/app.js -o build/lollipop-macos-x64",
|
||||
"make-macos-arm64": "pkg --targets node20-macos-arm64 --compress GZip dist/app.js -o build/lollipop-macos-arm64"
|
||||
"make-linux-x64": "npm run build && pkg --targets node20-linux-x64 --compress GZip dist/app.js -o build/lollipop-linux-x64",
|
||||
"make-linux-arm64": "npm run build && pkg --targets node20-linux-arm64 --compress GZip dist/app.js -o build/lollipop-linux-arm64",
|
||||
"make-win-x64": "npm run build && pkg --targets node20-win-x64 --compress GZip dist/app.js -o build/lollipop-win-x64",
|
||||
"make-win-arm64": "npm run build && pkg --targets node20-win-arm64 --compress GZip dist/app.js -o build/lollipop-win-arm64",
|
||||
"make-macos-x64": "npm run build && pkg --targets node20-macos-x64 --compress GZip dist/app.js -o build/lollipop-macos-x64",
|
||||
"make-macos-arm64": "npm run build && pkg --targets node20-macos-arm64 --compress GZip dist/app.js -o build/lollipop-macos-arm64"
|
||||
}
|
||||
}
|
||||
|
|
36
src/app.ts
36
src/app.ts
|
@ -12,7 +12,8 @@ import {
|
|||
} from "./cli/functions";
|
||||
import { Wrong } from "./cli/logs";
|
||||
|
||||
process.env.YTDL_NO_UPDATE = "1";
|
||||
import "./preload";
|
||||
|
||||
const app = new Command();
|
||||
|
||||
app
|
||||
|
@ -24,20 +25,15 @@ app
|
|||
"#D04848"
|
||||
)("<3")}`
|
||||
)
|
||||
.version(`0.0.8`, "--version")
|
||||
.version("0.0.10", "--version")
|
||||
.usage("[command]")
|
||||
.addOption(new Option("-h, --help").hideHelp());
|
||||
|
||||
app
|
||||
.command("get")
|
||||
.description("show youtube link details for you :3")
|
||||
.description("show youtube link details")
|
||||
.argument("<link>", "youtube link")
|
||||
.addOption(new Option("-h, --help").hideHelp())
|
||||
.addHelpText(
|
||||
"after",
|
||||
`${chalk.green("\nExamples:")}
|
||||
${chalk.yellow("get")} youtube_link`
|
||||
)
|
||||
.action(async (link, options) => {
|
||||
checkLink(link);
|
||||
linkInfomation(link);
|
||||
|
@ -45,34 +41,12 @@ app
|
|||
|
||||
app
|
||||
.command("down")
|
||||
.description("download youtube videos/audios for you :P")
|
||||
.description("download youtube video/audio")
|
||||
.argument("<link>", "youtube link")
|
||||
.option("-v <tag>", "pass the video tag you got from the get command")
|
||||
.option("-a <tag>", "pass the audio tag you got from the get command")
|
||||
.option("--mp3", "this flag is only used together with -a flag")
|
||||
.addOption(new Option("-h, --help").hideHelp())
|
||||
.addHelpText(
|
||||
"after",
|
||||
`${chalk.green("\nExamples:")}
|
||||
standard download => ${chalk.yellow(
|
||||
"down"
|
||||
)} youtube_link -v tag_number -a tag_number
|
||||
${chalk.hex("#DC84F3")(
|
||||
`In standard download, I download video and audio separately and merging them with ffmpeg`
|
||||
)}
|
||||
${chalk.hex("#DC84F3")(
|
||||
`If you don't provide video tag and audio tag, I'll download highest qualities of them`
|
||||
)}\n
|
||||
download only video => ${chalk.yellow("down")} youtube_link -v tag_number\n
|
||||
download only audio => ${chalk.yellow(
|
||||
"down"
|
||||
)} youtube_link -a tag_number --mp3
|
||||
${chalk.hex("#DC84F3")(
|
||||
`If you use ${chalk.blue("--mp3")} with ${chalk.blue(
|
||||
"-a"
|
||||
)} flag, It will convert audio to mp3 with ffmpeg`
|
||||
)}`
|
||||
)
|
||||
.action(async (link, options) => {
|
||||
checkLink(link);
|
||||
let isVideoTagValid,
|
||||
|
|
1
src/preload.ts
Normal file
1
src/preload.ts
Normal file
|
@ -0,0 +1 @@
|
|||
process.env.YTDL_NO_UPDATE = "1";
|
Loading…
Add table
Add a link
Reference in a new issue