Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
author = "Sheldon Woodward & GitBib"

# The full version, including alpha/beta/rc tags
release = "2.0.1"
release = "2.0.4"


# -- General configuration ---------------------------------------------------
Expand Down Expand Up @@ -80,7 +80,7 @@

# Set the repo location to get a badge with stats
"repo_url": "https://github.com/GitBib/pymkv2",
"repo_name": "pymkv",
"repo_name": "pymkv2",

# Visible levels of the global TOC; -1 means unlimited
"globaltoc_depth": 3,
Expand Down
11 changes: 11 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ functionality that is missing or an error in the docs, please open a new issue `
pymkv/Timestamp
pymkv/Verifications

Install
-------

To install pymkv2 from PyPI, use the following command:

$ pip install pymkv2

You can also clone the repo and run the following command in the project root to install the source code as editable:

$ pip install -e .

Indices and tables
------------------

Expand Down
18 changes: 10 additions & 8 deletions pymkv/MKVTrack.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
""":class:`~pymkv.MKVTrack` classes are used to represent tracks within an MKV or to be used in an MKV. They can
"""
:class:`~pymkv.MKVTrack` classes are used to represent tracks within an MKV or to be used in an MKV. They can
represent a video, audio, or subtitle track.

Examples
--------

Below are some basic examples of how the :class:`~pymkv.MKVTrack` objects can be used.

Create a new :class:`~pymkv.MKVTrack` from a track file. This example takes a standalone track file and uses it in an
:class:`~pymkv.MKVTrack`.

>>> from pymkv import MKVTrack
>>> track1 = MKVTrack('path/to/track.h264')
>>> track1.track_name = 'Some Name'
>>> track1.language = 'eng'
>>> track1 = MKVTrack("path/to/track.h264")
>>> track1.track_name = "Some Name"
>>> track1.language = "eng"

Create a new :class:`~pymkv.MKVTrack` from an MKV file. This example will take a specific track from an MKV and also
prevent any global tags from being included if the :class:`~pymkv.MKVTrack` is muxed into an :class:`~pymkv.MKVFile`.

>>> track2 = MKVTrack('path/to/track.aac')
>>> track2.language = 'eng'
>>> track2 = MKVTrack("path/to/track.aac")
>>> track2.language = "eng"

Create a new :class:`~pymkv.MKVTrack` from an MKV file. This example will take a specific track from an MKV and also
prevent any global tags from being included if the :class:`~pymkv.MKVTrack` is muxed into an :class:`~pymkv.MKVFile`.

>>> track3 = MKVTrack('path/to/MKV.mkv', track_id=1)
>>> track3 = MKVTrack("path/to/MKV.mkv", track_id=1)
>>> track3.no_global_tags = True

Now all these tracks can be added to an :class:`~pymkv.MKVFile` object and muxed together.
Expand All @@ -32,7 +34,7 @@
>>> file.add_track(track1)
>>> file.add_track(track2)
>>> file.add_track(track3)
>>> file.mux('path/to/output.mkv')
>>> file.mux("path/to/output.mkv")
"""

from __future__ import annotations
Expand Down