I am searching for a way to quickly open files that have dates in their file names, similar to how the ‘open daily note’ command works. I’ve attempted to find a plugin that could accomplish this task, but the only one I found (GitHub - SimplGy/obsidian-open-file-by-magic-date) is limited to opening only one file. Since I generate multiple notes each day, I need a more versatile solution. Could anyone help me locate a script or plugin that can help me achieve this?
I don’t fully understand what you’re asking for, but maybe these will help:
The Calendar plugin lets you open daily notes (or other periodic notes if you have the Periodic Notes plugin) of any date from the calendar.
Periodic Notes adds options for weekly, monthly, and yearly notes. Its documentation says it allows multiple sets of each kind, but that feature seems to be not implemented yet.
The Natural Language Dates plugin gives you some ways to work with date stuff.
There are also some plugins that let you bind any file to a command or things like that.
Here are examples of notes i want to open like daily note.
Journal 2023-03-01 Activities 2023-03-01 Log 2023-03-01
This notes are created each day the title is changing each day so when i bind this file
(Log 2023-03-01) to command like for example buttons, i can no longer open the file
(Log 2023-03-02) using the same button or command.
Are you aiming for one command for each type of file, so that you’ve got a
open-daily-journal type of commands?
Or do you want one command which opens all files from a given date?
(Not sure either of these exists, but just trying to clarify your use case)
I’m aiming for one command for each type of file, so that i’ve got a open-daily-log, a open-daily-activity, a open-daily-journal type of commands
The Natural Language Dates plugin lets you make special URLs for things like “today”. I’m not sure if it lets you make URLs that mix that with other text, but it’s worth looking into.
The documentation of the Periodic Notes plugin says it can pick up on filenames like the ones you mention, but I don’t know if that function is actually implemented yet (I haven’t tried it; also I wish the dev would only publish documentation for features that actually exist). If it is, and if your dated files are all in the same folder, that might be good enough for you.
If that feature doesn’t exist yet, you could still use Periodic Notes for at least one of your other sets of dated notes by setting the note name format to include (for example) “Activities”. You might also be able to misuse its Weekly and Monthly note features for your other notes by setting the note name format to include a day, but I’m guessing that might not work.
Create a Templater template like this:
<%* const file = tp.file.find_tfile('Log ' + moment().format('YYYY-MM-DD')) await app.workspace.getLeaf(false).openFile(file) %>
and then assign it to a hotkey. This will open the Log note with today’s date, in the case of today it will open the note titled
Make one for each of the functions you want - Log, Activities, and Journal.
Hi Thank you. Is there any alternative way to open this when i can’t use hotkeys because I’m using mobile
Thank you. I will look into it.
Yes, add a button to your mobile toolbar to run the hotkey:
I have a question. This will open notes with dates and create it if not existed?
You can easily modify the template to do that with
I will look into this. Thank you
Another option is if you have iOS you can make a shortcut that opens this file.
I bound this shortcut using LockFlow to a button on my iOS Lock Screen. So I can one-tap open my daily log.
But templater with commander seems nice. I’ll use that for an in-app solution.
Here’s a plug-in to turn a template into a command:
If you install the Beta version of Periodic Notes, you can use the Date Switcher to search for a date using natural language, then press Tab to see a list of all the notes matching that day.
OK, so there have been some acitivity since the last time I visited this thread, but I would like to sum up some of the choices related to your list of requirements:
- Have multiple commands related to open a new daily log, activity or journal
- Easy triggering on mobile, not using hotkeys
I think my solution towards these issues would either be to:
- Use Templater as suggested above to make templates for the various cases, and use it’s options to create commands out of the templates.
- Assign mobile buttons to the various commands
Or another would be to enter QuickAdd into the mix, and do:
- Create a Multi choice for each of your options, and then add each variant into that selection, and let that either create or open the corresponding note
- Assign this Multi choice as the swipe-down choice on mobile
The variants within the Multi of QuickAdd could either be QuickAdd’s own templates, or I think they could also utilise the Templater templates/commands if you want that. The choice of this depends on how advanced your templates are.
The main thing with this post is to make you aware of the QuickAdd plugin, and it’s possibility to be used from the swipe-down command in the mobile interface. I’ve researched just a little on it, but I’m planning on making multiple templates available from that menu myself related to some of my own needs.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.