diff --git a/CHANGELOG.md b/CHANGELOG.md index 955c8b0f..5d4aae9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Skip **already rendered** Bitmaps in `bibata-core` +- Cursors `builder` docs ### Changed diff --git a/build.py b/build.py index 839e4104..49d2fe68 100644 --- a/build.py +++ b/build.py @@ -27,6 +27,7 @@ def get_args_parser() -> ArgumentParser: def build() -> None: + """ Build Bibata cursor """ parser = get_args_parser() try: args = parser.parse_args() diff --git a/builder/bundler.py b/builder/bundler.py index cb3d238f..c85e4afe 100644 --- a/builder/bundler.py +++ b/builder/bundler.py @@ -32,9 +32,6 @@ class Bundler(): """ def __init__(self, config: ConfigProvider) -> None: - """ - docsstring - """ self.__name = config.name self.__tmpdir = config.tmpdir self.__x11_dest = path.join(config.out_dir, self.__name) @@ -42,17 +39,13 @@ class Bundler(): self.__content = config.get_windows_script() def __save_win_install_script(self) -> None: - """ - docstring - """ + """ Save `install.inf` file in windows cursor theme. """ file_path = path.join(self.__win_dest, "install.inf") with open(file_path, "w") as file: file.write(self.__content) def __clean_win_bundle(self) -> None: - """ - docstring - """ + """ Remvoe unnecessary cursor from directory generated by `clickgen` """ # Remove & Rename cursors # If Key found => Rename else Remove for cursor in listdir(self.__win_dest): @@ -67,24 +60,18 @@ class Bundler(): self.__save_win_install_script() def win_bundle(self) -> None: - """ - docstring - """ + """ Make cursor theme installable on `Windows OS`. """ src = path.join(self.__tmpdir, self.__name, "win") shutil.copytree(src, self.__win_dest) self.__clean_win_bundle() def x11_bundle(self) -> None: - """ - docstring - """ + """ Make cursor theme installable on `x11`. """ src = path.join(self.__tmpdir, self.__name, "x11") shutil.copytree(src, self.__x11_dest, symlinks=True) def bundle(self) -> None: - """ - docstring - """ + """ Make cursor theme installable on `x11` & `Windows OS`. """ x11_src = path.join(self.__tmpdir, self.__name, "x11") shutil.copytree(x11_src, self.__x11_dest, symlinks=True) diff --git a/builder/config.py b/builder/config.py index 6c9b37cf..60ccc150 100644 --- a/builder/config.py +++ b/builder/config.py @@ -24,9 +24,6 @@ class ConfigProvider(): """ def __init__(self, name: str, bitmaps_dir: str, out_dir: str) -> None: - """ - docsstring - """ # cleanup old packages if path.exists(out_dir): shutil.rmtree(out_dir) @@ -45,9 +42,7 @@ class ConfigProvider(): self.out_dir: str = path.abspath(out_dir) def get_windows_script(self) -> str: - """ - docsstring - """ + """ Get `install.inf` content for this cursor theme. """ with open(path.join(__path__[0], "windows.inf")) as f: data = f.read() inf_content = data.replace( diff --git a/builder/cursor.py b/builder/cursor.py index b9da9bd8..2b99c16e 100644 --- a/builder/cursor.py +++ b/builder/cursor.py @@ -12,18 +12,13 @@ class CursorBuilder(): """ def __init__(self, config: ConfigProvider) -> None: - """ - docstring - """ self.__name = config.name self.__bitmaps_dir = config.bitmaps_dir self.__bundler = Bundler(config) self.__tmpdir = config.tmpdir def build_x11_cursors(self) -> None: - """ - docstring - """ + """ Build `x11` platform cursors. """ print('🌈 Building %s Theme ...' % self.__name) build_x11_cursor_theme( name=self.__name, @@ -38,9 +33,7 @@ class CursorBuilder(): self.__bundler.x11_bundle() def build_win_cursors(self) -> None: - """ - docstring - """ + """ Build `Windows` platform cursors. """ print('🌈 Building %s Theme ...' % self.__name) build_win_cursor_theme( name=self.__name, @@ -55,9 +48,7 @@ class CursorBuilder(): self.__bundler.win_bundle() def build_cursors(self) -> None: - """ - docstring - """ + """ Build `x11` & `Windows` platform cursors. """ print('🌈 Building %s Theme ...' % self.__name) build_cursor_theme( name=self.__name, diff --git a/builder/log.py b/builder/log.py index aefd7d0b..84c4f7ac 100644 --- a/builder/log.py +++ b/builder/log.py @@ -6,8 +6,6 @@ import os def save_logs_to_file() -> None: - """ - Save `clickgen` logs to `build.log` in current working directory - """ + """ Save `clickgen` logs to `build.log` in current working directory. """ logging.basicConfig(filename='%s/build.log' % os.getcwd(), filemode='w', format='%(name)s - %(levelname)s - %(message)s', level=logging.DEBUG)