Skip to content

Commit

Permalink
fix doctest errors
Browse files Browse the repository at this point in the history
  • Loading branch information
getzze committed Jul 5, 2024
1 parent d7a7a59 commit aa98377
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 13 deletions.
30 changes: 20 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@ Subtitles, faster than your thoughts.
:target: https://pypi.python.org/pypi/subliminal
:alt: Latest Version

.. image:: https://travis-ci.org/Diaoul/subliminal.svg?branch=develop
:target: https://travis-ci.org/Diaoul/subliminal
:alt: Travis CI build status

.. image:: https://readthedocs.org/projects/subliminal/badge/?version=latest
:target: https://subliminal.readthedocs.org/
:alt: Documentation Status

.. image:: https://coveralls.io/repos/Diaoul/subliminal/badge.svg?branch=develop&service=github
:target: https://coveralls.io/github/Diaoul/subliminal?branch=develop
.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/Diaoul/subliminal/python-coverage-comment-action-data/endpoint.json
:target: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/Diaoul/subliminal/python-coverage-comment-action-data/endpoint.json
:alt: Code coverage

.. image:: https://img.shields.io/github/license/Diaoul/subliminal.svg
Expand Down Expand Up @@ -77,13 +73,27 @@ Run subliminal in a docker container::

Installation
------------
Subliminal can be installed as a regular python module by running::
For a better isolation with your system you should use a dedicated virtualenv.
The preferred installation method is to use `pipx <https://github.com/pypa/pipx>`_ that does that for you::

$ pipx install subliminal

Subliminal can be also be installed as a regular python module by running::

$ [sudo] pip install subliminal
$ pip install --user subliminal

If you want to modify the code, `fork <https://github.com/Diaoul/subliminal/fork>`_ this repo,
clone your fork locally and install a development version::

$ git clone https://github.com/<my-username>/subliminal
$ cd subliminal
$ pip install --user -e '.[dev,test,docs]'

For a better isolation with your system you should use a dedicated virtualenv or install for your user only using
the ``--user`` flag.

Nautilus/Nemo integration
-------------------------
See the dedicated `project page <https://github.com/Diaoul/nautilus-subliminal>`_ for more information.

Dolphin integration
-------------------
See this `Gist <https://gist.github.com/maurocolella/03a9f02c56b1a90c64f05683e2840d57>`_.
1 change: 1 addition & 0 deletions changelog.d/1143.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fix doctest errors
1 change: 1 addition & 0 deletions docs/_static/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!.gitignore
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.viewcode',
'sphinxcontrib.programoutput',
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ API Documentation
If you are looking for information on a specific function, class or method, this part of the documentation is for you.

.. toctree::
:caption: API
:maxdepth: 1

api/core
Expand Down
4 changes: 2 additions & 2 deletions docs/user/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,5 @@ We got ourselves a nice subtitle, now we can save it on the file system using :f

>>> save_subtitles(video, [best_subtitle])
[<PodnapisiSubtitle 'ZtAW' [hu]>]
>>> os.listdir()
['The.Big.Bang.Theory.S05E18.HDTV.x264-LOL.hu.srt']
>>> 'The.Big.Bang.Theory.S05E18.HDTV.x264-LOL.hu.srt' in os.listdir()
True
2 changes: 1 addition & 1 deletion subliminal/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class LanguageParamType(click.ParamType):
name = 'language'

def convert(self, value: str, param: click.Parameter | None, ctx: click.Context | None) -> Language:
"""Convert ietf language to :class:`~babelfish.Language`."""
"""Convert ietf language to :class:`~babelfish.language.Language`."""
try:
return Language.fromietf(value)
except BabelfishError:
Expand Down

0 comments on commit aa98377

Please sign in to comment.