mirror of https://github.com/streamlink/streamlink
docs: tweaks to docs and docs build process
Minor tweaks to the docs. Fixed all the warnings and enabled "Fail on warning" option so that problems with the docs will cause the build to fail on warning, the docs are also built for every commit and PR. Restructured the travis script/after_success so that the docs are only pushed if the build was successful (only master branch and no PRs).
This commit is contained in:
parent
cde648dc53
commit
5deb3413a8
|
@ -1,6 +1,5 @@
|
|||
language: python
|
||||
|
||||
matrix:
|
||||
matrix:
|
||||
include:
|
||||
- python: '2.6'
|
||||
|
@ -17,6 +16,7 @@ matrix:
|
|||
before_install:
|
||||
- pip install --disable-pip-version-check --upgrade pip
|
||||
- pip install -r dev-requirements.txt
|
||||
- pip install -r docs-requirements.txt
|
||||
|
||||
install:
|
||||
- python setup.py install
|
||||
|
@ -24,10 +24,13 @@ install:
|
|||
script:
|
||||
- python -m pytest tests/
|
||||
- coverage run setup.py test
|
||||
- bash script/pushdocs.sh
|
||||
# test building the docs
|
||||
- if [[ $BUILD_DOCS == 'yes' ]]; then make --directory=docs html; fi
|
||||
- if [[ $BUILD_INSTALLER == 'yes' ]]; then ./script/makeinstaller.sh; fi
|
||||
|
||||
after_success:
|
||||
# push the docs only if the build was successful
|
||||
- bash script/pushdocs.sh
|
||||
- codecov
|
||||
|
||||
addons:
|
||||
|
|
|
@ -2,7 +2,7 @@ include AUTHORS
|
|||
include CHANGELOG.rst
|
||||
include README.md
|
||||
include LICENSE*
|
||||
include requirements-docs.txt
|
||||
include *requirements.txt
|
||||
|
||||
recursive-include docs *
|
||||
prune docs/_build
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS =
|
||||
SPHINXOPTS = -W
|
||||
SPHINXBUILD = sphinx-build
|
||||
PAPER =
|
||||
BUILDDIR = _build
|
||||
|
|
|
@ -314,7 +314,7 @@ Command-line usage
|
|||
|
||||
.. code-block:: console
|
||||
|
||||
$ streamlink [OPTIONS] [URL] [STREAM]
|
||||
$ streamlink [OPTIONS] <URL> [STREAM]
|
||||
|
||||
|
||||
.. argparse::
|
||||
|
|
|
@ -25,7 +25,6 @@ templates_path = ['_templates']
|
|||
|
||||
# The suffix of source filenames.
|
||||
source_suffix = '.rst'
|
||||
exclude_patterns = ['twitch_oauth.rst']
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8-sig'
|
||||
|
@ -35,7 +34,7 @@ master_doc = 'index'
|
|||
|
||||
# General information about the project.
|
||||
project = 'Streamlink'
|
||||
copyright = '2016, Streamlink'
|
||||
copyright = '2017, Streamlink'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
|
@ -187,7 +186,7 @@ htmlhelp_basename = 'streamlinkdoc'
|
|||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
('cli', 'streamlink', 'extracts streams from various services and pipes them into a video player of choice', ['Christopher Rosell'], 1)
|
||||
('cli', 'streamlink', 'extracts streams from various services and pipes them into a video player of choice', ['Streamlink Contributors'], 1)
|
||||
]
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
|
|
|
@ -106,13 +106,11 @@ class ArgparseDirective(Directive):
|
|||
metavar = " ".join(metavar)
|
||||
|
||||
if metavar:
|
||||
optional = arg.options.get("nargs") == "?"
|
||||
if optional:
|
||||
metavar = "[{0}]".format(metavar)
|
||||
|
||||
options = []
|
||||
for a in arg.args:
|
||||
if a.startswith("-"):
|
||||
if arg.options.get("nargs") == "?":
|
||||
metavar = "[{0}]".format(metavar)
|
||||
options.append("{0} {1}".format(a, metavar))
|
||||
else:
|
||||
options.append(metavar)
|
||||
|
|
|
@ -64,3 +64,4 @@ See their respective sections for more information on how to use them.
|
|||
issues
|
||||
api_guide
|
||||
api
|
||||
changelog
|
|
@ -62,7 +62,7 @@ Mac OS X .. code-block:: console
|
|||
# easy_install -U streamlink
|
||||
Microsoft Windows See `Windows binaries`_ and `Windows portable version`_.
|
||||
|
||||
`Chocolatey`_ .. code-block:: powershell
|
||||
`Chocolatey`_ .. code-block:: console
|
||||
|
||||
C:\> choco install streamlink
|
||||
==================================== ===========================================
|
||||
|
@ -95,15 +95,17 @@ can install Streamlink via source.
|
|||
|
||||
There are a few different methods to do this,
|
||||
`pip <http://pip.readthedocs.org/en/latest/installing.html>`_ the Python package
|
||||
manager, :command:`easy_install` the older package manager included with
|
||||
`python-setuptools`_ or by checking out the latest code with
|
||||
`Git <http://git-scm.com/downloads>`_.
|
||||
manager, or by checking out the latest code with
|
||||
`Git <http://git-scm.com/downloads>`_. Using :command:`easy_install` is no longer recommended.
|
||||
|
||||
.. note::
|
||||
|
||||
For some Linux distributions the Python headers package needs to be installed before installing streamlink
|
||||
(``python-devel`` in RedHat, Fedora, etc.).
|
||||
|
||||
Ensure that you are using an up-to-date version of :command:`pip`, at least version **6** is recommended.
|
||||
|
||||
|
||||
The commands listed here will also upgrade any existing version of Streamlink.
|
||||
|
||||
==================================== ===========================================
|
||||
|
@ -215,9 +217,9 @@ Windows binaries
|
|||
Windows XP is not supported.
|
||||
Windows Vista requires at least SP2 to be installed.
|
||||
|
||||
You can download the latest stable Windows installer `here <https://github.com/streamlink/streamlink/releases>`_.
|
||||
You can download the latest stable Windows installer from the `GitHub Releases Page <https://github.com/streamlink/streamlink/releases/latest>`__.
|
||||
|
||||
You can download the latest nightly Windows installer `here <https://streamlink-builds.s3.amazonaws.com/nightly/windows/streamlink-latest.exe>`_.
|
||||
You can download the latest nightly Windows installer `here <https://streamlink-builds.s3.amazonaws.com/nightly/windows/streamlink-latest.exe>`__.
|
||||
|
||||
This is a installer which contains:
|
||||
|
||||
|
|
|
@ -47,17 +47,17 @@ OMXPlayer No Yes Yes
|
|||
.. [2] Stdin requires MPC-HC 1.7 or newer.
|
||||
|
||||
.. [3] Some versions of VLC might be unable to use the stdin pipe and
|
||||
prints the error message::
|
||||
prints the error message
|
||||
|
||||
VLC is unable to open the MRL 'fd://0'
|
||||
|
||||
Use one of the other transport methods instead to work around this.
|
||||
|
||||
.. [4] :option:`--player-continuous-http` has been reported to work for HLS
|
||||
streams when also using the timeout option for omxplayer (see `When
|
||||
using OMXPlayer the stream stops unexpectedly`_.) Other stream types
|
||||
may not work as expected, it is recommended that :option:`--player-fifo` be
|
||||
used.
|
||||
streams when also using the timeout option for omxplayer
|
||||
(see `When using OMXPlayer the stream stops unexpectedly`_.)
|
||||
Other stream types may not work as expected, it is recommended that
|
||||
:option:`--player-fifo` be used.
|
||||
|
||||
|
||||
Known issues and workarounds
|
||||
|
|
|
@ -37,7 +37,7 @@ bnt - tv.bnt.bg Yes No Streams may be geo-restrict
|
|||
- nova.bg
|
||||
bongacams bongacams.com Yes No Only RTMP streams are available.
|
||||
btv btv.bg Yes No Requires login, and geo-restricted to Bulgaria.
|
||||
canaplus - canalplus.fr Yes Yes Streams may be geo-restricted to France.
|
||||
canalplus - canalplus.fr Yes Yes Streams may be geo-restricted to France.
|
||||
- c8.fr
|
||||
- cstar.fr
|
||||
chaturbate chaturbate.com Yes No
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
.. _twitch_oauth:
|
||||
|
||||
:orphan:
|
||||
|
||||
Twitch OAuth authentication
|
||||
===========================
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ fi
|
|||
|
||||
DOCS_REPO_PATH="$1"
|
||||
|
||||
pip install sphinx
|
||||
pip install -r docs-requirements.txt
|
||||
if make --directory=docs html ; then
|
||||
# remove old files
|
||||
rm "$DOCS_REPO_PATH/"*.html -f
|
||||
|
|
|
@ -23,7 +23,7 @@ if bash script/makedocs.sh "$DOCS_REPO_NAME" ; then
|
|||
git config user.name "$DOCS_USER"
|
||||
git config user.email "<>"
|
||||
git add --all
|
||||
# Check if anythhing changed, and if it's the case, push to origin/master.
|
||||
# Check if anything changed, and if it's the case, push to origin/master.
|
||||
if git commit -m 'update docs' -m "Commit: https://github.com/streamlink/streamlink/commit/$TRAVIS_COMMIT" ; then
|
||||
git push origin master
|
||||
fi
|
||||
|
|
|
@ -168,23 +168,23 @@ class Streamlink(object):
|
|||
rtmp-timeout (float) Timeout for reading data from
|
||||
RTMP streams, default: ``60.0``
|
||||
|
||||
ffmpeg-ffmpeg (str) Specify the location of the
|
||||
ffmpeg executable use by Muxing streams
|
||||
e.g. ``/usr/local/bin/ffmpeg``
|
||||
ffmpeg-ffmpeg (str) Specify the location of the
|
||||
ffmpeg executable use by Muxing streams
|
||||
e.g. ``/usr/local/bin/ffmpeg``
|
||||
|
||||
ffmpeg-verbose (bool) Log stderr from ffmpeg to the
|
||||
console
|
||||
ffmpeg-verbose (bool) Log stderr from ffmpeg to the
|
||||
console
|
||||
|
||||
ffmpeg-verbose-path (str) Specify the location of the
|
||||
ffmpeg stderr log file
|
||||
ffmpeg-verbose-path (str) Specify the location of the
|
||||
ffmpeg stderr log file
|
||||
|
||||
ffmpeg-video-transcode (str) The codec to use if transcoding
|
||||
video when muxing with ffmpeg
|
||||
e.g. ``h264``
|
||||
ffmpeg-video-transcode (str) The codec to use if transcoding
|
||||
video when muxing with ffmpeg
|
||||
e.g. ``h264``
|
||||
|
||||
ffmpeg-audio-transcode (str) The codec to use if transcoding
|
||||
audio when muxing with ffmpeg
|
||||
e.g. ``aac``
|
||||
ffmpeg-audio-transcode (str) The codec to use if transcoding
|
||||
audio when muxing with ffmpeg
|
||||
e.g. ``aac``
|
||||
|
||||
stream-segment-attempts (int) How many attempts should be done
|
||||
to download each segment, default: ``3``.
|
||||
|
|
|
@ -134,7 +134,7 @@ parser = ArgumentParser(
|
|||
fromfile_prefix_chars="@",
|
||||
formatter_class=HelpFormatter,
|
||||
add_help=False,
|
||||
usage="%(prog)s [OPTIONS] [URL] [STREAM]",
|
||||
usage="%(prog)s [OPTIONS] <URL> [STREAM]",
|
||||
description=dedent("""
|
||||
Streamlink is command-line utility that extracts streams from
|
||||
various services and pipes them into a video player of choice.
|
||||
|
@ -728,7 +728,6 @@ transport.add_argument(
|
|||
|
||||
This is generic option used by streams not covered by other options,
|
||||
such as stream protocols specific to plugins, e.g. UStream.
|
||||
|
||||
Default is 60.0.
|
||||
""")
|
||||
transport.add_argument(
|
||||
|
@ -1006,8 +1005,9 @@ plugin.add_argument(
|
|||
help="""
|
||||
Indicate which locale to use for Crunchyroll subtitles.
|
||||
|
||||
The locale is formatted as [language_code]_[country_code], by default
|
||||
en_US is used.
|
||||
The locale is formatted as [language_code]_[country_code].
|
||||
|
||||
Default is en_US.
|
||||
"""
|
||||
)
|
||||
plugin.add_argument(
|
||||
|
|
Loading…
Reference in New Issue