forked from zk4/m3u8_dl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
86 lines (55 loc) · 1.62 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
rm:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -type d -iname '*egg-info' -exec rm -rdf {} +
rm -f .coverage
rm -rf htmlcov
rm -rf dist
rm -rf build
rm -rf proxy.py.egg-info
rm -rf .pytest_cache
rm -rf .hypothesis
rm -rdf assets
test: rm
pytest -s -v tests/
coverage-html:
# --cov where you want to cover
# tests where your test code is
pytest --cov=m3_dl/ --cov-report=html tests/
open htmlcov/index.html
coverage:
pytest --cov=m3_dl/ tests/
install: uninstall
pip3 install .
uninstall:
pip3 uninstall -y m3_dl
dev:
python3 -m m3_dl "https://edu.51cto.com//center/player/play/m3u8?lesson_id=348911&id=345643&dp=high&type=course&lesson_type=course" -d -k | mpv -
run:
python3 -m m3_dl ./index-v1-a1.m3u8 -k -w -o "./a.mp4" -p "socks5h://127.0.0.1:5993" -t 10
stream:
python3 -m m3_dl "https://doubanzyv1.tyswmp.com/2018/07/26/0vhyINWfXeWIkrJd/playlist.m3u8" -k | mpv -
all: rm uninstall install run
pure-all: env-rm rm env install test run
upload-to-test: rm
python3 setup.py bdist_wheel --universal
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
upload-to-prod: rm auto_version
python3 setup.py bdist_wheel --universal
twine upload dist/*
freeze-only:
# pipreqs will find the module the project really depneds
pipreqs . --force
freeze:
# pip3 will find all the module not belong to standard library
pip3 freeze > requirements.txt
env-rm:
rm -rdf env
env:
python3 -m venv env
. env/bin/activate
convert:
ffmpeg -i anjia12.mkv -codec copy anjia12_mp4.mp4
auto_version:
python version.py