diff --git a/src/main/python/ttconv/filters/doc/__init__.py b/src/main/python/ttconv/filters/doc/__init__.py index 4567a21e..d6c21d3c 100644 --- a/src/main/python/ttconv/filters/doc/__init__.py +++ b/src/main/python/ttconv/filters/doc/__init__.py @@ -23,13 +23,15 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -"""Data model filter""" +"""Collects document instance filters""" import importlib import pkgutil import os.path import sys +# registers all document instance filters + for importer, package_name, _ in pkgutil.iter_modules([os.path.dirname(__file__)]): full_name = f"{__name__}.{package_name}" importlib.import_module(full_name) diff --git a/src/main/python/ttconv/filters/isd/__init__.py b/src/main/python/ttconv/filters/isd/__init__.py index 88851cf2..22a58522 100644 --- a/src/main/python/ttconv/filters/isd/__init__.py +++ b/src/main/python/ttconv/filters/isd/__init__.py @@ -23,7 +23,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -"""Data model filter""" +"""Collects ISD filters""" diff --git a/src/main/python/ttconv/filters/remove_animations.py b/src/main/python/ttconv/filters/remove_animations.py index 29f1070f..9691472c 100644 --- a/src/main/python/ttconv/filters/remove_animations.py +++ b/src/main/python/ttconv/filters/remove_animations.py @@ -23,7 +23,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -"""Filter removing animations""" +"""Filter that remove animations""" import logging from typing import Dict, List, Type @@ -41,6 +41,7 @@ def has_removed_animations(self) -> bool: return self._has_removed_animations def process_element(self, element: ContentElement, recursive = True): + """Removes animations from content elements""" for step in element.iter_animation_steps(): element.remove_animation_step(step) diff --git a/src/main/python/ttconv/filters/supported_style_properties.py b/src/main/python/ttconv/filters/supported_style_properties.py index 6f6c09a4..1ba8e90a 100644 --- a/src/main/python/ttconv/filters/supported_style_properties.py +++ b/src/main/python/ttconv/filters/supported_style_properties.py @@ -23,7 +23,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -"""Filter for style properties supported by the output""" +"""Filters style properties""" import logging from typing import Dict, List, Type @@ -32,12 +32,13 @@ from ttconv.style_properties import StyleProperty class SupportedStylePropertiesFilter: - """Filter that remove unsupported style properties""" + """Filter that removes unsupported style properties""" def __init__(self, supported_style_properties: Dict[Type[StyleProperty], List]): self.supported_style_properties = supported_style_properties def process_initial_values(self, doc: ContentDocument): + """Removes initial values that target unsupported style properties""" for style_prop, value in list(doc.iter_initial_values()): if style_prop in self.supported_style_properties: @@ -49,7 +50,7 @@ def process_initial_values(self, doc: ContentDocument): doc.put_initial_value(style_prop, None) def process_element(self, element: ContentElement, recursive = True): - """Filter element style properties""" + """Removes unsupported style properties from content elements""" for style_prop in list(element.iter_styles()):