From 49ff03497ec1ee9a9d1014124776010504afce72 Mon Sep 17 00:00:00 2001 From: BingLingFanSub Date: Wed, 31 Jul 2019 20:41:56 +0800 Subject: [PATCH] Docs bump version and release autosub-0.5.1-alpha --- CHANGELOG.md | 18 ++++++++++++++++++ README.md | 6 +++--- autosub/metadata.py | 2 +- docs/CHANGELOG.zh-Hans.md | 18 +++++++++++++++++- scripts/create_release.py | 12 +++++++++--- scripts/nuitka_build.bat | 9 ++++----- 6 files changed, 52 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16e04dbc..a863233f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## TOC +- [[0.5.1-alpha] - 2019-07-31](#051-alpha---2019-07-31) + - [Added](#added051-alpha) + - [Changed](#changed051-alpha) - [[0.5.0-alpha] - 2019-07-27](#050-alpha---2019-07-27) - [Added](#added050-alpha) - [Changed](#changed050-alpha) @@ -20,6 +23,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Click up arrow to go back to TOC. +### [0.5.1-alpha] - 2019-07-31 + +#### Added(0.5.1-alpha) + +- Add translation source lang code auto match. + +#### Changed(0.5.1-alpha) + +- Fix method list_to_googletrans index error bug. +- Fix unix subprocess.check_output compatibility. [issue #47](https://github.com/BingLingGroup/autosub/issues/47) + + ↑  + ### [0.5.0-alpha] - 2019-07-27 #### Added(0.5.0-alpha) @@ -54,6 +70,8 @@ Click up arrow to go back to TOC. - Add i18n support. [issue #9](https://github.com/BingLingGroup/autosub/issues/9) - Add i18n language choice. [issue #45](https://github.com/BingLingGroup/autosub/issues/45) + ↑  + #### Changed(0.5.0-alpha) - [issue #5](https://github.com/BingLingGroup/autosub/issues/5). diff --git a/README.md b/README.md index 415b9af4..ce984362 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Click up arrow to go back to TOC. Autosub is an automatic subtitles generating utility. It can detect speech regions automatically by using Auditok, split the audio files according to regions by using ffmpeg, transcribe speech based on [Google-Speech-v2](https://github.com/gillesdemey/google-speech-v2)([Chrome-Web-Speech-api](https://github.com/agermanidis/autosub/issues/1)) and translate the subtitles' text by using py-googletrans. It currently not supports the latest Google Cloud APIs. -The new features mentioned above are only available after autosub-0.5.0a (0.5.0-alpha). Not available on PyPI or the original repo. +The new features mentioned above are only available after autosub-0.5.1a (0.5.0-alpha). Not available on PyPI or the original repo. ### License @@ -120,7 +120,7 @@ Due to the autosub PyPI project is maintained by the original autosub repo's own Include dependencies installation commands. -Install from `alpha` branch.(autosub-0.5.0a) +Install from `alpha` branch.(autosub-0.5.1a) ```bash apt install ffmpeg python python-pip git -y @@ -163,7 +163,7 @@ Choco installation command is for cmd.(not Powershell) @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" ``` -Install from `alpha` branch.(autosub-0.5.0a) +Install from `alpha` branch.(autosub-0.5.1a) ```batch choco install git python2 curl ffmpeg -y diff --git a/autosub/metadata.py b/autosub/metadata.py index 4c945255..d670c51d 100644 --- a/autosub/metadata.py +++ b/autosub/metadata.py @@ -12,7 +12,7 @@ # For gettext po files NAME = 'autosub' -VERSION = '0.5.0-alpha' +VERSION = '0.5.1-alpha' DESCRIPTION = _('Auto-generate subtitles for video/audio/subtitles file.') LONG_DESCRIPTION = ( _('Autosub is an automatic subtitles generating utility. ' diff --git a/docs/CHANGELOG.zh-Hans.md b/docs/CHANGELOG.zh-Hans.md index 8b75e903..d8362921 100644 --- a/docs/CHANGELOG.zh-Hans.md +++ b/docs/CHANGELOG.zh-Hans.md @@ -8,6 +8,9 @@ ## 目录 +- [[0.5.1-alpha] - 2019-07-31](#051-alpha---2019-07-27) + - [添加](#添加050-alpha) + - [改动](#改动050-alpha) - [[0.5.0-alpha] - 2019-07-27](#050-alpha---2019-07-27) - [添加](#添加050-alpha) - [改动](#改动050-alpha) @@ -19,7 +22,20 @@ 点击上箭头以返回目录。 -### [[0.5.0-alpha] - 2019-07-27] +### [0.5.1-alpha] - 2019-07-31 + +#### 添加(0.5.1-alpha) + +- 添加翻译源语言代码自动匹配功能。 + +#### 改动(0.5.1-alpha) + +- 修复方法list_to_googletrans的列表越界bug。 +- 修复unix subprocess.check_output的兼容性问题。[issue #47](https://github.com/BingLingGroup/autosub/issues/47) + + ↑  + +### [0.5.0-alpha] - 2019-07-27 #### 添加(0.5.0-alpha) diff --git a/scripts/create_release.py b/scripts/create_release.py index 603ce3da..cdd451e5 100644 --- a/scripts/create_release.py +++ b/scripts/create_release.py @@ -46,9 +46,15 @@ def copytree(src, release_name = "autosub" package_name = release_name + here = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) + os.chdir(here) + pyinstaller_dist_path = ".build_and_dist/pyinstaller.build" + dist_path = ".build_and_dist" + + if not os.path.isdir(dist_path): + os.makedirs(dist_path) + metadata = {} - os.chdir(os.pardir) - here = os.getcwd() with open(os.path.join(here, package_name, "metadata.py")) as metafile: exec(metafile.read(), metadata) @@ -64,6 +70,7 @@ def copytree(src, shutil.rmtree(target_pyi) os.makedirs(target_pyi) command = "pipreqs --encoding=utf-8 --force --savepath requirements.txt {}".format(package_name) + print(command) if sys.platform.startswith('win'): args = command else: @@ -103,7 +110,6 @@ def copytree(src, shutil.copy2("binaries/ffprobe.exe", target_nuitka) shutil.copy2("binaries/ffmpeg.exe", target_pyi) shutil.copy2("binaries/ffprobe.exe", target_pyi) - command = "7z a -sdel \".release/{release_name}-{version}-win-x64.7z\" \"{target}\"".format( release_name=release_name, version=metadata['VERSION'], diff --git a/scripts/nuitka_build.bat b/scripts/nuitka_build.bat index 7394802d..83241906 100644 --- a/scripts/nuitka_build.bat +++ b/scripts/nuitka_build.bat @@ -1,12 +1,11 @@ @echo off -set output_dir="../.build_and_dist/" -set icon_dir="../docs/icon/autosub.ico" -set package_name="autosub" +set "output_dir=.build_and_dist/" +set "icon_dir=docs/icon/autosub.ico" +set "package_name=autosub" @echo on cd %~dp0 call update_requirements.bat cd ..\ pip install -r requirements.txt -cd scripts -nuitka "../%package_name:~1,-1%" --standalone --output-dir %output_dir% --show-progress --show-scons --show-modules --windows-icon=%icon_dir% --recurse-to=multiprocessing --plugin-enable=multiprocessing --lto --assume-yes-for-downloads \ No newline at end of file +nuitka "%package_name%" --standalone --output-dir %output_dir% --show-progress --show-scons --show-modules --windows-icon=%icon_dir% --recurse-to=multiprocessing --plugin-enable=multiprocessing --lto --assume-yes-for-downloads \ No newline at end of file