Packaging with flit
This commit is contained in:
parent
5125f1d6ba
commit
f22fe297c5
|
@ -2,4 +2,6 @@
|
||||||
*.pyc
|
*.pyc
|
||||||
__pycache__/
|
__pycache__/
|
||||||
.vscode/
|
.vscode/
|
||||||
*.mkv
|
*.mkv
|
||||||
|
dist/
|
||||||
|
.venv/
|
15
README.md
15
README.md
|
@ -14,20 +14,7 @@ ArteTV is a is a European public service channel dedicated to culture. Available
|
||||||
🚀 Quick start
|
🚀 Quick start
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
_(Linux/Debian distribution)_
|
_to be determined_
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo apt install ffmpeg
|
|
||||||
mkdir ~/.venvs && python3 -m venv ~/.venvs/delarte
|
|
||||||
source ~/.venvs/delarte/bin/activate
|
|
||||||
git clone https://gitlab.com/Barbagus/delarte.git && cd delarte
|
|
||||||
pip install -r requirements.txt
|
|
||||||
export PATH_FFMPEG=$(which ffmpeg)
|
|
||||||
```
|
|
||||||
|
|
||||||
```bash
|
|
||||||
./delarte.py <PROGRAM_PAGE_URL> <VERSION> <RESOLUTION>
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
🔧 How it works
|
🔧 How it works
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
[build-system]
|
||||||
|
requires = ["flit_core >=3.2,<4"]
|
||||||
|
build-backend = "flit_core.buildapi"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "delarte"
|
||||||
|
authors = [{name = "Etienne Zind", email = "etienne.zind@proton.me"}]
|
||||||
|
readme = "README.md"
|
||||||
|
license = {file = "LICENSE.md"}
|
||||||
|
classifiers = ["License :: OSI Approved :: GNU Affero General Public License v3"]
|
||||||
|
dynamic = ["version", "description"]
|
||||||
|
dependencies = [
|
||||||
|
"m3u8",
|
||||||
|
"webvtt-py",
|
||||||
|
]
|
||||||
|
|
||||||
|
[project.urls]
|
||||||
|
Home = "https://gitlab.com/Barbagus/delarte"
|
||||||
|
|
||||||
|
[project.optional-dependencies]
|
||||||
|
dev = [
|
||||||
|
"black",
|
||||||
|
"pydocstyle",
|
||||||
|
"toml"
|
||||||
|
]
|
||||||
|
|
||||||
|
[project.scripts]
|
||||||
|
delarte = "delarte:main"
|
|
@ -1,3 +0,0 @@
|
||||||
black
|
|
||||||
pydocstyle
|
|
||||||
toml
|
|
|
@ -1,2 +0,0 @@
|
||||||
m3u8
|
|
||||||
webvtt-py
|
|
|
@ -1,6 +1,3 @@
|
||||||
#!/usr/bin/env python3
|
|
||||||
# coding: utf8
|
|
||||||
|
|
||||||
"""delarte.
|
"""delarte.
|
||||||
|
|
||||||
ArteTV downloader
|
ArteTV downloader
|
||||||
|
@ -9,6 +6,7 @@ Licence: GNU AGPL v3: http://www.gnu.org/licenses/
|
||||||
|
|
||||||
This file is part of [`delarte`](https://gitlab.com/Barbagus/delarte)
|
This file is part of [`delarte`](https://gitlab.com/Barbagus/delarte)
|
||||||
"""
|
"""
|
||||||
|
__version__ = "0.1"
|
||||||
|
|
||||||
import io
|
import io
|
||||||
import json
|
import json
|
||||||
|
@ -190,7 +188,7 @@ def build_args(video_index_url, audio_track, subtitles_track, file_base_name):
|
||||||
if subtitles_track:
|
if subtitles_track:
|
||||||
subtitles_lang, subtitles_file = subtitles_track
|
subtitles_lang, subtitles_file = subtitles_track
|
||||||
|
|
||||||
args = [FFMPEG]
|
args = ["ffmpeg"]
|
||||||
args.extend(["-i", video_index_url])
|
args.extend(["-i", video_index_url])
|
||||||
args.extend(["-i", audio_index_url])
|
args.extend(["-i", audio_index_url])
|
||||||
if subtitles_track:
|
if subtitles_track:
|
||||||
|
@ -252,7 +250,3 @@ def main():
|
||||||
subprocess.run(args)
|
subprocess.run(args)
|
||||||
if subtitle_file:
|
if subtitle_file:
|
||||||
os.unlink(subtitle_file)
|
os.unlink(subtitle_file)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
sys.exit(main())
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
from . import main
|
||||||
|
|
||||||
|
main()
|
Loading…
Reference in New Issue