update directory regex

This commit is contained in:
ktyl 2023-03-13 23:21:08 +00:00
parent 555c2e767a
commit 2ddb5cb04c
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ if len(sys.argv) < 2:
# posts are arguments from index 1 onwards # posts are arguments from index 1 onwards
posts = sys.argv[1:] posts = sys.argv[1:]
dir_pattern = re.compile("(.+)/(blog\/.+\.html)") dir_pattern = re.compile("(.+)\/(\d{4}\/\d+\/\d+\/.+\.html)")
path_pattern = re.compile("(.+)\/(\d{4})\/(\d{1,2})\/(\d{1,2})\/(.+).html") path_pattern = re.compile("(.+)\/(\d{4})\/(\d{1,2})\/(\d{1,2})\/(.+).html")
title_pattern = re.compile("<h1>(.+)</h1>") title_pattern = re.compile("<h1>(.+)</h1>")