diff --git a/rwx/__init__.py b/rwx/__init__.py index a721b9a..a1c5ee6 100644 --- a/rwx/__init__.py +++ b/rwx/__init__.py @@ -1,2 +1,3 @@ """Read Write eXecute.""" + __version__ = "0.0.1" diff --git a/rwx/cmd/squashfs/__init__.py b/rwx/cmd/squashfs/__init__.py index 343461e..322186c 100644 --- a/rwx/cmd/squashfs/__init__.py +++ b/rwx/cmd/squashfs/__init__.py @@ -6,10 +6,14 @@ rwx.cmd.need("mksquashfs") def mksquashfs(input_root: str, output_file: str): - ps.run([ - "mksquashfs", - input_root, - output_file, - "-comp", "zstd", - "-Xcompression-level", str(18), - ]) + ps.run( + [ + "mksquashfs", + input_root, + output_file, + "-comp", + "zstd", + "-Xcompression-level", + str(18), + ] + ) diff --git a/rwx/grub/__init__.py b/rwx/grub/__init__.py index 57e313c..2b44e57 100644 --- a/rwx/grub/__init__.py +++ b/rwx/grub/__init__.py @@ -17,8 +17,13 @@ MODULES = { } -def make_image(image_format: str, image_path: str, modules: list[str], - memdisk_path: str, pubkey_path: str | None = None) -> None: +def make_image( + image_format: str, + image_path: str, + modules: list[str], + memdisk_path: str, + pubkey_path: str | None = None, +) -> None: args = [ ("grub-mkimage",), ("--compress", COMPRESSION), diff --git a/rwx/log/__init__.py b/rwx/log/__init__.py index 3502ab5..fcf01aa 100644 --- a/rwx/log/__init__.py +++ b/rwx/log/__init__.py @@ -16,6 +16,8 @@ def get_file_logger(name: str) -> logging.Logger: logger.setLevel(logging.INFO) # return logger + + def get_stream_logger() -> logging.Logger: out_handler = logging.StreamHandler(stream=sys.stdout) out_handler.setLevel(logging.INFO) @@ -25,4 +27,6 @@ def get_stream_logger() -> logging.Logger: logger.setLevel(logging.INFO) # return logger + + stream = get_stream_logger() diff --git a/rwx/prj/sphinx.py b/rwx/prj/sphinx.py index ccb8d0f..b09d8ee 100644 --- a/rwx/prj/sphinx.py +++ b/rwx/prj/sphinx.py @@ -15,12 +15,18 @@ class SphinxProject(Project): wipe(output_root) arguments: list[str] = [ "-E", - "-j", "2", - "-b", "html", - "-D", f"project={self.name}", - "-D", "master_doc={}".format("index"), - "-D", "html_theme={}".format("sphinx_rtd_theme"), - "-c", self.root, + "-j", + "2", + "-b", + "html", + "-D", + f"project={self.name}", + "-D", + "master_doc={}".format("index"), + "-D", + "html_theme={}".format("sphinx_rtd_theme"), + "-c", + self.root, # "-C", path.join(self.root, self.name), path.join(output_root, self.name),