Can be used to create a folder structure which finally holds the actual daily note. If your 'daily' notes simply are a number of markdown files within a default folder, you will NOT need this plugin.
The purpose of this plugin is, to automate the daily creation of multiple folders and files.
You may want to install the following obsidian plugins:
-
Templater by SilentVoid Use this, to automatically generate 'folder not' and 'file' content.
-
Folder Notes by Lost Paul Use this, to display default notes, by clicking on folders
For compatibility reasons, 'daily note structure' uses 'moment.js' so all of 'moment.js' formats are available.
Additionally the following formats can be used:
Description | Token | Output |
---|---|---|
Month of the weeks first day | MOW | 1 2 ... 11 12 |
MoW | 1st 2nd ... 11th 12th | |
MMOW | 01 02 ... 11 12 | |
MMMOW | Jan Feb ... Nov Dec | |
MMMMOW | January February ... November December |
The format above may be useful for the first days of a new month, if you want to keep all 'dailies' of a week in the same folder.
Format patterns to be used by 'moment.js' must follow the format '{{ ... }}' and are replaced first.
Evaluation errors for bad format patterns can be found in obsidians developer console (++i) Note: Not every bad pattern will fail with an error. Some will silently return 'unexpected results'.
export interface FolderStructure {
type: "folder" | "file";
namepattern: string;
template?: string;
description?: string;
children?: FolderStructure[];
}
Using the FolderStructure interface, you can setup a 'structure' on the plugins settings page. The structure itself is an Array of FolderStructure objects.
[{
"type": "folder",
"namepattern": "{{YYYY}}",
"template": "Plugins/Templater/Templates/yearly_folder_note_template.md",
"description": "yearly folder base",
"children": [{
"type": "folder",
"namepattern": "{{MMOW}} - {{MMM}} {{YYYY}}",
"template": null,
"description": "folder matching the month for the first day in the week",
"children": [{
"type": "folder",
"namepattern": "KW {{WW}} ({{MMM}} {{YYYY}})",
"template": null,
"description": "folder matching the years week",
"children": [{
"type": "file",
"namepatern": "{{YYYY}}-{{MM}}-{{DD}}",
"template": "Plugins/Templater/Templates/daily_template.md"
}]
}]
}]
}]
Must be one of "folder" or "file"
A string, which can hold any combination of characters ad patterns. Patterns must follow '{{}}' with pattern being exactly one of 'moment.js' formats
Do not combine patterns inline. Don't use {{YYYY-MM-DD}}. The supported way of combining patterns would be '{{YYYY}}-{{MM}}-{{DD}}' instead.
An optional string, which can hold a path to a markdown file, that can be used as template. If a template is specified for 'type: "file"', the generated files content will be that of 'template'. If a template is specified for 'type: "folder"', a markdown file will be generated inside the folder, with the folders name, and its content will be that of 'template'. For best results, additionally install a 'folder note' plugin.
An optional string, which can be used to describe the files or folders purpose. This property currently is not used for anything else.
An Array of further FolderStructure nodes. This property is used by nodes of 'type: "folder"' only. If specified on "files", the property is ignored.