From ea0df423ba942b1573b75b5937cff63acced7e6d Mon Sep 17 00:00:00 2001 From: kj-sh604 Date: Sun, 30 Jun 2024 07:12:22 -0400 Subject: kj-gitbot: yt-dlp_youtube-dl/ --- yt-dlp_youtube-dl/.SRCINFO | 16 ++++++++++++++++ yt-dlp_youtube-dl/.gitignore | 6 ++++++ yt-dlp_youtube-dl/LICENSE | 24 ++++++++++++++++++++++++ yt-dlp_youtube-dl/PKGBUILD | 27 +++++++++++++++++++++++++++ yt-dlp_youtube-dl/youtube-dl.py | 7 +++++++ yt-dlp_youtube-dl/youtube-dl.sh | 4 ++++ 6 files changed, 84 insertions(+) create mode 100644 yt-dlp_youtube-dl/.SRCINFO create mode 100644 yt-dlp_youtube-dl/.gitignore create mode 100644 yt-dlp_youtube-dl/LICENSE create mode 100644 yt-dlp_youtube-dl/PKGBUILD create mode 100644 yt-dlp_youtube-dl/youtube-dl.py create mode 100644 yt-dlp_youtube-dl/youtube-dl.sh diff --git a/yt-dlp_youtube-dl/.SRCINFO b/yt-dlp_youtube-dl/.SRCINFO new file mode 100644 index 0000000..ac628a9 --- /dev/null +++ b/yt-dlp_youtube-dl/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = yt-dlp_youtube-dl + pkgdesc = Provide both youtube-dl command and python imports using yt-dlp (originally, a symlink for using yt-dlp as a youtube-dl dropin replacement) + pkgver = 1 + pkgrel = 1 + url = https://github.com/yt-dlp/yt-dlp + arch = any + license = The Unlicense + makedepends = python + depends = yt-dlp + provides = youtube-dl + conflicts = youtube-dl + conflicts = yt-dlp-drop-in + source = youtube-dl.py + +pkgname = yt-dlp_youtube-dl + depends = yt-dlp diff --git a/yt-dlp_youtube-dl/.gitignore b/yt-dlp_youtube-dl/.gitignore new file mode 100644 index 0000000..6b2b2ea --- /dev/null +++ b/yt-dlp_youtube-dl/.gitignore @@ -0,0 +1,6 @@ +pkg/ +src/ +*.tar +*.tar.zst +*.tar.gz +*.tar.xz diff --git a/yt-dlp_youtube-dl/LICENSE b/yt-dlp_youtube-dl/LICENSE new file mode 100644 index 0000000..fdddb29 --- /dev/null +++ b/yt-dlp_youtube-dl/LICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/yt-dlp_youtube-dl/PKGBUILD b/yt-dlp_youtube-dl/PKGBUILD new file mode 100644 index 0000000..0cf21ad --- /dev/null +++ b/yt-dlp_youtube-dl/PKGBUILD @@ -0,0 +1,27 @@ +# Maintainer: kj_sh604 +# don't talk to me +pkgname=yt-dlp_youtube-dl +pkgver=1 +pkgrel=1 +pkgdesc="Provide both youtube-dl command and python imports using yt-dlp (originally, a symlink for using yt-dlp as a youtube-dl dropin replacement)" +arch=('any') +url="https://github.com/yt-dlp/yt-dlp" +license=('The Unlicense') +makedepends=('python') +depends=('yt-dlp') +provides=('youtube-dl') +conflicts=('youtube-dl' 'yt-dlp-drop-in') + +source=( + "youtube-dl.py" +) + +package() { + depends=('yt-dlp') + + install -Dm755 "${srcdir:?}/youtube-dl.py" "${pkgdir:?}/usr/bin/youtube-dl" + + local _sitepackages="$(python -c 'import site; print(site.getsitepackages()[0])')" + install -dm755 "${pkgdir:?}${_sitepackages:?}" + ln -sfT "yt_dlp" "${pkgdir:?}${_sitepackages:?}/youtube_dl" +} diff --git a/yt-dlp_youtube-dl/youtube-dl.py b/yt-dlp_youtube-dl/youtube-dl.py new file mode 100644 index 0000000..e42b5f3 --- /dev/null +++ b/yt-dlp_youtube-dl/youtube-dl.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python + +import sys +import yt_dlp + +if __name__ == '__main__': + yt_dlp.main(['--compat-options', 'youtube-dl'] + sys.argv[1:]) diff --git a/yt-dlp_youtube-dl/youtube-dl.sh b/yt-dlp_youtube-dl/youtube-dl.sh new file mode 100644 index 0000000..b91f257 --- /dev/null +++ b/yt-dlp_youtube-dl/youtube-dl.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env sh + +YTDLP="$(which yt-dlp)" +exec "${YTDLP}" --compat-options youtube-dl "$@" -- cgit v1.2.3