run: sudo apt-get -y install zip pandoc man
- name: Bump version
id: bump_version
- run: python scripts/update-version-workflow.py
- - name: Check the output from My action
+ run: python devscripts/update-version-workflow.py
+ - name: Check the version
run: echo "${{ steps.bump_version.outputs.ytdlc_version }}"
- name: Run Make
run: make
- name: Install Requirements
run: pip install pyinstaller
- name: Bump version
- run: python scripts/update-version-workflow.py
+ run: python devscripts/update-version-workflow.py
- name: Run PyInstaller Script
run: python pyinst.py
- name: Upload youtube-dlc.exe Windows binary
- name: Install Requirements for 32 Bit
run: pip install pyinstaller==3.5
- name: Bump version
- run: python scripts/update-version-workflow.py
+ run: python devscripts/update-version-workflow.py
- name: Run PyInstaller Script for 32 Bit
run: python pyinst32.py
- name: Upload Executable youtube-dlc_x86.exe
+# Python
*.pyc
*.pyo
-*.class
-*~
-*.DS_Store
wine-py2exe/
py2exe.log
-*.kate-swp
build/
dist/
zip/
+tmp/
+venv/
+
+# Misc
+*~
+*.DS_Store
+*.kate-swp
MANIFEST
-README.txt
-youtube-dl.1
-youtube-dlc.1
-youtube-dl.bash-completion
-youtube-dlc.bash-completion
-youtube-dl.fish
-youtube-dlc.fish
-youtube_dl/extractor/lazy_extractors.py
-youtube_dlc/extractor/lazy_extractors.py
-youtube-dl
-youtube-dlc
-youtube-dl.exe
-youtube-dlc.exe
-youtube-dl.tar.gz
-youtube-dlc.tar.gz
-youtube-dlc.spec
+test/local_parameters.json
.coverage
cover/
updates_key.pem
*.egg-info
+.tox
+*.class
+
+# Generated
+README.txt
+*.1
+*.bash-completion
+*.fish
+*.exe
+*.tar.gz
+*.zsh
+*.spec
+
+# Binary
+youtube-dl
+youtube-dlc
+*.exe
+
+# Downloaded
*.srt
*.ttml
*.sbv
*.swf
*.part
*.ytdl
-*.conf
*.swp
+*.ogg
+*.opus
+
+# Config
+*.conf
*.spec
-*.exe
-test/local_parameters.json
-.tox
-youtube-dl.zsh
-youtube-dlc.zsh
+cookies
+cookies.txt
-# IntelliJ related files
-.idea
-*.iml
-tmp/
-venv/
-# VS Code related files
+# Text Editor / IDE
+.idea
+*.iml
.vscode
-
-# SublimeText files
*.sublime-workspace
+*.sublime-project
+!yt-dlp.sublime-project
-# Cookies
-cookies
-cookies.txt
+# Lazy extractors
+*/extractor/lazy_extractors.py
# Plugins
ytdlp_plugins/extractor/*
from __future__ import unicode_literals
from datetime import datetime
+# import urllib.request
-exec(compile(open('youtube_dlc/version.py').read(), 'youtube_dlc/version.py', 'exec'))
+# response = urllib.request.urlopen('https://blackjack4494.github.io/youtube-dlc/update/LATEST_VERSION')
+# _LATEST_VERSION = response.read().decode('utf-8')
+exec(compile(open('youtube_dlc/version.py').read(), 'youtube_dlc/version.py', 'exec'))
_LATEST_VERSION = locals()['__version__']
_OLD_VERSION = _LATEST_VERSION.replace('-', '.').split(".", 4)
+++ /dev/null
-# Unused
-
-from __future__ import unicode_literals
-from datetime import datetime
-import urllib.request
-
-response = urllib.request.urlopen('https://blackjack4494.github.io/youtube-dlc/update/LATEST_VERSION')
-
-_LATEST_VERSION = response.read().decode('utf-8')
-
-_OLD_VERSION = _LATEST_VERSION.rsplit("-", 1)
-
-if len(_OLD_VERSION) > 0:
- old_ver = _OLD_VERSION[0]
-
-old_rev = ''
-if len(_OLD_VERSION) > 1:
- old_rev = _OLD_VERSION[1]
-
-now = datetime.now()
-# ver = f'{datetime.today():%Y.%m.%d}'
-ver = now.strftime("%Y.%m.%d")
-rev = ''
-
-if old_ver == ver:
- if old_rev:
- rev = int(old_rev) + 1
- else:
- rev = 1
-
-_SEPARATOR = '-'
-
-version = _SEPARATOR.join(filter(None, [ver, str(rev)]))
universal = True
[flake8]
-exclude = youtube_dlc/extractor/__init__.py,devscripts/buildserver.py,devscripts/lazy_load_template.py,devscripts/make_issue_template.py,setup.py,build,.git,venv,devscripts/create-github-release.py,devscripts/release.sh,devscripts/show-downloads-statistics.py,scripts/update-version.py
+exclude = youtube_dlc/extractor/__init__.py,devscripts/buildserver.py,devscripts/lazy_load_template.py,devscripts/make_issue_template.py,setup.py,build,.git,venv,devscripts/create-github-release.py,devscripts/release.sh,devscripts/show-downloads-statistics.py
ignore = E402,E501,E731,E741,W503
\ No newline at end of file
params = {
'data_files': data_files,
}
- #if setuptools_available:
params['entry_points'] = {'console_scripts': ['youtube-dlc = youtube_dlc:main']}
- #else:
- # params['scripts'] = ['bin/youtube-dlc']
+
class build_lazy_extractors(Command):
description = 'Build the extractor lazy loading module'
dry_run=self.dry_run,
)
+
+packages = find_packages(exclude=("youtube_dl","test",))
+
setup(
name="yt-dlp",
version=__version__,
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",
url="https://github.com/pukkandan/yt-dlp",
- packages=find_packages(exclude=("youtube_dl","test",)),
+ packages=packages,
project_urls={
'Documentation': 'https://github.com/pukkandan/yt-dlp#yt-dlp',
'Source': 'https://github.com/pukkandan/yt-dlp',
if not ensure_dir_exists(encodeFilename(infofn)):
return
if self.params.get('overwrites', True) and os.path.exists(encodeFilename(infofn)):
- self.to_screen('[info] Playlist description metadata is already present')
+ self.to_screen('[info] Playlist metadata is already present')
else:
- self.to_screen('[info] Writing description playlist metadata as JSON to: ' + infofn)
+ self.to_screen('[info] Writing playlist metadata as JSON to: ' + infofn)
playlist_info = dict(ie_result)
playlist_info.pop('entries')
try:
write_json_file(self.filter_requested_info(playlist_info), infofn)
except (OSError, IOError):
- self.report_error('Cannot write playlist description metadata to JSON file ' + infofn)
+ self.report_error('Cannot write playlist metadata to JSON file ' + infofn)
if self.params.get('writedescription', False):
descfn = replace_extension(
if not ensure_dir_exists(encodeFilename(infofn)):
return
if not self.params.get('overwrites', True) and os.path.exists(encodeFilename(infofn)):
- self.to_screen('[info] Video description metadata is already present')
+ self.to_screen('[info] Video metadata is already present')
else:
- self.to_screen('[info] Writing video description metadata as JSON to: ' + infofn)
+ self.to_screen('[info] Writing video metadata as JSON to: ' + infofn)
try:
write_json_file(self.filter_requested_info(info_dict), infofn)
except (OSError, IOError):
- self.report_error('Cannot write metadata to JSON file ' + infofn)
+ self.report_error('Cannot write video metadata to JSON file ' + infofn)
return
info_dict['__infojson_filepath'] = infofn
except ImportError:
NFLTokenGenerator = None
+
def md5_text(s):
if not isinstance(s, compat_str):
s = compat_str(s)
def get_continuation(continuation, session_token, replies=False):
query = {
- 'pbj': 1,
- 'ctoken': continuation,
+ 'pbj': 1,
+ 'ctoken': continuation,
}
if replies:
query['action_get_comment_replies'] = 1
elif info['ext'] in ['ogg', 'opus']:
if not _has_mutagen:
- raise EmbedThumbnailPPError('module mutagen was not found. Please install.')
+ raise EmbedThumbnailPPError('module mutagen was not found. Please install')
size_regex = r',\s*(?P<w>\d+)x(?P<h>\d+)\s*[,\[]'
size_result = self.run_ffmpeg(thumbnail_filename, thumbnail_filename, ['-hide_banner'])
mobj = re.search(size_regex, size_result)