Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Commit

Permalink
Merge pull request #72 from FlorianCassayre/release-github-actions
Browse files Browse the repository at this point in the history
Automate release process through GitHub Actions
  • Loading branch information
Battleman committed Dec 16, 2021
2 parents 6332132 + 5470fc5 commit 2e2d433
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 9 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on:
release:
types:
- created
name: Release
jobs:
generate:
name: Create release artifacts
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
cache: 'pip'
- name: Install requirements
run: pip install -r requirements.txt
- name: Build the Linux/OSX executable
run: ./devscripts.sh build
- name: Build the Windows executable
uses: JackMcKew/pyinstaller-action-windows@main
with:
path: zoom_dl
requirements: ../requirements.txt
- name: Move the executables
run: mv zoom_dl/dist/windows/zoomdl.exe .
- name: Upload the artifacts
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: 'zoomdl zoomdl.exe'
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ build/
dist/
*.exe.spec
.vscode
quick_dl.py
quick_dl.py
zoomdl
zoomdl.exe
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
requests==2.23
#clint==0.5.1
demjson==2.2.4
demjson3==3.0.5
tqdm==4.50.2
# browser_cookie3==0.11.4
14 changes: 7 additions & 7 deletions zoom_dl/zoomdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import re
import sys

import demjson
import demjson3
import requests
from tqdm import tqdm
from typing import Optional
Expand Down Expand Up @@ -90,8 +90,8 @@ def get_page_meta(self) -> Optional[dict]:
self.page.text)
if meta2_match is not None:
try:
meta2 = demjson.decode(meta2_match.group(1))
except demjson.JSONDecodeError:
meta2 = demjson3.decode(meta2_match.group(1))
except demjson3.JSONDecodeError:
self._print("[WARNING] Error with the meta parsing. This "
"should not be critical. Please contact a dev.", 2)
meta.update(meta2)
Expand All @@ -107,9 +107,9 @@ def get_page_meta(self) -> Optional[dict]:
if len(chat_match) > 0:
for matched_json in chat_match:
try:
message = demjson.decode(matched_json)
message = demjson3.decode(matched_json)
chats.append(message)
except demjson.JSONDecodeError:
except demjson3.JSONDecodeError:
self._print("[WARNING] Error with the meta parsing. This "
"should not be critical. "
"Please contact a dev.", 2)
Expand All @@ -125,9 +125,9 @@ def get_page_meta(self) -> Optional[dict]:
if len(transcript_match) > 0:
for matched_json in transcript_match:
try:
message = demjson.decode(matched_json)
message = demjson3.decode(matched_json)
transcripts.append(message)
except demjson.JSONDecodeError:
except demjson3.JSONDecodeError:
self._print("[WARNING] Error with the meta parsing. This "
"should not be critical. "
"Please contact a dev.", 2)
Expand Down
39 changes: 39 additions & 0 deletions zoom_dl/zoomdl.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# -*- mode: python ; coding: utf-8 -*-


block_cipher = None


a = Analysis(['__main__.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)

exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='zoomdl',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None )
Binary file removed zoomdl
Binary file not shown.
Binary file removed zoomdl.exe
Binary file not shown.

0 comments on commit 2e2d433

Please sign in to comment.