add clean prior to copytree in editionify/compile_html_file
This commit is contained in:
parent
cf42b060eb
commit
5065efd37e
@ -311,10 +311,10 @@ def compile_html_file(
|
|||||||
f"(To overwrite any files existing in the output folder, "
|
f"(To overwrite any files existing in the output folder, "
|
||||||
f"set overwrite = True for this builder.)")
|
f"set overwrite = True for this builder.)")
|
||||||
|
|
||||||
|
shutil.rmtree(output_folder)
|
||||||
shutil.copytree(
|
shutil.copytree(
|
||||||
Path(build_state['public_wiki_folder']) / "output",
|
Path(build_state['public_wiki_folder']) / "output",
|
||||||
Path(output_folder),
|
Path(output_folder),
|
||||||
dirs_exist_ok=True
|
|
||||||
)
|
)
|
||||||
info(f"Successfully copied built output to {os.path.abspath(output_folder)}.")
|
info(f"Successfully copied built output to {os.path.abspath(output_folder)}.")
|
||||||
|
|
||||||
@ -566,15 +566,15 @@ def editionify(target_folder: str, description: str) -> None:
|
|||||||
name of the folder).
|
name of the folder).
|
||||||
|
|
||||||
:param target_folder: The folder to copy the output folder to.
|
:param target_folder: The folder to copy the output folder to.
|
||||||
Note that the output folder will be merged into this folder
|
This folder *will be deleted* if it already exists
|
||||||
if it exists.
|
prior to the copy.
|
||||||
:param description: The description of this edition to use in the new edition's
|
:param description: The description of this edition to use in the new edition's
|
||||||
``tiddlywiki.info`` file.
|
``tiddlywiki.info`` file.
|
||||||
"""
|
"""
|
||||||
|
shutil.rmtree(target_folder)
|
||||||
shutil.copytree(
|
shutil.copytree(
|
||||||
build_state['public_wiki_folder'],
|
build_state['public_wiki_folder'],
|
||||||
target_folder,
|
target_folder,
|
||||||
dirs_exist_ok=True
|
|
||||||
)
|
)
|
||||||
with (Path(target_folder) / "tiddlywiki.info").open("r") as f:
|
with (Path(target_folder) / "tiddlywiki.info").open("r") as f:
|
||||||
tinfo = json.load(f)
|
tinfo = json.load(f)
|
||||||
|
Loading…
Reference in New Issue
Block a user