Last active
December 24, 2022 02:48
-
-
Save kjaymiller/bab7060204e7ac2da4fa540b3dbac6a1 to your computer and use it in GitHub Desktop.
Create Daily Log
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import pathlib | |
from datetime import datetime | |
today = datetime.today().strftime("%Y-%m-%d") | |
# Change the path to your notes folder | |
today_path = pathlib.Path(f"/PATH/TO/YOUR/NOTES/FOLDER/{today}.md") | |
if not today_path.exists(): | |
today_path.write_text(f"# {today}\n\n#This is a daily log\n\nBe sure to leave cursor on a new line") | |
today_path.touch(exist_ok=True) | |
with open(today_path, "a") as f: | |
f.write(f"- {sys.argv[1]}\n") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import pathlib | |
from datetime import datetime | |
today = datetime.today().strftime("%Y-%m-%d") | |
# Change the path to your notes folder | |
today_path = pathlib.Path(f"/PATH/TO/YOUR/NOTES/FOLDER/{today}.md") | |
if not today_path.exists(): | |
today_path.write_text(f"# {today}\n\n") | |
with open(today_path, "a") as f: | |
f.write(f"- {sys.argv[1]}\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can download the complete version at - https://kjaymiller.azureedge.net/media/Add%20to%20Daily%20Log.alfredworkflow