diff options
Diffstat (limited to 'devscripts')
-rw-r--r-- | devscripts/bash-completion.in | 4 | ||||
-rwxr-xr-x | devscripts/bash-completion.py | 6 | ||||
-rw-r--r-- | devscripts/buildserver.py | 4 | ||||
-rw-r--r-- | devscripts/check-porn.py | 4 | ||||
-rw-r--r-- | devscripts/create-github-release.py | 6 | ||||
-rw-r--r-- | devscripts/fish-completion.in | 2 | ||||
-rwxr-xr-x | devscripts/fish-completion.py | 10 | ||||
-rw-r--r-- | devscripts/generate_aes_testdata.py | 4 | ||||
-rwxr-xr-x | devscripts/gh-pages/add-version.py | 6 | ||||
-rwxr-xr-x | devscripts/gh-pages/update-feed.py | 10 | ||||
-rwxr-xr-x | devscripts/gh-pages/update-sites.py | 6 | ||||
-rwxr-xr-x | devscripts/make_contributing.py | 2 | ||||
-rw-r--r-- | devscripts/make_issue_template.py | 6 | ||||
-rw-r--r-- | devscripts/make_lazy_extractors.py | 4 | ||||
-rw-r--r-- | devscripts/make_supportedsites.py | 6 | ||||
-rw-r--r-- | devscripts/prepare_manpage.py | 6 | ||||
-rwxr-xr-x | devscripts/release.sh | 22 | ||||
-rw-r--r-- | devscripts/show-downloads-statistics.py | 10 | ||||
-rw-r--r-- | devscripts/update-version.py | 8 | ||||
-rw-r--r-- | devscripts/zsh-completion.in | 6 | ||||
-rwxr-xr-x | devscripts/zsh-completion.py | 6 |
21 files changed, 69 insertions, 69 deletions
diff --git a/devscripts/bash-completion.in b/devscripts/bash-completion.in index 1bf41f2cc..21f52798e 100644 --- a/devscripts/bash-completion.in +++ b/devscripts/bash-completion.in @@ -1,4 +1,4 @@ -__youtube_dlc() +__yt_dlp() { local cur prev opts fileopts diropts keywords COMPREPLY=() @@ -26,4 +26,4 @@ __youtube_dlc() fi } -complete -F __youtube_dlc youtube-dlc +complete -F __yt_dlp yt-dlp diff --git a/devscripts/bash-completion.py b/devscripts/bash-completion.py index d68c9b1cc..66c3d14f7 100755 --- a/devscripts/bash-completion.py +++ b/devscripts/bash-completion.py @@ -6,9 +6,9 @@ from os.path import dirname as dirn import sys sys.path.insert(0, dirn(dirn((os.path.abspath(__file__))))) -import youtube_dlc +import yt_dlp -BASH_COMPLETION_FILE = "youtube-dlc.bash-completion" +BASH_COMPLETION_FILE = "yt-dlp.bash-completion" BASH_COMPLETION_TEMPLATE = "devscripts/bash-completion.in" @@ -26,5 +26,5 @@ def build_completion(opt_parser): f.write(filled_template) -parser = youtube_dlc.parseOpts()[0] +parser = yt_dlp.parseOpts()[0] build_completion(parser) diff --git a/devscripts/buildserver.py b/devscripts/buildserver.py index 62dbd2cb1..9b5305a67 100644 --- a/devscripts/buildserver.py +++ b/devscripts/buildserver.py @@ -12,7 +12,7 @@ import traceback import os.path sys.path.insert(0, os.path.dirname(os.path.dirname((os.path.abspath(__file__))))) -from youtube_dlc.compat import ( +from yt_dlp.compat import ( compat_input, compat_http_server, compat_str, @@ -325,7 +325,7 @@ class YoutubeDLBuilder(object): authorizedUsers = ['fraca7', 'phihag', 'rg3', 'FiloSottile', 'ytdl-org'] def __init__(self, **kwargs): - if self.repoName != 'youtube-dlc': + if self.repoName != 'yt-dlp': raise BuildError('Invalid repository "%s"' % self.repoName) if self.user not in self.authorizedUsers: raise HTTPError('Unauthorized user "%s"' % self.user, 401) diff --git a/devscripts/check-porn.py b/devscripts/check-porn.py index 68a33d823..5e0072468 100644 --- a/devscripts/check-porn.py +++ b/devscripts/check-porn.py @@ -15,8 +15,8 @@ import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from test.helper import gettestcases -from youtube_dlc.utils import compat_urllib_parse_urlparse -from youtube_dlc.utils import compat_urllib_request +from yt_dlp.utils import compat_urllib_parse_urlparse +from yt_dlp.utils import compat_urllib_request if len(sys.argv) > 1: METHOD = 'LIST' diff --git a/devscripts/create-github-release.py b/devscripts/create-github-release.py index 3e11be6fa..e5740f40e 100644 --- a/devscripts/create-github-release.py +++ b/devscripts/create-github-release.py @@ -14,13 +14,13 @@ import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -from youtube_dlc.compat import ( +from yt_dlp.compat import ( compat_basestring, compat_getpass, compat_print, compat_urllib_request, ) -from youtube_dlc.utils import ( +from yt_dlp.utils import ( make_HTTPS_handler, sanitized_Request, ) @@ -100,7 +100,7 @@ def main(): releaser = GitHubReleaser() new_release = releaser.create_release( - version, name='youtube-dlc %s' % version, body=body) + version, name='yt-dlp %s' % version, body=body) release_id = new_release['id'] for asset in os.listdir(build_path): diff --git a/devscripts/fish-completion.in b/devscripts/fish-completion.in index 4f08b6d4a..32938fbb4 100644 --- a/devscripts/fish-completion.in +++ b/devscripts/fish-completion.in @@ -2,4 +2,4 @@ {{commands}} -complete --command youtube-dlc --arguments ":ytfavorites :ytrecommended :ytsubscriptions :ytwatchlater :ythistory" +complete --command yt-dlp --arguments ":ytfavorites :ytrecommended :ytsubscriptions :ytwatchlater :ythistory" diff --git a/devscripts/fish-completion.py b/devscripts/fish-completion.py index be65f4340..1c91f722b 100755 --- a/devscripts/fish-completion.py +++ b/devscripts/fish-completion.py @@ -7,10 +7,10 @@ from os.path import dirname as dirn import sys sys.path.insert(0, dirn(dirn((os.path.abspath(__file__))))) -import youtube_dlc -from youtube_dlc.utils import shell_quote +import yt_dlp +from yt_dlp.utils import shell_quote -FISH_COMPLETION_FILE = 'youtube-dlc.fish' +FISH_COMPLETION_FILE = 'yt-dlp.fish' FISH_COMPLETION_TEMPLATE = 'devscripts/fish-completion.in' EXTRA_ARGS = { @@ -31,7 +31,7 @@ def build_completion(opt_parser): for group in opt_parser.option_groups: for option in group.option_list: long_option = option.get_opt_string().strip('-') - complete_cmd = ['complete', '--command', 'youtube-dlc', '--long-option', long_option] + complete_cmd = ['complete', '--command', 'yt-dlp', '--long-option', long_option] if option._short_opts: complete_cmd += ['--short-option', option._short_opts[0].strip('-')] if option.help != optparse.SUPPRESS_HELP: @@ -46,5 +46,5 @@ def build_completion(opt_parser): f.write(filled_template) -parser = youtube_dlc.parseOpts()[0] +parser = yt_dlp.parseOpts()[0] build_completion(parser) diff --git a/devscripts/generate_aes_testdata.py b/devscripts/generate_aes_testdata.py index c89bb547e..f9bb2ad3b 100644 --- a/devscripts/generate_aes_testdata.py +++ b/devscripts/generate_aes_testdata.py @@ -7,8 +7,8 @@ import os import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -from youtube_dlc.utils import intlist_to_bytes -from youtube_dlc.aes import aes_encrypt, key_expansion +from yt_dlp.utils import intlist_to_bytes +from yt_dlp.aes import aes_encrypt, key_expansion secret_msg = b'Secret message goes here' diff --git a/devscripts/gh-pages/add-version.py b/devscripts/gh-pages/add-version.py index 04588a5ee..9ea01374d 100755 --- a/devscripts/gh-pages/add-version.py +++ b/devscripts/gh-pages/add-version.py @@ -22,9 +22,9 @@ if 'signature' in versions_info: new_version = {} filenames = { - 'bin': 'youtube-dlc', - 'exe': 'youtube-dlc.exe', - 'tar': 'youtube-dlc-%s.tar.gz' % version} + 'bin': 'yt-dlp', + 'exe': 'yt-dlp.exe', + 'tar': 'yt-dlp-%s.tar.gz' % version} build_dir = os.path.join('..', '..', 'build', version) for key, filename in filenames.items(): url = 'https://yt-dl.org/downloads/%s/%s' % (version, filename) diff --git a/devscripts/gh-pages/update-feed.py b/devscripts/gh-pages/update-feed.py index b07f1e830..c9f2fdb07 100755 --- a/devscripts/gh-pages/update-feed.py +++ b/devscripts/gh-pages/update-feed.py @@ -11,24 +11,24 @@ atom_template = textwrap.dedent("""\ <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom"> <link rel="self" href="http://ytdl-org.github.io/youtube-dl/update/releases.atom" /> - <title>youtube-dlc releases</title> - <id>https://yt-dl.org/feed/youtube-dlc-updates-feed</id> + <title>yt-dlp releases</title> + <id>https://yt-dl.org/feed/yt-dlp-updates-feed</id> <updated>@TIMESTAMP@</updated> @ENTRIES@ </feed>""") entry_template = textwrap.dedent(""" <entry> - <id>https://yt-dl.org/feed/youtube-dlc-updates-feed/youtube-dlc-@VERSION@</id> + <id>https://yt-dl.org/feed/yt-dlp-updates-feed/yt-dlp-@VERSION@</id> <title>New version @VERSION@</title> - <link href="http://ytdl-org.github.io/youtube-dlc" /> + <link href="http://ytdl-org.github.io/yt-dlp" /> <content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> Downloads available at <a href="https://yt-dl.org/downloads/@VERSION@/">https://yt-dl.org/downloads/@VERSION@/</a> </div> </content> <author> - <name>The youtube-dlc maintainers</name> + <name>The yt-dlp maintainers</name> </author> <updated>@TIMESTAMP@</updated> </entry> diff --git a/devscripts/gh-pages/update-sites.py b/devscripts/gh-pages/update-sites.py index 38acb5d9a..b53685fcc 100755 --- a/devscripts/gh-pages/update-sites.py +++ b/devscripts/gh-pages/update-sites.py @@ -5,10 +5,10 @@ import sys import os import textwrap -# We must be able to import youtube_dlc +# We must be able to import yt_dlp sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) -import youtube_dlc +import yt_dlp def main(): @@ -16,7 +16,7 @@ def main(): template = tmplf.read() ie_htmls = [] - for ie in youtube_dlc.list_extractors(age_limit=None): + for ie in yt_dlp.list_extractors(age_limit=None): ie_html = '<b>{}</b>'.format(ie.IE_NAME) ie_desc = getattr(ie, 'IE_DESC', None) if ie_desc is False: diff --git a/devscripts/make_contributing.py b/devscripts/make_contributing.py index 80426fb0a..b0cacbc4b 100755 --- a/devscripts/make_contributing.py +++ b/devscripts/make_contributing.py @@ -21,7 +21,7 @@ def main(): bug_text = re.search( """ # r'(?s)#\s*BUGS\s*[^\n]*\s*(.*?)#\s*COPYRIGHT', readme).group(1) # dev_text = re.search( -# r'(?s)(#\s*DEVELOPER INSTRUCTIONS.*?)#\s*EMBEDDING youtube-dlc', +# r'(?s)(#\s*DEVELOPER INSTRUCTIONS.*?)#\s*EMBEDDING yt-dlp', """ readme).group(1) out = bug_text + dev_text diff --git a/devscripts/make_issue_template.py b/devscripts/make_issue_template.py index 37cb0d4ee..13f337c82 100644 --- a/devscripts/make_issue_template.py +++ b/devscripts/make_issue_template.py @@ -16,9 +16,9 @@ def main(): with io.open(infile, encoding='utf-8') as inf: issue_template_tmpl = inf.read() - # Get the version from youtube_dlc/version.py without importing the package - exec(compile(open('youtube_dlc/version.py').read(), - 'youtube_dlc/version.py', 'exec')) + # Get the version from yt_dlp/version.py without importing the package + exec(compile(open('yt_dlp/version.py').read(), + 'yt_dlp/version.py', 'exec')) out = issue_template_tmpl % {'version': locals()['__version__']} diff --git a/devscripts/make_lazy_extractors.py b/devscripts/make_lazy_extractors.py index c27ef9781..0ddaa3f83 100644 --- a/devscripts/make_lazy_extractors.py +++ b/devscripts/make_lazy_extractors.py @@ -14,8 +14,8 @@ lazy_extractors_filename = sys.argv[1] if os.path.exists(lazy_extractors_filename): os.remove(lazy_extractors_filename) -from youtube_dlc.extractor import _ALL_CLASSES -from youtube_dlc.extractor.common import InfoExtractor, SearchInfoExtractor +from yt_dlp.extractor import _ALL_CLASSES +from yt_dlp.extractor.common import InfoExtractor, SearchInfoExtractor with open('devscripts/lazy_load_template.py', 'rt') as f: module_template = f.read() diff --git a/devscripts/make_supportedsites.py b/devscripts/make_supportedsites.py index 0ae6f8aa3..12655bf89 100644 --- a/devscripts/make_supportedsites.py +++ b/devscripts/make_supportedsites.py @@ -7,10 +7,10 @@ import os import sys -# Import youtube_dlc +# Import yt_dlp ROOT_DIR = os.path.join(os.path.dirname(__file__), '..') sys.path.insert(0, ROOT_DIR) -import youtube_dlc +import yt_dlp def main(): @@ -33,7 +33,7 @@ def main(): ie_md += ' (Currently broken)' yield ie_md - ies = sorted(youtube_dlc.gen_extractors(), key=lambda i: i.IE_NAME.lower()) + ies = sorted(yt_dlp.gen_extractors(), key=lambda i: i.IE_NAME.lower()) out = '# Supported sites\n' + ''.join( ' - ' + md + '\n' for md in gen_ies_md(ies)) diff --git a/devscripts/prepare_manpage.py b/devscripts/prepare_manpage.py index 843ade482..4578a33ce 100644 --- a/devscripts/prepare_manpage.py +++ b/devscripts/prepare_manpage.py @@ -8,7 +8,7 @@ import re ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) README_FILE = os.path.join(ROOT_DIR, 'README.md') -PREFIX = r'''%youtube-dlc(1) +PREFIX = r'''%yt-dlp(1) # NAME @@ -16,7 +16,7 @@ youtube\-dl \- download videos from youtube.com or other video platforms # SYNOPSIS -**youtube-dlc** \[OPTIONS\] URL [URL...] +**yt-dlp** \[OPTIONS\] URL [URL...] ''' @@ -33,7 +33,7 @@ def main(): readme = f.read() readme = re.sub(r'(?s)^.*?(?=# DESCRIPTION)', '', readme) - readme = re.sub(r'\s+youtube-dlc \[OPTIONS\] URL \[URL\.\.\.\]', '', readme) + readme = re.sub(r'\s+yt-dlp \[OPTIONS\] URL \[URL\.\.\.\]', '', readme) readme = PREFIX + readme readme = filter_options(readme) diff --git a/devscripts/release.sh b/devscripts/release.sh index 2da2ac471..86294d56b 100755 --- a/devscripts/release.sh +++ b/devscripts/release.sh @@ -54,8 +54,8 @@ fi if [ ! -z "`git tag | grep "$version"`" ]; then echo 'ERROR: version already present'; exit 1; fi if [ ! -z "`git status --porcelain | grep -v CHANGELOG`" ]; then echo 'ERROR: the working directory is not clean; commit or stash changes'; exit 1; fi -useless_files=$(find youtube_dlc -type f -not -name '*.py') -if [ ! -z "$useless_files" ]; then echo "ERROR: Non-.py files in youtube_dlc: $useless_files"; exit 1; fi +useless_files=$(find yt_dlp -type f -not -name '*.py') +if [ ! -z "$useless_files" ]; then echo "ERROR: Non-.py files in yt_dlp: $useless_files"; exit 1; fi if [ ! -f "updates_key.pem" ]; then echo 'ERROR: updates_key.pem missing'; exit 1; fi if ! type pandoc >/dev/null 2>/dev/null; then echo 'ERROR: pandoc is missing'; exit 1; fi if ! python3 -c 'import rsa' 2>/dev/null; then echo 'ERROR: python3-rsa is missing'; exit 1; fi @@ -69,18 +69,18 @@ make clean if $skip_tests ; then echo 'SKIPPING TESTS' else - nosetests --verbose --with-coverage --cover-package=youtube_dlc --cover-html test --stop || exit 1 + nosetests --verbose --with-coverage --cover-package=yt_dlp --cover-html test --stop || exit 1 fi /bin/echo -e "\n### Changing version in version.py..." -sed -i "s/__version__ = '.*'/__version__ = '$version'/" youtube_dlc/version.py +sed -i "s/__version__ = '.*'/__version__ = '$version'/" yt_dlp/version.py /bin/echo -e "\n### Changing version in ChangeLog..." sed -i "s/<unreleased>/$version/" ChangeLog -/bin/echo -e "\n### Committing documentation, templates and youtube_dlc/version.py..." +/bin/echo -e "\n### Committing documentation, templates and yt_dlp/version.py..." make README.md CONTRIBUTING.md issuetemplates supportedsites -git add README.md CONTRIBUTING.md .github/ISSUE_TEMPLATE/1_broken_site.md .github/ISSUE_TEMPLATE/2_site_support_request.md .github/ISSUE_TEMPLATE/3_site_feature_request.md .github/ISSUE_TEMPLATE/4_bug_report.md .github/ISSUE_TEMPLATE/5_feature_request.md .github/ISSUE_TEMPLATE/6_question.md docs/supportedsites.md youtube_dlc/version.py ChangeLog +git add README.md CONTRIBUTING.md .github/ISSUE_TEMPLATE/1_broken_site.md .github/ISSUE_TEMPLATE/2_site_support_request.md .github/ISSUE_TEMPLATE/3_site_feature_request.md .github/ISSUE_TEMPLATE/4_bug_report.md .github/ISSUE_TEMPLATE/5_feature_request.md .github/ISSUE_TEMPLATE/6_question.md docs/supportedsites.md yt_dlp/version.py ChangeLog git commit $gpg_sign_commits -m "release $version" /bin/echo -e "\n### Now tagging, signing and pushing..." @@ -95,13 +95,13 @@ git push origin "$version" /bin/echo -e "\n### OK, now it is time to build the binaries..." REV=$(git rev-parse HEAD) -make youtube-dlc youtube-dlc.tar.gz +make yt-dlp yt-dlp.tar.gz read -p "VM running? (y/n) " -n 1 -wget "http://$buildserver/build/ytdl-org/youtube-dl/youtube-dlc.exe?rev=$REV" -O youtube-dlc.exe +wget "http://$buildserver/build/ytdl-org/youtube-dl/yt-dlp.exe?rev=$REV" -O yt-dlp.exe mkdir -p "build/$version" -mv youtube-dlc youtube-dlc.exe "build/$version" -mv youtube-dlc.tar.gz "build/$version/youtube-dlc-$version.tar.gz" -RELEASE_FILES="youtube-dlc youtube-dlc.exe youtube-dlc-$version.tar.gz" +mv yt-dlp yt-dlp.exe "build/$version" +mv yt-dlp.tar.gz "build/$version/yt-dlp-$version.tar.gz" +RELEASE_FILES="yt-dlp yt-dlp.exe yt-dlp-$version.tar.gz" (cd build/$version/ && md5sum $RELEASE_FILES > MD5SUMS) (cd build/$version/ && sha1sum $RELEASE_FILES > SHA1SUMS) (cd build/$version/ && sha256sum $RELEASE_FILES > SHA2-256SUMS) diff --git a/devscripts/show-downloads-statistics.py b/devscripts/show-downloads-statistics.py index b8c4269c4..e76f1e4c8 100644 --- a/devscripts/show-downloads-statistics.py +++ b/devscripts/show-downloads-statistics.py @@ -11,11 +11,11 @@ import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -from youtube_dlc.compat import ( +from yt_dlp.compat import ( compat_print, compat_urllib_request, ) -from youtube_dlc.utils import format_bytes +from yt_dlp.utils import format_bytes def format_size(bytes): @@ -38,9 +38,9 @@ for page in itertools.count(1): asset_name = asset['name'] total_bytes += asset['download_count'] * asset['size'] if all(not re.match(p, asset_name) for p in ( - r'^youtube-dlc$', - r'^youtube-dlc-\d{4}\.\d{2}\.\d{2}(?:\.\d+)?\.tar\.gz$', - r'^youtube-dlc\.exe$')): + r'^yt-dlp$', + r'^yt-dlp-\d{4}\.\d{2}\.\d{2}(?:\.\d+)?\.tar\.gz$', + r'^yt-dlp\.exe$')): continue compat_print( ' %s size: %s downloads: %d' diff --git a/devscripts/update-version.py b/devscripts/update-version.py index 54d2158a6..c6e7b5309 100644 --- a/devscripts/update-version.py +++ b/devscripts/update-version.py @@ -5,7 +5,7 @@ from datetime import datetime # response = urllib.request.urlopen('https://blackjack4494.github.io/youtube-dlc/update/LATEST_VERSION') # old_version = response.read().decode('utf-8') -exec(compile(open('youtube_dlc/version.py').read(), 'youtube_dlc/version.py', 'exec')) +exec(compile(open('yt_dlp/version.py').read(), 'yt_dlp/version.py', 'exec')) old_version = locals()['__version__'] old_version_list = old_version.split(".", 4) @@ -19,13 +19,13 @@ rev = str(int(old_rev or 0) + 1) if old_ver == ver else '' VERSION = '.'.join((ver, rev)) if rev else ver # VERSION_LIST = [(int(v) for v in ver.split(".") + [rev or 0])] -print('::set-output name=ytdlc_version::' + VERSION) +print('::set-output name=ytdlp_version::' + VERSION) -file_version_py = open('youtube_dlc/version.py', 'rt') +file_version_py = open('yt_dlp/version.py', 'rt') data = file_version_py.read() data = data.replace(old_version, VERSION) file_version_py.close() -file_version_py = open('youtube_dlc/version.py', 'wt') +file_version_py = open('yt_dlp/version.py', 'wt') file_version_py.write(data) file_version_py.close() diff --git a/devscripts/zsh-completion.in b/devscripts/zsh-completion.in index 2317f41df..9117d339e 100644 --- a/devscripts/zsh-completion.in +++ b/devscripts/zsh-completion.in @@ -1,6 +1,6 @@ -#compdef youtube-dlc +#compdef yt-dlp -__youtube_dlc() { +__yt_dlp() { local curcontext="$curcontext" fileopts diropts cur prev typeset -A opt_args fileopts="{{fileopts}}" @@ -27,4 +27,4 @@ __youtube_dlc() { esac } -__youtube_dlc
\ No newline at end of file +__yt_dlp
\ No newline at end of file diff --git a/devscripts/zsh-completion.py b/devscripts/zsh-completion.py index 8b957144f..92eac5873 100755 --- a/devscripts/zsh-completion.py +++ b/devscripts/zsh-completion.py @@ -6,9 +6,9 @@ from os.path import dirname as dirn import sys sys.path.insert(0, dirn(dirn((os.path.abspath(__file__))))) -import youtube_dlc +import yt_dlp -ZSH_COMPLETION_FILE = "youtube-dlc.zsh" +ZSH_COMPLETION_FILE = "yt-dlp.zsh" ZSH_COMPLETION_TEMPLATE = "devscripts/zsh-completion.in" @@ -45,5 +45,5 @@ def build_completion(opt_parser): f.write(template) -parser = youtube_dlc.parseOpts()[0] +parser = yt_dlp.parseOpts()[0] build_completion(parser) |