Offer useful scripts and css snippets for obsidian.
This template will detect modify behaviors and help you to record which notes that you modified today, automatically inserting these notes to any place of your daily notes.
The template is modular that:
- You don't have to modify your current daily notes templates at all.(But you can also customize a place for recording)
- You can either insert the note to an existing place like the end of daily note, or modify your daily note template to add a place for inserting.
- You can customize the query to collect the code. The query is the same as
Dataview Query
.
Prerequisites:
- You need to install the Templater plugin and Dataview plugin
- In setting of Templater plugin, ensure that the folder template is enabled to auto-enforce daily note template to new created daily notes
- You need to specify a folder to store your templates in the setting of Templater plugin
Steps:
- Copy and Paste the
Insert Modified Notes to Daily Notes.md
to your template folder - Modify the
Constants
:RECORD_NOTE_FOLDER
,QUERY_STRING
,START_POSITION
,END_POSITION
- In the setting of Templater plugin, add this template as "start-up template"
By default, the record folder is "Logs/Daily Notes". You should adjust it to your daily note folder.
You can seamlessly move your dataview query here but deleting the line-breaks. By default, will use the data in this dataview query:
```dataview
table WITHOUT ID
file.link as "Modified Notes", file.mtime as "Edit Time"
from !"MyTestFolder"
where file.mday = date(today)
sort file.mtime asc
limit 32
```
This string defines where to insert the data. Not only the admonition plugin is supported, but for all other plugins. By default, this will insert a table of data to an admonition-callout:
```ad-note
title: Modified Notes on this day
collapse: close
```
It's also recommended to place it under a title(Require this title exist in your daily note template):
START_POSITION = "#### Dataview Query";
END_POSITION = "#### Dataview JS";
If you want to insert to the end of your daily note, just leave END_POSITION
blank.
Ensure the format is corresponding to all cases below:
- Your current daily notes
- Plugins that may modify daily note (if you have, such as Periodic Note plugin)
- Templates that may modify daily note (if you have, such as
folder template
/startup template
in templater plugin)
By default, the format will be "YYYY-MM-DD", which will target on daily note with file name: 2024-12-23.md
for example.
Misplacing the daily note format may cause issues such as templater could not fetch the target note.
Also be of caution if you have a template file that will auto-rename the file name of your daily note.