Problem: Adding Dates to Markdown Files

Keeping track of when a markdown file was created or updated can be important for various reasons such as historical reference, version control, or organizing files by date. However, adding the date manually to each file can be time-consuming and prone to errors.

Solution: Automating the Process with Python

We present a collection of four Python scripts that automate the process of adding dates to your markdown files. Each script offers a unique approach to solving the problem, making it easy for you to choose the best fit for your workflow.

date-adder-increment-step.py

This script adds a specified number of days to the current date for each file in a directory. This can be useful if you have multiple files and want to have them sorted in a specific order.

Learn more about this script

date-adder-increment.py

This script adds a specified number of days to the current date for each file in a directory. The difference from the first script is that this one increments the date by one day for each file processed, rather than adding a fixed number of days.

Learn more about this script

date-adder-now.py

This script adds the current date and time to each file in a directory. This can be useful if you want to have a record of exactly when each file was processed.

Learn more about this script

date-adder-set.py

This script adds a user-specified date to each file in a directory. This can be useful if you want to set a specific date for all files, such as the date of a project deadline.

Learn more about this script

Wrap Up

We hope this collection of Python scripts helps you add dates to your markdown files with ease. Each script offers a unique approach to the problem, so you can choose the best fit for your workflow. To learn more about each script, be sure to check out the corresponding readme files.