Skip to content

Commit

Permalink
Add --today option to docs/build.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ryukau committed Jun 29, 2022
1 parent 54bc2c8 commit 14918f2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ def get_last_modified(md):
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("-r", "--rebuild", action='store_true', help="rebuild all file")
parser.add_argument("-t",
"--today",
action='store_true',
help="use timestamp of today")
args = parser.parse_args()

md_info = read_build_info(args.rebuild)
Expand Down Expand Up @@ -57,7 +61,7 @@ def get_last_modified(md):
if index_relpath == "index.html":
index_relpath = ""

last_modified = get_last_modified(md)
last_modified = time.strftime("%F") if args.today else get_last_modified(md)

subprocess.run([
"pandoc",
Expand Down

0 comments on commit 14918f2

Please sign in to comment.