Skip to content

Commit

Permalink
Feature/docs (#48)
Browse files Browse the repository at this point in the history
* Converted README.rst to markdown.

* Changed wildcard imports to explicit imports in pymkv/__init__.py.

* Added pdoc GitHub action and updated README.md docs link.
  • Loading branch information
sheldonkwoodward authored Mar 13, 2020
1 parent 5a11d0d commit b633b7f
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 51 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/pdoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build and publish pdoc documentation
on:
push:
branches:
- master
jobs:
build-n-publish:
name: Build and publish pdoc documentation
runs-on: ubuntu-18.04
steps:
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install and upgrade build tool packages
run: |
pip install --upgrade setuptools twine wheel
- name: Install pdoc
run: |
pip install --upgrade pdoc
- name: Checkout master
uses: actions/checkout@v2
with:
path: pymkv
- name: Install pymkv
run: |
pip install pymkv
- name: Build docs
run: |
pdoc --html pymkv --html-dir ../docs --overwrite
working-directory: ./pymkv
- name: Checkout gh-pages
run: |
git fetch
git checkout gh-pages
working-directory: ./pymkv
- name: Copy doc files
run: |
cp docs/pymkv/* pymkv
- name: Commit doc files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git commit -m "Docs update."
working-directory: ./pymkv
- name: Push doc changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
directory: pymkv
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# pymkv
[![PyPI Version](https://img.shields.io/pypi/v/pymkv.svg)](https://pypi.python.org/pypi/pymkv)
[![License](https://img.shields.io/github/license/sheldonkwoodward/pymkv.svg)](https://github.com/sheldonkwoodward/pymkv/LICENSE.txt)
[![Code Quality](https://api.codacy.com/project/badge/Grade/e1fe077d95f74a5886c557024777c26c)](https://api.codacy.com/project/badge/Grade/e1fe077d95f74a5886c557024777c26c)

pymkv is a Python wrapper for mkvmerge. It provides support for muxing, splitting, linking, chapters, tags, and attachments through the use of mkvmerge.

## About pymkv
pymkv is a Python 3 library for manipulating MKV files with mkvmerge. Previously, I was constructing mkvmerge commands manually. They were becoming overly complex and unmanageable. To remedy this, I decided to write this library to make mkvmerge more scriptable and easier to use. Please open new issues for any bugs you find, support is greatly appreciated!

## Installation
mkvmerge must be installed on your computer. It is recommended to add it to your \$PATH variable but a different path can be manually specified. mkvmerge can be found and downloaded from [here] or in most package managers.

To install pymkv from PyPI, use the following command:

$ pip install pymkv

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

$ pip install -e .

## Documentation
The documentation for pymkv can be found in the [here](https://pymkv.shel.dev/).
46 changes: 0 additions & 46 deletions README.rst

This file was deleted.

11 changes: 6 additions & 5 deletions pymkv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@

from pkg_resources import get_distribution, DistributionNotFound

from .MKVAttachment import *
from .MKVTrack import *
from .MKVFile import *
from .Timestamp import *
from .Verifications import *
# package imports
from .MKVAttachment import MKVAttachment
from .MKVTrack import MKVTrack
from .MKVFile import MKVFile
from .Timestamp import Timestamp
from .Verifications import verify_matroska, verify_mkvmerge, verify_recognized, verify_supported


# set the version number within the package using setuptools-scm
Expand Down

0 comments on commit b633b7f

Please sign in to comment.