diff --git a/src/modules/mscz.py b/src/modules/mscz.py index 63e070e..69fb5f6 100644 --- a/src/modules/mscz.py +++ b/src/modules/mscz.py @@ -9,6 +9,14 @@ import json Patches """ class Patches: + """ + Is meant to index and simplify the way to access a patch. + Instead of doing apply(.., .., mscz.create_pagebreaks(ext="mscx")) which is redundant and needs to specify mscx, + you can just do apply(.., .., mscz.patches.create_pagebreaks) + + To register a new patch outside of this file, just use @mscz.register_patch(ext=.., filename=..) (one of the two) + You can then access it the same way + """ def __init__(self): self._data = {} def __getattr__(self, key): @@ -18,6 +26,9 @@ class Patches: patches = Patches() def register_patch(ext=None, filename=None): + """ + Register a new patch. One of the two arguments is mandatory + """ if ext is None and filename is None: raise ValueError("You must specify at least one of the two parameters")