Obsidian-Tasks-Timeline
Obsidian-Tasks-Timeline copied to clipboard
Dynamic taskFolder/dateFormat
In the Daily notes core plugin, I set up the Date format as YYYY/MM-MMMM/YYYY-MM-DD
and the New file location as timestamps
.
So it creates a hierarchy, as below
timestamps/
└── 2023
└── 08-August
├── 2023-08-07.md
├── 2023-08-09.md
└── 2023-08-10.md
So when I add tasks from the daily notes (that's where I put the tasks timeline) it should add tasks on the same file or follow the hierarchy. I tried to set up dailyNoteFolder
, dailyNoteFormat
, and dateFormat
but I couldn't achieve the expected outcome.
Is there anything I am doing wrong, or it's not possible to put the task on the same file or follow the hierarchy same as Daily notes?
I have my dailynotes set up in a similar fashion. You shouldn't have to specify the date format the same that you set for Daily Tasks, just leave it as the default YYYY-MM-DD
as that is the format for the file itself. The way you have it set currently is just to trick Obsidian into creating the new folders.
Yes, I want obsidian to create the folder and I like the tasks-timeline to add tasks on the same file when I add tasks from the quick input box. But it can't find the actual file. It creates a new file to add tasks. @ablizno
Ah I misunderstood. I thought you were saying they weren't showing up on the timeline. You want the quick entry box to add tasks to your daily note?
Yes @ablizno
I’ll see what I can do.
Kinda hacky, but I was able to come up with a work around.
For your usecase, set your dailyNoteFolder like this:
dailyNoteFolder: "timestamps/" + moment().format("YYYY/MM-MMMM")
I made a change in the code that works for my usecase, I'm not making a PR since this will be a breaking change.
Basically I changed:
const currentDailyNote = dailyNoteRootFolder + moment().format(dailyNoteFolder) + moment().format(dailyNoteFormat) + ".md";