├── .gitignore
├── LICENSE
├── README.md
├── Screenshot1.png
├── Screenshot2.png
├── build.sh
├── docs
├── Makefile
├── conf.py
├── index.md
└── make.bat
├── playwithmpv
├── __init__.py
├── __main__.py
├── __version__.py
└── server.py
├── poetry.lock
├── pyproject.toml
├── requirements_dev.txt
└── setup.py
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *.py[cod]
4 | *$py.class
5 |
6 | # C extensions
7 | *.so
8 |
9 | # Distribution / packaging
10 | .Python
11 | build/
12 | develop-eggs/
13 | dist/
14 | downloads/
15 | eggs/
16 | .eggs/
17 | lib/
18 | lib64/
19 | parts/
20 | sdist/
21 | var/
22 | wheels/
23 | pip-wheel-metadata/
24 | share/python-wheels/
25 | *.egg-info/
26 | .installed.cfg
27 | *.egg
28 | MANIFEST
29 |
30 | # PyInstaller
31 | # Usually these files are written by a python script from a template
32 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
33 | *.manifest
34 | *.spec
35 |
36 | # Installer logs
37 | pip-log.txt
38 | pip-delete-this-directory.txt
39 |
40 | # Unit test / coverage reports
41 | htmlcov/
42 | .tox/
43 | .nox/
44 | .coverage
45 | .coverage.*
46 | .cache
47 | nosetests.xml
48 | coverage.xml
49 | *.cover
50 | *.py,cover
51 | .hypothesis/
52 | .pytest_cache/
53 |
54 | # Translations
55 | *.mo
56 | *.pot
57 |
58 | # Django stuff:
59 | *.log
60 | local_settings.py
61 | db.sqlite3
62 | db.sqlite3-journal
63 |
64 | # Flask stuff:
65 | instance/
66 | .webassets-cache
67 |
68 | # Scrapy stuff:
69 | .scrapy
70 |
71 | # Sphinx documentation
72 | docs/_build/
73 |
74 | # PyBuilder
75 | target/
76 |
77 | # Jupyter Notebook
78 | .ipynb_checkpoints
79 |
80 | # IPython
81 | profile_default/
82 | ipython_config.py
83 |
84 | # pyenv
85 | .python-version
86 |
87 | # pipenv
88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies
90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not
91 | # install all needed dependencies.
92 | #Pipfile.lock
93 |
94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow
95 | __pypackages__/
96 |
97 | # Celery stuff
98 | celerybeat-schedule
99 | celerybeat.pid
100 |
101 | # SageMath parsed files
102 | *.sage.py
103 |
104 | # Environments
105 | .env
106 | .venv
107 | env/
108 | venv/
109 | ENV/
110 | env.bak/
111 | venv.bak/
112 |
113 | # Spyder project settings
114 | .spyderproject
115 | .spyproject
116 |
117 | # Rope project settings
118 | .ropeproject
119 |
120 | # mkdocs documentation
121 | /site
122 |
123 | # mypy
124 | .mypy_cache/
125 | .dmypy.json
126 | dmypy.json
127 |
128 | # Pyre type checker
129 | .pyre/
130 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 playallinmpv
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # PlayWithMpv
2 | A server to support playing videos with mpv. Currently this project mainly
3 | supports for bilibili.com based on Tampermonkey-script [Bilibili-Evolved](https://github.com/the1812/Bilibili-Evolved) (version `2.1.3`)
4 |
5 | 
6 |
7 |
8 | You can also read the [playwithmpv文档](https://playwithmpv.readthedocs.io/en/latest/) in the ReadtheDocs.
9 |
10 |
11 | ## Preparation
12 |
13 | 1. Install [MPV](https://mpv.io/installation/) or [MPV-lazy](https://github.com/hooke007/MPV_lazy) (If you're newer, strongly recommend MPV-lazy.)
14 | 2. Install Tampermonkey-scrip [Bilibili-Evolved](https://github.com/the1812/Bilibili-Evolved) (version `2.1.3`)
15 | - Add “下载视频” 组件 in [Bilibili-Evolved](https://github.com/the1812/Bilibili-Evolved)
16 | - Add “下载视频 - MPV 播放支持(列表)” 插件 in [Bilibili-Evolved](https://github.com/the1812/Bilibili-Evolved)
17 | 3. Install [Python3](https://www.python.org/downloads/) (>=3.8)
18 |
19 |
20 |
21 |
22 | ## Installation
23 |
24 | Just run `pip install playwithmpv --user`
25 |
26 |
27 |
28 |
29 | ## Usage
30 |
31 | 1. open the terminal, run `playwithmpv` to start the server.
32 | 2. On Bilibili-Evolved:
33 | - 打开 **下载视频**
34 | - 格式选 **flv** (如若不可用,先选其他格式,再选回来)
35 | - 输出方式选 **MPV播放**
36 | - 若mpv 命令路径已加入环境变量, 默认设置就好,不用更改
37 | 3. Click **开始** and enjoy.
38 |
39 | 
40 |
41 |
42 |
43 |
44 | ## Autostart
45 |
46 | - Linux: copy the script to `~/.config/autostart`
47 | - MacOs: [method](https://stackoverflow.com/questions/29338066/run-python-script-at-os-x-startup)
48 | - Windows: [method](https://stackoverflow.com/questions/4438020/how-to-start-a-python-file-while-windows-starts)
49 |
50 |
51 |
52 |
53 | ## BTW
54 | If you are interest in watching bangumi with MPV, could see:
55 |
56 | - [A High-Quality Real Time Upscaler for Anime Video](https://github.com/bloc97/Anime4K)
57 | - [MPV FOR ANIME](https://luukuton.fi/article/mpv-for-anime)
58 | - [MPV-lazy小站](https://hooke007.github.io/)
59 | - [How Do I Get The Best SVP4 Settings?](https://www.svp-team.com/forum/viewtopic.php?pid=61292)
60 |
61 | > Why use MPV?
62 | > BTW, I think MPV is a so strong and free tool that can be easily for stream vidoes,
63 | > user shaders and movement enhacement etc.
64 | > The last one using SVP4 as movement enhacement, if you config SVP as the article said and make it work.
65 | > Congratulation, a new world is there.Wooss.
66 |
--------------------------------------------------------------------------------
/Screenshot1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/videoanywhere/playwithmpv/34dca5ee55ee2bac3e217949ade733705d2d7a67/Screenshot1.png
--------------------------------------------------------------------------------
/Screenshot2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/videoanywhere/playwithmpv/34dca5ee55ee2bac3e217949ade733705d2d7a67/Screenshot2.png
--------------------------------------------------------------------------------
/build.sh:
--------------------------------------------------------------------------------
1 | #! /bin/bash
2 | rm -r build/ dist/ playwithmpv.egg-info/
3 | python setup.py sdist bdist_wheel
4 | twine upload --repository-url https://test.pypi.org/legacy/ dist/*
5 | twine upload dist/*
6 |
--------------------------------------------------------------------------------
/docs/Makefile:
--------------------------------------------------------------------------------
1 | # Minimal makefile for Sphinx documentation
2 | #
3 |
4 | # You can set these variables from the command line, and also
5 | # from the environment for the first two.
6 | SPHINXOPTS ?=
7 | SPHINXBUILD ?= sphinx-build
8 | SOURCEDIR = .
9 | BUILDDIR = _build
10 |
11 | # Put it first so that "make" without argument is like "make help".
12 | help:
13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14 |
15 | .PHONY: help Makefile
16 |
17 | # Catch-all target: route all unknown targets to Sphinx using the new
18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19 | %: Makefile
20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21 |
--------------------------------------------------------------------------------
/docs/conf.py:
--------------------------------------------------------------------------------
1 | # Configuration file for the Sphinx documentation builder.
2 | #
3 | # This file only contains a selection of the most common options. For a full
4 | # list see the documentation:
5 | # https://www.sphinx-doc.org/en/master/usage/configuration.html
6 |
7 | # -- Path setup --------------------------------------------------------------
8 |
9 | # If extensions (or modules to document with autodoc) are in another directory,
10 | # add these directories to sys.path here. If the directory is relative to the
11 | # documentation root, use os.path.abspath to make it absolute, like shown here.
12 | #
13 | # import os
14 | # import sys
15 | # sys.path.insert(0, os.path.abspath('.'))
16 |
17 |
18 | # -- Project information -----------------------------------------------------
19 |
20 | project = 'playwithmpv'
21 | copyright = '2022, Wullic'
22 | author = 'Wullic'
23 |
24 | # The full version, including alpha/beta/rc tags
25 | release = '0.1.3'
26 |
27 |
28 | # -- General configuration ---------------------------------------------------
29 |
30 | # Add any Sphinx extension module names here, as strings. They can be
31 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
32 | # ones.
33 | extensions = [ 'myst_parser',
34 | ]
35 |
36 | # Add any paths that contain templates here, relative to this directory.
37 | templates_path = ['_templates']
38 |
39 | # The language for content autogenerated by Sphinx. Refer to documentation
40 | # for a list of supported languages.
41 | #
42 | # This is also used if you do content translation via gettext catalogs.
43 | # Usually you set "language" from the command line for these cases.
44 | language = 'zh_CN'
45 |
46 | # List of patterns, relative to source directory, that match files and
47 | # directories to ignore when looking for source files.
48 | # This pattern also affects html_static_path and html_extra_path.
49 | exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
50 |
51 |
52 | # -- Options for HTML output -------------------------------------------------
53 |
54 | # The theme to use for HTML and HTML Help pages. See the documentation for
55 | # a list of builtin themes.
56 | #
57 | # Nice enouogh
58 | # html_theme = 'alabaster'
59 | html_theme = "sphinx_rtd_theme"
60 |
61 | # Add any paths that contain custom static files (such as style sheets) here,
62 | # relative to this directory. They are copied after the builtin static files,
63 | # so a file named "default.css" will overwrite the builtin "default.css".
64 | html_static_path = ['_static']
65 |
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | # PlayWithMpv
2 |
3 | A server to support playing videos with mpv. Currently this project mainly
4 | supports for bilibili.com based on Tampermonkey-script [Bilibili-Evolved](https://github.com/the1812/Bilibili-Evolved) (version `2.0.8`)
5 |
6 | 
7 |
8 |
9 |
10 | ## Preparation
11 |
12 | 1. Install [MPV](https://mpv.io/installation/) or [MPV-lazy](https://github.com/hooke007/MPV_lazy) (If you're newer, strongly recommend MPV-lazy.)
13 | 2. Install Tampermonkey-scrip [Bilibili-Evolved](https://github.com/the1812/Bilibili-Evolved)
14 | - Add “下载视频” 组件 in [Bilibili-Evolved](https://github.com/the1812/Bilibili-Evolved)
15 | - Add [mpv-output-playlist.js插件](https://pan.baidu.com/s/1-Bd_e-irW1Y1H0Ofm0S7BA?pwd=gqvp) (提取码是gqvp)
16 | - ( **注意:不是在线仓库的那个MPV插件,目前需要把mpv-output-playlist.js插件下载下来,手动浏览导入进去** )
17 | 3. Install [Python3](https://www.python.org/downloads/) (>=3.8)
18 |
19 |
20 |
21 |
22 | ## Installation
23 |
24 | Just run `pip install playwithmpv --user`
25 |
26 |
27 |
28 |
29 | ## Usage
30 |
31 | 1. open the terminal, run `playwithmpv` to start the server.
32 | 2. On Bilibili-Evolved:
33 | - 打开 **下载视频**
34 | - 格式选 **flv** (如若不可用,先选其他格式,再选回来)
35 | - 输出方式选 **MPV播放**
36 | - 若mpv 命令路径已加入环境变量, 默认设置就好,不用更改
37 | 3. Click **开始** and enjoy.
38 |
39 | 
40 |
41 |
42 |
43 |
44 | ## Autostart
45 |
46 | - Linux: copy the script to `~/.config/autostart`
47 | - MacOs: [method](https://stackoverflow.com/questions/29338066/run-python-script-at-os-x-startup)
48 | - Windows: [method](https://stackoverflow.com/questions/4438020/how-to-start-a-python-file-while-windows-starts)
49 |
50 |
51 |
52 |
53 | ## BTW
54 | If you are interest in watching bangumi with MPV, could see:
55 |
56 | - [A High-Quality Real Time Upscaler for Anime Video](https://github.com/bloc97/Anime4K)
57 | - [MPV FOR ANIME](https://luukuton.fi/article/mpv-for-anime)
58 | - [MPV-lazy小站](https://hooke007.github.io/)
59 | - [How Do I Get The Best SVP4 Settings?](https://www.svp-team.com/forum/viewtopic.php?pid=61292)
60 |
61 | > Why use MPV?
62 | > BTW, I think MPV is a so strong and free tool that can be easily for stream vidoes,
63 | > user shaders and movement enhacement etc.
64 | > The last one using SVP4 as movement enhacement, if you config SVP as the article said and make it work.
65 | > Congratulation, a new world is there.Wooss.
66 |
--------------------------------------------------------------------------------
/docs/make.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 |
3 | pushd %~dp0
4 |
5 | REM Command file for Sphinx documentation
6 |
7 | if "%SPHINXBUILD%" == "" (
8 | set SPHINXBUILD=sphinx-build
9 | )
10 | set SOURCEDIR=.
11 | set BUILDDIR=_build
12 |
13 | if "%1" == "" goto help
14 |
15 | %SPHINXBUILD% >NUL 2>NUL
16 | if errorlevel 9009 (
17 | echo.
18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19 | echo.installed, then set the SPHINXBUILD environment variable to point
20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you
21 | echo.may add the Sphinx directory to PATH.
22 | echo.
23 | echo.If you don't have Sphinx installed, grab it from
24 | echo.https://www.sphinx-doc.org/
25 | exit /b 1
26 | )
27 |
28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29 | goto end
30 |
31 | :help
32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33 |
34 | :end
35 | popd
36 |
--------------------------------------------------------------------------------
/playwithmpv/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/videoanywhere/playwithmpv/34dca5ee55ee2bac3e217949ade733705d2d7a67/playwithmpv/__init__.py
--------------------------------------------------------------------------------
/playwithmpv/__main__.py:
--------------------------------------------------------------------------------
1 | from .server import main
2 |
3 | if __name__ == "__main__":
4 | main()
5 |
--------------------------------------------------------------------------------
/playwithmpv/__version__.py:
--------------------------------------------------------------------------------
1 | VERSION = (0, 1, 5)
2 |
3 | __version__ = ".".join(map(str, VERSION))
4 |
--------------------------------------------------------------------------------
/playwithmpv/server.py:
--------------------------------------------------------------------------------
1 | # coding: utf-8
2 | import os, sys
3 |
4 | from flask import Flask
5 | from flask_cors import CORS
6 | from webargs import fields
7 | from webargs.flaskparser import use_args
8 |
9 | # --http-header-fields=
10 | DEFAULT_USER_AGENT = (
11 | '"referer:https://www.bilibili.com/","user-agent: Mozil'
12 | "la/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (K"
13 | "HTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36 Edg/90"
14 | '.0.818.39"'
15 | )
16 | video_args = {
17 | "dir": fields.Str(required=True),
18 | "referer": fields.Str(required=True),
19 | "user-agent": fields.Str(),
20 | "urls": fields.List(fields.Str()),
21 | "titles": fields.List(fields.Str()),
22 | }
23 |
24 | app = Flask(__name__)
25 | CORS(app, resources=r"/*") # To fix ajax CORS problem
26 |
27 |
28 | def create_valid_url(url: str) -> str:
29 | """
30 | Generate a video direct play url.
31 | """
32 | return url
33 |
34 |
35 | @app.route("/", methods=["GET", "POST"])
36 | @use_args(video_args)
37 | def paly_with_mpv(args):
38 | """
39 | 1. Handle requests and parse input data.
40 | 2. Generate mpv args and mpv command.
41 | 3. Execute mpv command.
42 | """
43 | # Geneate video direct url
44 | if args["user-agent"] is None:
45 | args["user-agent"] = DEFAULT_USER_AGENT
46 | args["urls"] = map(create_valid_url, args["urls"])
47 |
48 | # Generate m3u playlist file
49 | user_dir = "USERPROFILE" if os.name == "nt" else "HOME"
50 | playlist_file = os.path.join(os.environ[user_dir], "_tmp_playlist.m3u")
51 | with open(playlist_file, "w", encoding="utf-8") as f:
52 | # Whether delete the tmp playlist file? Look a time xixi.
53 | f.write("#EXTM3U\n")
54 | f.write("#Generated by Wullic-videoanywhere\n")
55 | for title, url in zip(args["titles"], args["urls"]):
56 | f.write("#EXTINF:-1," + title + "\n")
57 | f.write(url + "\n")
58 |
59 | # Geneate mpv args and mpv command
60 | mpv_httpd_header = '--http-header-fields="referer:{0}","user-agent:{1}"'.format(
61 | args["referer"], args["user-agent"]
62 | )
63 | mpv_cmd = " ".join([args["dir"], mpv_httpd_header, '--playlist="{0}"'.format(playlist_file)])
64 |
65 | print(mpv_cmd)
66 | print("\n".join(args["titles"]))
67 |
68 | # Execute mpv command
69 | ret = os.system(mpv_cmd)
70 | if ret != 0:
71 | return {
72 | "success": False,
73 | "message": "MPV: command not found. Ensure your mpv path",
74 | }
75 | else:
76 | return {"success": True, "message": ""}
77 |
78 |
79 | def main():
80 | """
81 | Command line program and run a server.
82 | """
83 | if sys.version_info < (3, 8):
84 | raise ValueError("This script is only for use with Python 3.8 or later")
85 | else:
86 | import argparse
87 |
88 | parser = argparse.ArgumentParser(
89 | description="Start a server to support " "playing video urls with MPV."
90 | )
91 | parser.add_argument(
92 | "-p",
93 | "--port",
94 | default=50000,
95 | dest="port",
96 | help="choose the port that server " "listens to (default: 50000)",
97 | )
98 | args = parser.parse_args()
99 | app.run(port=args.port)
100 |
--------------------------------------------------------------------------------
/poetry.lock:
--------------------------------------------------------------------------------
1 | [[package]]
2 | name = "alabaster"
3 | version = "0.7.12"
4 | description = "A configurable sidebar-enabled Sphinx theme"
5 | category = "dev"
6 | optional = false
7 | python-versions = "*"
8 |
9 | [[package]]
10 | name = "appdirs"
11 | version = "1.4.4"
12 | description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
13 | category = "dev"
14 | optional = false
15 | python-versions = "*"
16 |
17 | [[package]]
18 | name = "attrs"
19 | version = "21.4.0"
20 | description = "Classes Without Boilerplate"
21 | category = "dev"
22 | optional = false
23 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
24 |
25 | [package.extras]
26 | dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"]
27 | docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"]
28 | tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "cloudpickle"]
29 | tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "cloudpickle"]
30 |
31 | [[package]]
32 | name = "babel"
33 | version = "2.10.3"
34 | description = "Internationalization utilities"
35 | category = "dev"
36 | optional = false
37 | python-versions = ">=3.6"
38 |
39 | [package.dependencies]
40 | pytz = ">=2015.7"
41 |
42 | [[package]]
43 | name = "black"
44 | version = "18.9b0"
45 | description = "The uncompromising code formatter."
46 | category = "dev"
47 | optional = false
48 | python-versions = ">=3.6"
49 |
50 | [package.dependencies]
51 | appdirs = "*"
52 | attrs = ">=17.4.0"
53 | click = ">=6.5"
54 | toml = ">=0.9.4"
55 |
56 | [package.extras]
57 | d = ["aiohttp (>=3.3.2)"]
58 |
59 | [[package]]
60 | name = "certifi"
61 | version = "2022.6.15"
62 | description = "Python package for providing Mozilla's CA Bundle."
63 | category = "dev"
64 | optional = false
65 | python-versions = ">=3.6"
66 |
67 | [[package]]
68 | name = "charset-normalizer"
69 | version = "2.1.0"
70 | description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet."
71 | category = "dev"
72 | optional = false
73 | python-versions = ">=3.6.0"
74 |
75 | [package.extras]
76 | unicode_backport = ["unicodedata2"]
77 |
78 | [[package]]
79 | name = "click"
80 | version = "8.1.3"
81 | description = "Composable command line interface toolkit"
82 | category = "main"
83 | optional = false
84 | python-versions = ">=3.7"
85 |
86 | [package.dependencies]
87 | colorama = {version = "*", markers = "platform_system == \"Windows\""}
88 |
89 | [[package]]
90 | name = "colorama"
91 | version = "0.4.5"
92 | description = "Cross-platform colored terminal text."
93 | category = "main"
94 | optional = false
95 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
96 |
97 | [[package]]
98 | name = "docutils"
99 | version = "0.17.1"
100 | description = "Docutils -- Python Documentation Utilities"
101 | category = "dev"
102 | optional = false
103 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
104 |
105 | [[package]]
106 | name = "flask"
107 | version = "2.1.3"
108 | description = "A simple framework for building complex web applications."
109 | category = "main"
110 | optional = false
111 | python-versions = ">=3.7"
112 |
113 | [package.dependencies]
114 | click = ">=8.0"
115 | importlib-metadata = {version = ">=3.6.0", markers = "python_version < \"3.10\""}
116 | itsdangerous = ">=2.0"
117 | Jinja2 = ">=3.0"
118 | Werkzeug = ">=2.0"
119 |
120 | [package.extras]
121 | async = ["asgiref (>=3.2)"]
122 | dotenv = ["python-dotenv"]
123 |
124 | [[package]]
125 | name = "flask-cors"
126 | version = "3.0.10"
127 | description = "A Flask extension adding a decorator for CORS support"
128 | category = "main"
129 | optional = false
130 | python-versions = "*"
131 |
132 | [package.dependencies]
133 | Flask = ">=0.9"
134 | Six = "*"
135 |
136 | [[package]]
137 | name = "idna"
138 | version = "3.3"
139 | description = "Internationalized Domain Names in Applications (IDNA)"
140 | category = "dev"
141 | optional = false
142 | python-versions = ">=3.5"
143 |
144 | [[package]]
145 | name = "imagesize"
146 | version = "1.4.1"
147 | description = "Getting image size from png/jpeg/jpeg2000/gif file"
148 | category = "dev"
149 | optional = false
150 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
151 |
152 | [[package]]
153 | name = "importlib-metadata"
154 | version = "4.12.0"
155 | description = "Read metadata from Python packages"
156 | category = "main"
157 | optional = false
158 | python-versions = ">=3.7"
159 |
160 | [package.dependencies]
161 | zipp = ">=0.5"
162 |
163 | [package.extras]
164 | docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"]
165 | perf = ["ipython"]
166 | testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "importlib-resources (>=1.3)"]
167 |
168 | [[package]]
169 | name = "itsdangerous"
170 | version = "2.1.2"
171 | description = "Safely pass data to untrusted environments and back."
172 | category = "main"
173 | optional = false
174 | python-versions = ">=3.7"
175 |
176 | [[package]]
177 | name = "jinja2"
178 | version = "3.1.2"
179 | description = "A very fast and expressive template engine."
180 | category = "main"
181 | optional = false
182 | python-versions = ">=3.7"
183 |
184 | [package.dependencies]
185 | MarkupSafe = ">=2.0"
186 |
187 | [package.extras]
188 | i18n = ["Babel (>=2.7)"]
189 |
190 | [[package]]
191 | name = "markdown-it-py"
192 | version = "2.1.0"
193 | description = "Python port of markdown-it. Markdown parsing, done right!"
194 | category = "dev"
195 | optional = false
196 | python-versions = ">=3.7"
197 |
198 | [package.dependencies]
199 | mdurl = ">=0.1,<1.0"
200 |
201 | [package.extras]
202 | testing = ["pytest-regressions", "pytest-cov", "pytest", "coverage"]
203 | rtd = ["sphinx-book-theme", "sphinx-design", "sphinx-copybutton", "sphinx", "pyyaml", "myst-parser", "attrs"]
204 | profiling = ["gprof2dot"]
205 | plugins = ["mdit-py-plugins"]
206 | linkify = ["linkify-it-py (>=1.0,<2.0)"]
207 | compare = ["panflute (>=2.1.3,<2.2.0)", "mistune (>=2.0.2,<2.1.0)", "mistletoe (>=0.8.1,<0.9.0)", "markdown (>=3.3.6,<3.4.0)", "commonmark (>=0.9.1,<0.10.0)"]
208 | code_style = ["pre-commit (==2.6)"]
209 | benchmarking = ["pytest-benchmark (>=3.2,<4.0)", "pytest", "psutil"]
210 |
211 | [[package]]
212 | name = "markupsafe"
213 | version = "2.1.1"
214 | description = "Safely add untrusted strings to HTML/XML markup."
215 | category = "main"
216 | optional = false
217 | python-versions = ">=3.7"
218 |
219 | [[package]]
220 | name = "marshmallow"
221 | version = "3.17.0"
222 | description = "A lightweight library for converting complex datatypes to and from native Python datatypes."
223 | category = "main"
224 | optional = false
225 | python-versions = ">=3.7"
226 |
227 | [package.dependencies]
228 | packaging = ">=17.0"
229 |
230 | [package.extras]
231 | dev = ["pytest", "pytz", "simplejson", "mypy (==0.961)", "flake8 (==4.0.1)", "flake8-bugbear (==22.6.22)", "pre-commit (>=2.4,<3.0)", "tox"]
232 | docs = ["sphinx (==4.5.0)", "sphinx-issues (==3.0.1)", "alabaster (==0.7.12)", "sphinx-version-warning (==1.1.2)", "autodocsumm (==0.2.8)"]
233 | lint = ["mypy (==0.961)", "flake8 (==4.0.1)", "flake8-bugbear (==22.6.22)", "pre-commit (>=2.4,<3.0)"]
234 | tests = ["pytest", "pytz", "simplejson"]
235 |
236 | [[package]]
237 | name = "mdit-py-plugins"
238 | version = "0.3.0"
239 | description = "Collection of plugins for markdown-it-py"
240 | category = "dev"
241 | optional = false
242 | python-versions = "~=3.6"
243 |
244 | [package.dependencies]
245 | markdown-it-py = ">=1.0.0,<3.0.0"
246 |
247 | [package.extras]
248 | testing = ["pytest-regressions", "pytest-cov", "pytest (>=3.6,<4)", "coverage"]
249 | rtd = ["sphinx-book-theme (>=0.1.0,<0.2.0)", "myst-parser (>=0.14.0,<0.15.0)"]
250 | code_style = ["pre-commit (==2.6)"]
251 |
252 | [[package]]
253 | name = "mdurl"
254 | version = "0.1.1"
255 | description = "Markdown URL utilities"
256 | category = "dev"
257 | optional = false
258 | python-versions = ">=3.7"
259 |
260 | [[package]]
261 | name = "myst-parser"
262 | version = "0.16.1"
263 | description = "An extended commonmark compliant parser, with bridges to docutils & sphinx."
264 | category = "dev"
265 | optional = false
266 | python-versions = ">=3.6"
267 |
268 | [package.dependencies]
269 | docutils = ">=0.15,<0.18"
270 | jinja2 = "*"
271 | markdown-it-py = ">=1.0.0,<3.0.0"
272 | mdit-py-plugins = ">=0.3.0,<0.4.0"
273 | pyyaml = "*"
274 | sphinx = ">=3.1,<5"
275 |
276 | [package.extras]
277 | code_style = ["pre-commit (>=2.12,<3.0)"]
278 | linkify = ["linkify-it-py (>=1.0,<2.0)"]
279 | rtd = ["ipython", "sphinx-book-theme (>=0.1.0,<0.2.0)", "sphinx-panels (>=0.5.2,<0.6.0)", "sphinxcontrib-bibtex (>=2.1,<3.0)", "sphinxext-rediraffe (>=0.2,<1.0)", "sphinxcontrib.mermaid (>=0.6.3,<0.7.0)", "sphinxext-opengraph (>=0.4.2,<0.5.0)"]
280 | testing = ["beautifulsoup4", "coverage", "docutils (>=0.17.0,<0.18.0)", "pytest (>=3.6,<4)", "pytest-cov", "pytest-regressions"]
281 |
282 | [[package]]
283 | name = "packaging"
284 | version = "21.3"
285 | description = "Core utilities for Python packages"
286 | category = "main"
287 | optional = false
288 | python-versions = ">=3.6"
289 |
290 | [package.dependencies]
291 | pyparsing = ">=2.0.2,<3.0.5 || >3.0.5"
292 |
293 | [[package]]
294 | name = "pygments"
295 | version = "2.12.0"
296 | description = "Pygments is a syntax highlighting package written in Python."
297 | category = "dev"
298 | optional = false
299 | python-versions = ">=3.6"
300 |
301 | [[package]]
302 | name = "pyparsing"
303 | version = "3.0.9"
304 | description = "pyparsing module - Classes and methods to define and execute parsing grammars"
305 | category = "main"
306 | optional = false
307 | python-versions = ">=3.6.8"
308 |
309 | [package.extras]
310 | diagrams = ["railroad-diagrams", "jinja2"]
311 |
312 | [[package]]
313 | name = "pytz"
314 | version = "2022.1"
315 | description = "World timezone definitions, modern and historical"
316 | category = "dev"
317 | optional = false
318 | python-versions = "*"
319 |
320 | [[package]]
321 | name = "pyyaml"
322 | version = "6.0"
323 | description = "YAML parser and emitter for Python"
324 | category = "dev"
325 | optional = false
326 | python-versions = ">=3.6"
327 |
328 | [[package]]
329 | name = "requests"
330 | version = "2.28.1"
331 | description = "Python HTTP for Humans."
332 | category = "dev"
333 | optional = false
334 | python-versions = ">=3.7, <4"
335 |
336 | [package.dependencies]
337 | certifi = ">=2017.4.17"
338 | charset-normalizer = ">=2,<3"
339 | idna = ">=2.5,<4"
340 | urllib3 = ">=1.21.1,<1.27"
341 |
342 | [package.extras]
343 | socks = ["PySocks (>=1.5.6,!=1.5.7)"]
344 | use_chardet_on_py3 = ["chardet (>=3.0.2,<6)"]
345 |
346 | [[package]]
347 | name = "six"
348 | version = "1.16.0"
349 | description = "Python 2 and 3 compatibility utilities"
350 | category = "main"
351 | optional = false
352 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"
353 |
354 | [[package]]
355 | name = "snowballstemmer"
356 | version = "2.2.0"
357 | description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms."
358 | category = "dev"
359 | optional = false
360 | python-versions = "*"
361 |
362 | [[package]]
363 | name = "sphinx"
364 | version = "4.5.0"
365 | description = "Python documentation generator"
366 | category = "dev"
367 | optional = false
368 | python-versions = ">=3.6"
369 |
370 | [package.dependencies]
371 | alabaster = ">=0.7,<0.8"
372 | babel = ">=1.3"
373 | colorama = {version = ">=0.3.5", markers = "sys_platform == \"win32\""}
374 | docutils = ">=0.14,<0.18"
375 | imagesize = "*"
376 | importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""}
377 | Jinja2 = ">=2.3"
378 | packaging = "*"
379 | Pygments = ">=2.0"
380 | requests = ">=2.5.0"
381 | snowballstemmer = ">=1.1"
382 | sphinxcontrib-applehelp = "*"
383 | sphinxcontrib-devhelp = "*"
384 | sphinxcontrib-htmlhelp = ">=2.0.0"
385 | sphinxcontrib-jsmath = "*"
386 | sphinxcontrib-qthelp = "*"
387 | sphinxcontrib-serializinghtml = ">=1.1.5"
388 |
389 | [package.extras]
390 | docs = ["sphinxcontrib-websupport"]
391 | lint = ["flake8 (>=3.5.0)", "isort", "mypy (>=0.931)", "docutils-stubs", "types-typed-ast", "types-requests"]
392 | test = ["pytest", "pytest-cov", "html5lib", "cython", "typed-ast"]
393 |
394 | [[package]]
395 | name = "sphinxcontrib-applehelp"
396 | version = "1.0.2"
397 | description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books"
398 | category = "dev"
399 | optional = false
400 | python-versions = ">=3.5"
401 |
402 | [package.extras]
403 | test = ["pytest"]
404 | lint = ["docutils-stubs", "mypy", "flake8"]
405 |
406 | [[package]]
407 | name = "sphinxcontrib-devhelp"
408 | version = "1.0.2"
409 | description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document."
410 | category = "dev"
411 | optional = false
412 | python-versions = ">=3.5"
413 |
414 | [package.extras]
415 | test = ["pytest"]
416 | lint = ["docutils-stubs", "mypy", "flake8"]
417 |
418 | [[package]]
419 | name = "sphinxcontrib-htmlhelp"
420 | version = "2.0.0"
421 | description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files"
422 | category = "dev"
423 | optional = false
424 | python-versions = ">=3.6"
425 |
426 | [package.extras]
427 | test = ["html5lib", "pytest"]
428 | lint = ["docutils-stubs", "mypy", "flake8"]
429 |
430 | [[package]]
431 | name = "sphinxcontrib-jsmath"
432 | version = "1.0.1"
433 | description = "A sphinx extension which renders display math in HTML via JavaScript"
434 | category = "dev"
435 | optional = false
436 | python-versions = ">=3.5"
437 |
438 | [package.extras]
439 | test = ["mypy", "flake8", "pytest"]
440 |
441 | [[package]]
442 | name = "sphinxcontrib-qthelp"
443 | version = "1.0.3"
444 | description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document."
445 | category = "dev"
446 | optional = false
447 | python-versions = ">=3.5"
448 |
449 | [package.extras]
450 | test = ["pytest"]
451 | lint = ["docutils-stubs", "mypy", "flake8"]
452 |
453 | [[package]]
454 | name = "sphinxcontrib-serializinghtml"
455 | version = "1.1.5"
456 | description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)."
457 | category = "dev"
458 | optional = false
459 | python-versions = ">=3.5"
460 |
461 | [package.extras]
462 | lint = ["flake8", "mypy", "docutils-stubs"]
463 | test = ["pytest"]
464 |
465 | [[package]]
466 | name = "toml"
467 | version = "0.10.2"
468 | description = "Python Library for Tom's Obvious, Minimal Language"
469 | category = "dev"
470 | optional = false
471 | python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
472 |
473 | [[package]]
474 | name = "urllib3"
475 | version = "1.26.10"
476 | description = "HTTP library with thread-safe connection pooling, file post, and more."
477 | category = "dev"
478 | optional = false
479 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4"
480 |
481 | [package.extras]
482 | brotli = ["brotlicffi (>=0.8.0)", "brotli (>=1.0.9)", "brotlipy (>=0.6.0)"]
483 | secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"]
484 | socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"]
485 |
486 | [[package]]
487 | name = "webargs"
488 | version = "8.2.0"
489 | description = "Declarative parsing and validation of HTTP request objects, with built-in support for popular web frameworks, including Flask, Django, Bottle, Tornado, Pyramid, Falcon, and aiohttp."
490 | category = "main"
491 | optional = false
492 | python-versions = ">=3.7.2"
493 |
494 | [package.dependencies]
495 | marshmallow = ">=3.0.0"
496 | packaging = "*"
497 |
498 | [package.extras]
499 | dev = ["pytest", "pytest-asyncio", "webtest (==3.0.0)", "webtest-aiohttp (==2.0.0)", "pytest-aiohttp (>=0.3.0)", "Flask (>=0.12.5)", "Django (>=2.2.0)", "bottle (>=0.12.13)", "tornado (>=4.5.2)", "pyramid (>=1.9.1)", "falcon (>=2.0.0)", "aiohttp (>=3.0.8)", "mypy (==0.961)", "flake8 (==4.0.1)", "flake8-bugbear (==22.7.1)", "pre-commit (>=2.4,<3.0)", "tox"]
500 | docs = ["Sphinx (==5.0.2)", "sphinx-issues (==3.0.1)", "furo (==2022.6.21)", "Flask (>=0.12.5)", "Django (>=2.2.0)", "bottle (>=0.12.13)", "tornado (>=4.5.2)", "pyramid (>=1.9.1)", "falcon (>=2.0.0)", "aiohttp (>=3.0.8)"]
501 | frameworks = ["Flask (>=0.12.5)", "Django (>=2.2.0)", "bottle (>=0.12.13)", "tornado (>=4.5.2)", "pyramid (>=1.9.1)", "falcon (>=2.0.0)", "aiohttp (>=3.0.8)"]
502 | lint = ["mypy (==0.961)", "flake8 (==4.0.1)", "flake8-bugbear (==22.7.1)", "pre-commit (>=2.4,<3.0)"]
503 | tests = ["pytest", "pytest-asyncio", "webtest (==3.0.0)", "webtest-aiohttp (==2.0.0)", "pytest-aiohttp (>=0.3.0)", "Flask (>=0.12.5)", "Django (>=2.2.0)", "bottle (>=0.12.13)", "tornado (>=4.5.2)", "pyramid (>=1.9.1)", "falcon (>=2.0.0)", "aiohttp (>=3.0.8)"]
504 |
505 | [[package]]
506 | name = "werkzeug"
507 | version = "2.2.0"
508 | description = "The comprehensive WSGI web application library."
509 | category = "main"
510 | optional = false
511 | python-versions = ">=3.7"
512 |
513 | [package.dependencies]
514 | MarkupSafe = ">=2.1.1"
515 |
516 | [package.extras]
517 | watchdog = ["watchdog"]
518 |
519 | [[package]]
520 | name = "youtube-dl"
521 | version = "2021.12.17"
522 | description = "YouTube video downloader"
523 | category = "dev"
524 | optional = false
525 | python-versions = "*"
526 |
527 | [[package]]
528 | name = "zipp"
529 | version = "3.8.1"
530 | description = "Backport of pathlib-compatible object wrapper for zip files"
531 | category = "main"
532 | optional = false
533 | python-versions = ">=3.7"
534 |
535 | [package.extras]
536 | docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"]
537 | testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"]
538 |
539 | [metadata]
540 | lock-version = "1.1"
541 | python-versions = "^3.8"
542 | content-hash = "7cac86d6e8bedc1d0cc72a0a5b77248a68bd501e697647522d1399ea635f18f0"
543 |
544 | [metadata.files]
545 | alabaster = []
546 | appdirs = []
547 | attrs = [
548 | {file = "attrs-21.4.0-py2.py3-none-any.whl", hash = "sha256:2d27e3784d7a565d36ab851fe94887c5eccd6a463168875832a1be79c82828b4"},
549 | {file = "attrs-21.4.0.tar.gz", hash = "sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd"},
550 | ]
551 | babel = []
552 | black = []
553 | certifi = []
554 | charset-normalizer = []
555 | click = []
556 | colorama = []
557 | docutils = []
558 | flask = []
559 | flask-cors = [
560 | {file = "Flask-Cors-3.0.10.tar.gz", hash = "sha256:b60839393f3b84a0f3746f6cdca56c1ad7426aa738b70d6c61375857823181de"},
561 | {file = "Flask_Cors-3.0.10-py2.py3-none-any.whl", hash = "sha256:74efc975af1194fc7891ff5cd85b0f7478be4f7f59fe158102e91abb72bb4438"},
562 | ]
563 | idna = [
564 | {file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"},
565 | {file = "idna-3.3.tar.gz", hash = "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"},
566 | ]
567 | imagesize = []
568 | importlib-metadata = []
569 | itsdangerous = []
570 | jinja2 = []
571 | markdown-it-py = []
572 | markupsafe = []
573 | marshmallow = []
574 | mdit-py-plugins = []
575 | mdurl = []
576 | myst-parser = []
577 | packaging = [
578 | {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"},
579 | {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"},
580 | ]
581 | pygments = []
582 | pyparsing = []
583 | pytz = []
584 | pyyaml = []
585 | requests = []
586 | six = [
587 | {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"},
588 | {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"},
589 | ]
590 | snowballstemmer = []
591 | sphinx = []
592 | sphinxcontrib-applehelp = []
593 | sphinxcontrib-devhelp = []
594 | sphinxcontrib-htmlhelp = []
595 | sphinxcontrib-jsmath = []
596 | sphinxcontrib-qthelp = []
597 | sphinxcontrib-serializinghtml = []
598 | toml = []
599 | urllib3 = []
600 | webargs = []
601 | werkzeug = []
602 | youtube-dl = [
603 | {file = "youtube_dl-2021.12.17-py2.py3-none-any.whl", hash = "sha256:f1336d5de68647e0364a47b3c0712578e59ec76f02048ff5c50ef1c69d79cd55"},
604 | {file = "youtube_dl-2021.12.17.tar.gz", hash = "sha256:bc59e86c5d15d887ac590454511f08ce2c47698d5a82c27bfe27b5d814bbaed2"},
605 | ]
606 | zipp = []
607 |
--------------------------------------------------------------------------------
/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool.poetry]
2 | name = "playwithmpv"
3 | version = "0.1.0"
4 | description = ""
5 | authors = ["wullic"]
6 |
7 | [tool.poetry.dependencies]
8 | python = "^3.8"
9 | Flask = "^2.0.2"
10 | webargs = "^8.0.1"
11 | Flask-Cors = "^3.0.10"
12 |
13 | [tool.poetry.dev-dependencies]
14 | youtube-dl = "^2021.12.17"
15 | black = "^18.9b0"
16 | myst-parser = "^0.16.1"
17 | Sphinx = "^4.3.2"
18 |
19 | [build-system]
20 | requires = ["poetry-core>=1.0.0"]
21 | build-backend = "poetry.core.masonry.api"
22 |
--------------------------------------------------------------------------------
/requirements_dev.txt:
--------------------------------------------------------------------------------
1 | click==8.1.3; python_version >= "3.7"
2 | colorama==0.4.5; python_version >= "3.7" and python_full_version < "3.0.0" and platform_system == "Windows" or platform_system == "Windows" and python_version >= "3.7" and python_full_version >= "3.5.0"
3 | flask-cors==3.0.10 \
4 | --hash=sha256:b60839393f3b84a0f3746f6cdca56c1ad7426aa738b70d6c61375857823181de \
5 | --hash=sha256:74efc975af1194fc7891ff5cd85b0f7478be4f7f59fe158102e91abb72bb4438
6 | flask==2.1.3; python_version >= "3.7"
7 | importlib-metadata==4.12.0; python_version < "3.10" and python_version >= "3.7"
8 | itsdangerous==2.1.2; python_version >= "3.7"
9 | jinja2==3.1.2; python_version >= "3.7"
10 | markupsafe==2.1.1; python_version >= "3.7"
11 | marshmallow==3.17.0; python_version >= "3.7" and python_full_version >= "3.7.2"
12 | packaging==21.3; python_version >= "3.7" and python_full_version >= "3.7.2" \
13 | --hash=sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522 \
14 | --hash=sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb
15 | pyparsing==3.0.9; python_version >= "3.7" and python_full_version >= "3.7.2"
16 | six==1.16.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.3.0" \
17 | --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 \
18 | --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926
19 | webargs==8.2.0; python_full_version >= "3.7.2"
20 | werkzeug==2.2.0; python_version >= "3.7"
21 | zipp==3.8.1; python_version < "3.10" and python_version >= "3.7"
22 |
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: utf-8 -*-
3 |
4 | # Note: To use the 'upload' functionality of this file, you must:
5 | # $ pipenv install twine --dev
6 |
7 | import io
8 | import os
9 | import sys
10 | from shutil import rmtree
11 |
12 | from setuptools import find_packages, setup, Command
13 |
14 | # Package meta-data.
15 | NAME = 'playwithmpv'
16 | DESCRIPTION = 'A server to support playing videos with mpv'
17 | URL = 'https://github.com/playallwithmpv/playwithmpv'
18 | EMAIL = 'wenliang.ouyang@outlook.com'
19 | AUTHOR = 'Wullic'
20 | REQUIRES_PYTHON = '>=3.8.2'
21 | VERSION = None # 由 __version__.py文件给出
22 |
23 | # What packages are required for this module to be executed?
24 | REQUIRED = [
25 | # 'requests', 'maya', 'records',
26 | ["wheel", "webargs>=8.0.1", "Flask>=2.0.2", "flask-cors>=3.0.10", "youtube-dl",
27 | "myst_parser"]
28 | ]
29 |
30 | # What packages are optional?
31 | EXTRAS = {
32 | # 'fancy feature': ['django'],
33 | }
34 |
35 | # The rest you shouldn't have to touch too much :)
36 | # ------------------------------------------------
37 | # Except, perhaps the License and Trove Classifiers!
38 | # If you do change the License, remember to change the Trove Classifier for that!
39 |
40 | here = os.path.abspath(os.path.dirname(__file__))
41 |
42 | # Import the README and use it as the long-description.
43 | # Note: this will only work if 'README.md' is present in your MANIFEST.in file!
44 | try:
45 | with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
46 | long_description = '\n' + f.read()
47 | except FileNotFoundError:
48 | long_description = DESCRIPTION
49 |
50 | # Load the package's __version__.py module as a dictionary.
51 | about = {}
52 | if not VERSION:
53 | project_slug = NAME.lower().replace("-", "_").replace(" ", "_")
54 | with open(os.path.join(here, project_slug, '__version__.py')) as f:
55 | exec(f.read(), about)
56 | else:
57 | about['__version__'] = VERSION
58 |
59 |
60 | class UploadCommand(Command):
61 | """Support setup.py upload."""
62 |
63 | description = 'Build and publish the package.'
64 | user_options = []
65 |
66 | @staticmethod
67 | def status(s):
68 | """Prints things in bold."""
69 | print('\033[1m{0}\033[0m'.format(s))
70 |
71 | def initialize_options(self):
72 | pass
73 |
74 | def finalize_options(self):
75 | pass
76 |
77 | def run(self):
78 | try:
79 | self.status('Removing previous builds…')
80 | rmtree(os.path.join(here, 'dist'))
81 | except OSError:
82 | pass
83 |
84 | self.status('Building Source and Wheel (universal) distribution…')
85 | os.system('{0} setup.py sdist bdist_wheel --universal'.format(sys.executable))
86 |
87 | self.status('Uploading the package to PyPI via Twine…')
88 | os.system('twine upload dist/*')
89 |
90 | self.status('Pushing git tags…')
91 | os.system('git tag v{0}'.format(about['__version__']))
92 | os.system('git push --tags')
93 |
94 | sys.exit()
95 |
96 |
97 | # Where the magic happens:
98 | setup(
99 | name=NAME,
100 | version=about['__version__'],
101 | description=DESCRIPTION,
102 | long_description=long_description,
103 | long_description_content_type='text/markdown',
104 | author=AUTHOR,
105 | author_email=EMAIL,
106 | python_requires=REQUIRES_PYTHON,
107 | url=URL,
108 | packages=find_packages(exclude=["tests", "*.tests", "*.tests.*", "tests.*"]),
109 | # If your package is a single module, use this instead of 'packages':
110 | # py_modules=['playwithmpv'],
111 |
112 | entry_points={
113 | 'console_scripts': ['playwithmpv=playwithmpv.server:main'],
114 | },
115 | install_requires=REQUIRED,
116 | extras_require=EXTRAS,
117 | include_package_data=True,
118 | license='MIT',
119 | classifiers=[
120 | # Trove classifiers
121 | # Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
122 | 'License :: OSI Approved :: MIT License',
123 | 'Programming Language :: Python',
124 | 'Programming Language :: Python :: 3',
125 | 'Programming Language :: Python :: 3.8',
126 | 'Programming Language :: Python :: Implementation :: CPython',
127 | 'Programming Language :: Python :: Implementation :: PyPy'
128 | ],
129 | # $ setup.py publish support.
130 | cmdclass={
131 | 'upload': UploadCommand,
132 | },
133 | )
134 |
--------------------------------------------------------------------------------