diff --git a/src/dialann/main_cli.py b/src/dialann/main_cli.py index f3048f1..11f18e3 100644 --- a/src/dialann/main_cli.py +++ b/src/dialann/main_cli.py @@ -10,7 +10,8 @@ logger = logging.getLogger(__name__) def cli_generate(source_dir: Path, build_dir: Path): - config = Config(source_dir.resolve(), build_dir.resolve()) + config = Config(source_dir.resolve(), + build_dir.resolve()) generate(config) @@ -23,7 +24,10 @@ def main_cli(): help="Path to the build output", ) parser.add_argument( - "--source_dir", type=Path, default=Path(), help="Site source directory" + "--source_dir", + type=Path, + default=Path(), + help="Site source directory" ) args = parser.parse_args() diff --git a/src/dialann/site_generator.py b/src/dialann/site_generator.py index 5fe2435..9fbedf6 100644 --- a/src/dialann/site_generator.py +++ b/src/dialann/site_generator.py @@ -28,6 +28,7 @@ def _replace_content(src: Path, dst: Path): def _write_file(path: Path, content: str): os.makedirs(path.parent, exist_ok=True) + print("writing to:", path) with open(path, "w", encoding="utf-8") as f: f.write(content) @@ -54,6 +55,7 @@ def generate(config: Config): parser = MarkdownIt() sources = config.source_dir.glob("**/*.md") for source in sources: + print("processing source: ", source) content = _read_file(source) output = parser.render(content) output_path = _get_transformed_path(config, source, "html")