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
73 changes: 53 additions & 20 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# -- Project information -----------------------------------------------------

project = "pymkv2"
copyright = "2024, Sheldon Woodward & GitBib" # noqa: A001
copyright = "2025, Sheldon Woodward & GitBib" # noqa: A001
author = "Sheldon Woodward & GitBib"

# The full version, including alpha/beta/rc tags
Expand All @@ -35,6 +35,7 @@
"sphinx.ext.autodoc",
"sphinx.ext.coverage",
"sphinx.ext.napoleon",
"sphinx_immaterial"
]

# Add any paths that contain templates here, relative to this directory.
Expand All @@ -53,33 +54,65 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_material"
html_theme = "sphinx_immaterial"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]


# Material theme options (see theme.conf for more information)
# Material theme options
html_theme_options = {
# Set the name of the project to appear in the navigation.
"nav_title": "PyMKV2 DOCS",
# Set you GA account ID to enable tracking
"google_analytics_account": "G-YMTSDQ0M8Z",
# Specify a base_url used to generate sitemap.xml. If not
# specified, then no sitemap will be built.
"base_url": "https://gitbib.github.io/pymkv2/",
# Set the color and the accent color
"color_primary": "blue",
"color_accent": "light-blue",
# Set the repo location to get a badge with stats
"icon": {
"repo": "fontawesome/brands/github",
},
"site_url": "https://gitbib.github.io/pymkv2/",
"repo_url": "https://github.com/GitBib/pymkv2",
"repo_name": "pymkv2",
# Visible levels of the global TOC; -1 means unlimited
"globaltoc_depth": 3,
# If False, expand all TOC entries
"edit_uri": "blob/master/docs",
"globaltoc_collapse": False,
# If True, show hidden TOC entries
"globaltoc_includehidden": False,
"features": [
"navigation.expand",
"navigation.sections",
"navigation.top",
"search.share",
"toc.follow",
"toc.sticky",
"content.tabs.link",
"announce.dismiss",
],
"palette": [
{
"media": "(prefers-color-scheme: light)",
"scheme": "default",
"primary": "blue",
"accent": "light-blue",
"toggle": {
"icon": "material/lightbulb-outline",
"name": "Switch to dark mode",
},
},
{
"media": "(prefers-color-scheme: dark)",
"scheme": "slate",
"primary": "blue",
"accent": "light-blue",
"toggle": {
"icon": "material/lightbulb",
"name": "Switch to light mode",
},
},
],
"toc_title_is_page_title": True,
"social": [
{
"icon": "fontawesome/brands/github",
"link": "https://github.com/GitBib/pymkv2",
"name": "Source on github.com",
},
{
"icon": "fontawesome/brands/python",
"link": "https://pypi.org/project/pymkv2/",
},
],
}
59 changes: 46 additions & 13 deletions docs/source/pymkv/Verifications.rst
Original file line number Diff line number Diff line change
@@ -1,27 +1,60 @@
Verifications
============

The Verifications module provides utilities for validating files, paths and MKVToolNix executables.

Core Functions
-------------

.. automodule:: pymkv.checking_file_path
:noindex:
File Path Verification
~~~~~~~~~~~~~~~~~~~~~

.. autofunction:: pymkv.checking_file_path

.. automodule:: pymkv.verify_matroska
:noindex:
MKVToolNix Verification
~~~~~~~~~~~~~~~~~~~~~~

.. autofunction:: pymkv.verify_mkvmerge

File Format Verification
~~~~~~~~~~~~~~~~~~~~~~

.. autofunction:: pymkv.verify_matroska

.. automodule:: pymkv.verify_mkvmerge
:noindex:
.. autofunction:: pymkv.verify_recognized

.. autofunction:: pymkv.verify_mkvmerge
.. autofunction:: pymkv.verify_supported

.. automodule:: pymkv.verify_recognized
:noindex:
Utility Functions
~~~~~~~~~~~~~~~

.. autofunction:: pymkv.verify_recognized
.. autofunction:: pymkv.get_file_info

.. automodule:: pymkv.verify_supported
:noindex:
Examples
--------

.. autofunction:: pymkv.verify_supported
Basic Usage
~~~~~~~~~~

Here's a simple example of verifying an MKV file::

from pymkv import verify_matroska, verify_mkvmerge

# First verify mkvmerge is available
if verify_mkvmerge("mkvmerge"):
# Then check if file is valid Matroska
if verify_matroska("path/to/file.mkv", "mkvmerge"):
print("Valid MKV file!")

Advanced Usage
~~~~~~~~~~~~

Example showing multiple verifications::

from pymkv import verify_recognized, verify_supported

# Check if file format is recognized
if verify_recognized("path/to/file.mkv"):
# Check if format is fully supported
if verify_supported("path/to/file.mkv"):
print("File is fully supported!")
Loading
Loading