Verified Commit 2c56cb17 authored by Jakob Moser's avatar Jakob Moser
Browse files

Create directories if they don't exist

parent 7fd06006
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
[project]
name = "coliverter"
version = "0.4.0"
version = "0.4.1"
authors = [
  { name="Jakob Moser", email="moser@cl.uni-heidelberg.de" },
]
+9 −6
Original line number Diff line number Diff line
@@ -54,14 +54,17 @@ def _convert_single_guessing_output_path(
    output_dir_path: Path,
    output_format: FileFormat,
) -> None:
    _convert_single(
        markdown_file_path,
        output_dir_path
        / (
    guessed_out_file_path = output_dir_path / (
        markdown_file_path.relative_to(markdown_dir_path).with_suffix(
            f".{output_format}"
        )
        ),
    )

    guessed_out_file_path.parent.mkdir(parents=True, exist_ok=True)

    _convert_single(
        markdown_file_path,
        guessed_out_file_path,
        output_format,
    )