This repository has been archived by the owner on Oct 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
1,157 additions
and
814 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
> :warning: Major version zero (0.y.z) is for initial development. Anything MAY change at any time. The public API SHOULD NOT be considered stable. | ||
## [0.2.0] | ||
|
||
### Added | ||
|
||
- Support for static type checking | ||
- Disc info is now structured using TypedDicts | ||
- Better error detection | ||
- Use [black](https://github.com/psf/black), | ||
[isort](https://github.com/PyCQA/isort), | ||
[flakeheaven](https://github.com/flakeheaven/flakeheaven), | ||
[flake8-annotations](https://github.com/sco1/flake8-annotations), | ||
[flake8-docstrings](https://github.com/PyCQA/flake8-docstrings) and | ||
[mypy](https://github.com/python/mypy) to enforce code style and quality | ||
|
||
### Changed | ||
|
||
- Lots of refactoring | ||
- Move main module to `makemkv/makemkv.py` | ||
- Messages of `makemkvcon` are now logged by a child logger | ||
- Improved output reliability for `pymakemkv` | ||
- Use [flit](https://github.com/pypa/flit) for packaging | ||
- Use `pyproject.toml` for packaging and tool configuration | ||
- [click](https://github.com/pallets/click) and | ||
[rich](https://github.com/Textualize/rich) are now optional dependencies, | ||
use `pip install makemkv[cli]` to install them | ||
- Use markdown and [mkdocs](https://github.com/mkdocs/mkdocs) for documentation | ||
|
||
### Removed | ||
|
||
- `MakeMKV.f()` / universal firmware tool support | ||
|
||
[0.2.0]: https://github.com/d-k-bo/python-makemkv/releases/tag/v0.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
# python-makemkv | ||
|
||
python-makemkv is a simple python wrapper for [MakeMKV](https://www.makemkv.com/) (written by | ||
GuinpinSoft inc.). While it can be imported as a module, it also offers | ||
a command-line interface that tries to be more intuitive than | ||
`makemkvcon`. | ||
|
||
## Requirements | ||
|
||
python-makemkv requires Python 3.9 or later. | ||
|
||
Additionally, a copy of MakeMKV is required, which can be downloaded | ||
from their [website](https://www.makemkv.com/). You also need to ensure | ||
that `makemkvcon` can be run from the terminal, e. g. by adding its | ||
location to your PATH environment variable. | ||
|
||
## Installation | ||
|
||
python-makemkv can be installed using pip. | ||
|
||
``` | ||
pip install makemkv | ||
``` | ||
|
||
If you want to use the CLI, you need to install it with | ||
|
||
``` | ||
pip install makemkv[cli] | ||
``` | ||
|
||
or install [click](https://github.com/pallets/click) and [rich](https://github.com/Textualize/rich) manually. | ||
|
||
## Usage | ||
|
||
See full documentation on [Read the | ||
Docs](https://python-makemkv.readthedocs.io/en/latest/index.html). | ||
|
||
To get information about discs, you need to instantiate a | ||
`makemkv.MakeMKV` object which provides its `makemkv.MakeMKV.info()` | ||
method. | ||
|
||
```python | ||
from pprint import pp | ||
from makemkv import MakeMKV | ||
|
||
makemkv = MakeMKV('/dev/sr0') | ||
disc_info = makemkv.info() | ||
pp(disc_info) | ||
|
||
``` | ||
|
||
To create a mkv file from the first title of the first disc you can use | ||
`makemkv.MakeMKV.mkv()`. Since this will take some time you can define a | ||
function that analyzes the program\'s progress or you can use the | ||
`makemkv.ProgressParser` class to show pretty progress bars. | ||
|
||
```python | ||
from makemkv import MakeMKV, ProgressParser | ||
|
||
with ProgressParser() as progress: | ||
makemkv = MakeMKV(0, progress_handler=progress.parse_progress) | ||
makemkv.mkv(0, '~/Videos/Really Cool Movie (2021)') | ||
``` | ||
|
||
python-makemkv uses the `logging` module from Python's standard library, | ||
see [Logging HOWTO](https://docs.python.org/3/howto/logging.html) to change | ||
the output format or verbosity. To change the verbosity of specific | ||
messages, you can modify the `makemkv.output_codes.MESSAGE_CODES` | ||
dictionary accordingly. If you think that the log level of a specific | ||
message isn't appropriate for most users, feel free to open an issue or a | ||
pull request. | ||
|
||
## Command-line interface | ||
|
||
``` | ||
Usage: pymakemkv COMMAND [OPTIONS] | ||
Options: | ||
-n, --disc-nr NR Specify disc number. Alternatively you can specify an | ||
input with -i/--input. Defaults to 0. | ||
-i, --input PATH Specify input, can be either a device, a .IFO file or | ||
a VIDEO_TS folder. | ||
-l, --minlength SECS Specify minimum title length in seconds. | ||
-c, --cache MB Specify size of read cache in megabytes. | ||
-f, --info-file FILE Write disc info to file. | ||
-j, --json Show disc info in JSON format. | ||
-v, --verbose Show more detailed logs. | ||
-q, --quiet Don't show logs. | ||
--no-bar Don't show progress bars. | ||
--no-info Don't show disc info. | ||
--help Show this message and exit. | ||
-t, --title NR Select title to be ripped, can be either an integer | ||
starting with 0 or the keyword "all". Defaults to 0. | ||
[Commands: mkv] | ||
-o, --output DIR Specify output directory for created mkv files. | ||
Defaults to current directory. [Commands: mkv, backup] | ||
-d, --decrypt Decrypt stream files during backup. [Commands: backup] | ||
Commands: | ||
backup Backup whole disc. | ||
info Display information about a disc. | ||
mkv Copy titles from disc. | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Command-line interface | ||
|
||
``` | ||
Usage: pymakemkv COMMAND [OPTIONS] | ||
Options: | ||
-n, --disc-nr NR Specify disc number. Alternatively you can specify an | ||
input with -i/--input. Defaults to 0. | ||
-i, --input PATH Specify input, can be either a device, a .IFO file or | ||
a VIDEO_TS folder. | ||
-l, --minlength SECS Specify minimum title length in seconds. | ||
-c, --cache MB Specify size of read cache in megabytes. | ||
-f, --info-file FILE Write disc info to file. | ||
-j, --json Show disc info in JSON format. | ||
-v, --verbose Show more detailed logs. | ||
-q, --quiet Don't show logs. | ||
--no-bar Don't show progress bars. | ||
--no-info Don't show disc info. | ||
--help Show this message and exit. | ||
-t, --title NR Select title to be ripped, can be either an integer | ||
starting with 0 or the keyword "all". Defaults to 0. | ||
[Commands: mkv] | ||
-o, --output DIR Specify output directory for created mkv files. | ||
Defaults to current directory. [Commands: mkv, backup] | ||
-d, --decrypt Decrypt stream files during backup. [Commands: backup] | ||
Commands: | ||
backup Backup whole disc. | ||
info Display information about a disc. | ||
mkv Copy titles from disc. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# python-makemkv | ||
|
||
python-makemkv is a simple python wrapper for [MakeMKV](https://www.makemkv.com/) (written by | ||
GuinpinSoft inc.). While it can be imported as a module, it also offers | ||
a command-line interface that tries to be more intuitive than | ||
`makemkvcon`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Installation | ||
|
||
python-makemkv can be installed using pip. | ||
|
||
``` | ||
pip install makemkv | ||
``` | ||
|
||
If you want to use the CLI, you need to install it with | ||
|
||
``` | ||
pip install makemkv[cli] | ||
``` | ||
|
||
or install [click](https://github.com/pallets/click) and [rich](https://github.com/Textualize/rich) manually. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Reference | ||
|
||
::: makemkv.MakeMKV | ||
|
||
::: makemkv.MakeMKVError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Reference | ||
|
||
## `makemkv.output_codes` | ||
|
||
### `MESSAGE_CODES` | ||
|
||
A dict mapping each message id to a specific loglevel. | ||
|
||
The messsage strings can be found in `makemkvgui/src/str/en_utf16.cpp` | ||
(in `makemkv-oss-1.16.1.tar.gz`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Reference | ||
|
||
::: makemkv.ProgressParser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Reference | ||
|
||
::: makemkv.types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Requirements | ||
|
||
python-makemkv requires Python 3.9 or later. | ||
|
||
Additionally, a copy of MakeMKV is required, which can be downloaded | ||
from their [website](https://www.makemkv.com/). You also need to ensure | ||
that `makemkvcon` can be run from the terminal, e. g. by adding its | ||
location to your PATH environment variable. |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.