Commit 4732f1b5 authored by Marien Fressinaud's avatar Marien Fressinaud

add: Display written file paths

It permits to open the files easily in a web browser without guessing
the name of the generated file.
parent 1b2b1863
......@@ -137,6 +137,7 @@ def main():
raise ProgramError("./index.html file does not exist")
index_output_filepath = os.path.join(output_path, "index.html")
shutil.copyfile(index_filepath, index_output_filepath)
print(f"Written: file://{os.path.abspath(index_output_filepath)}")
# Check that a ./static folder exists and copy its content under the ./site
# folder
......@@ -194,6 +195,7 @@ def main():
output_filepath = os.path.join(output_path, f"{article.slug()}.html")
with open(output_filepath, "w") as output_file:
output_file.write(article.render())
print(f"Written: file://{os.path.abspath(output_filepath)}")
# Just create some variables so it's easier to manipulate after
site_url = configuration["SITE_URL"]
......@@ -239,6 +241,7 @@ def main():
os.mkdir(feed_dirpath)
feed_filepath = os.path.join(feed_dirpath, "all.atom.xml")
feed.write(feed_filepath)
print(f"Written: file://{os.path.abspath(feed_filepath)}")
if __name__ == "__main__":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment