cots.makemkv – MakeMKV’s Product Handler¶
This module is the product handler of MakeMKV from GuinpinSoft inc. The MakeMKV section gives more information about the installation process and the update mechanism.
Public Classes¶
This module has several public class listed below in alphabetical order.
Objects reference¶
This section details the objects defined in this module.
- class cots.makemkv.MakeMKVHandler¶
Bases:
cots.core.BaseProductMakeMKV product handler.
This concrete class implements the tracking mechanism for the MakeMKV product. So most of information are in the
coreand more particularly in theBaseProductclass documentation. The information below focuses on the added value of this class.- Overridden Methods
This class is a concrete class, so the overridden methods are listed below in alphabetical order.
- _get_change_summary(version=None)¶
Extract the release note’s URL from the PAD File.
- Parameters
version (str) – The version of the reference product (i.e. the deployed product). It’a string following the editor versioning rules.
- Returns
Trueif the download of the change log file went well. In case of failure, the members are not modified and an error log is written.- Return type
- Raises
TypeError – Parameters type mismatch.
- _get_field(path)¶
Get the value from a field in a PAD File.
- _get_published()¶
Extract the date of the installer’s publication from the PAD file.
- get_origin()¶
Get product information from the remote repository.
- is_update(product)¶
Return if this instance is an update of product.
This method compare the version of the two product, and return the comparison result. The version numbers used by the editor are compliant with the semantic versioning specification 2.0.0 (see
support.semvermodule)- Parameters
product (BaseProduct) – The reference product (i.e. the deployed one)
- Returns
Trueif this instance is an update of the product specified by theproductparameter.- Return type
- Raises
TypeError – Parameters type mismatch.
- class cots.makemkv.ReleaseNotesParser(version=None)¶
Bases:
html.parser.HTMLParserMakeMKV release notes parser.
This concrete class parses release notes and extracts notes since the deployed version.
- Parameters
version (str) – The version of the deployed product. It’s a string following the editor versioning rules.
- changelog¶
The changelog of the product since the deployed product (see
versionargument). It is a list of 3-tuple containing, in this order, the version (as a string using the editor versioning rules), the date of the installer’s publication (as a string using the ISO 8601 format) and the release note (as a string) using a simple HTML syntax (nested unordered list) as shown below.<ul> <li>Added support for AACS v60</li> <li>Small miscellaneous improvements and bugfixes</li> </ul>
- Type
- Using ReleaseNotesParser…
The main purpose of this class is to parse the revision history and fulfills the
changelogattribute. So the using is limited to create class instance and call thefeed()method with the content of the revision history file.- Examples
from cots.makemkv import ReleaseNotesParser parser = ReleaseNotesParser("1.9.8") with open(r".\history.html") as file: parser.feed(file.read()) print(parser.changelog)
- Inside ReleaseNotesParser…
This class is a derived class from
html.parser.HTMLParserby adding a scheduler to parse the HTML content. The figure below is the parser’s state graph.parser’s state graph¶
- _is_content_beginning(event, data, attributes)¶
- _is_content_ending(event, data, attributes)¶
- _is_new_release(event, data, attributes)¶
- _is_old_or_unknown_release(event, data, attributes)¶
- _is_release_id_beginning(event, data, attributes)¶
- _is_release_notes_beginning(event, data, attributes)¶
- _is_release_notes_ending(event, data, attributes)¶
- _is_releases_list_beginning(event, data, attributes)¶
- _is_releases_list_ending(event, data, attributes)¶
- _null_actuating(event, data, attributes, first=False, last=False)¶
Null state actuating.
- Parameters
event (int) – The event identifier
data (str) – The tag identifier (i.e. ul) or the text.
attributes (dict) – The attributes of the tag.
first (bool) – (optional) Indicate if it’s the first call of the actuating function (i.e. just after a state change (see
_set_state) including if it’s the same state).Falseis the default.last (bool) – (optional) Indicate if it’s the last call of the actuating function (i.e. just before a state change (see
_set_state) including if it’s the same state).Falseis the default.
- _process_event(event, data, attributes)¶
Process the event
- _release_id_computing()¶
Release id computing.
- _release_id_fetching(event, data, attributes, first=False, last=False)¶
Release state actuating.
- Parameters
event (int) – The event identifier
data (str) – The tag identifier (i.e. ul) or the text.
attributes (dict) – The attributes of the tag.
first (bool) – (optional) Indicate if it’s the first call of the actuating function (i.e. just after a state change (see
_set_state) including if it’s the same state).Falseis the default.last (bool) – (optional) Indicate if it’s the last call of the actuating function (i.e. just before a state change (see
_set_state) including if it’s the same state).Falseis the default.
- _release_notes_fetching(event, data, attributes, first=False, last=False)¶
Release notes state actuating.
- Parameters
event (int) – The event identifier
data (str) – The tag identifier (i.e. ul) or the text.
attributes (dict) – The attributes of the tag.
first (bool) – (optional) Indicate if it’s the first call of the actuating function (i.e. just after a state change (see
_set_state) including if it’s the same state).Falseis the default.last (bool) – (optional) Indicate if it’s the last call of the actuating function (i.e. just before a state change (see
_set_state) including if it’s the same state).Falseis the default.