diff --git a/.gitea/workflows/production/build-deploy-docs.yml b/.gitea/workflows/production/build-deploy-docs.yml index f834172..3c22009 100644 --- a/.gitea/workflows/production/build-deploy-docs.yml +++ b/.gitea/workflows/production/build-deploy-docs.yml @@ -1,9 +1,11 @@ on: push: - # paths: - # - "content/**" - # - "static/**" - # - "templates/**" + paths: + - "content/**" + - "static/**" + - "templates/**" + - ".conf/**" + - ".gitea/**" branches: - "main" diff --git a/entry b/entry new file mode 100755 index 0000000..85d7e0a --- /dev/null +++ b/entry @@ -0,0 +1,50 @@ +#!/usr/bin/env python3 + +import os +from datetime import datetime + +# Get the current date and time +now = datetime.now() +year = now.strftime("%Y") +month = now.strftime("%m") +day = now.strftime("%d") +time_str = now.strftime("%H:%M") +time_str_sec = now.strftime("%H%M%S") + + + +if str(day).endswith("1"): suffix = "st" +elif str(day).endswith("2"): suffix = "nd" +elif str(day).endswith("3"): suffix = "rd" +else: suffix = "th" + + + +# Create the directory structure +directory = os.path.join("content", year, month, day) +os.makedirs(directory, exist_ok=True) + +# Define the filename +filename = f"blog-entry-{time_str_sec}.md" +file_path = os.path.join(directory, filename) + +print(file_path) + + +HEADER = f'''title: +description: +tags: +date: {year}-{month}-{day} {time_str} + +# Blog Entry + +''' + + +# Create the Markdown file and write the header +with open(file_path, 'a+') as file: + header = HEADER + file.write(header) + file.close() + +print(f"Blog entry created: {file_path}")