Open tyler-dot-earth opened 3 years ago
What constitutes a "blank" note might get trickier over time if things like logic/conditionals for templates are introduced (i.e. weekday-only blocks).
Thanks for the feature request. Janitor is a great idea. I've been thinking of having a long running background thread that would run Dendron: Doctor
on saved notes, do the sort of clean up you described, and in the future maybe auto-commit notes via git.
As for what constitutes a blank note, I think this will be different for different people. We would probably make this configurable on a global and a per-hierarchy basis. Configuration options I'm thinking of:
BlankFrontmatterCriteria:
- noFrontmatter
- noCustomFrontmatter
- noMatchRegex
BlankNoteContentCriteria:
- noContent
- noNonHeaderContent
- noNonTemplateContent
- noMatchRegex
BlankNoteCleaningSchedule:
- {num}{hours|days|weeks|months|custom}
For future viewers of this issue... here's another alternative / suggestion / tip to consider in lieu of a Janitor
command:
Aim to have lightweight templates + lots of snippets.
This will help you avoid having too much unused cruft lingering around in notes.
@tsnieman love the suggestion about templates + Snippets. I find that really useful too. Also, blank notes are useful as a mechanism for keeping track of how long an idea/stub takes to flush out. Personally, I don't think we want to do too many hacks here but rather invest in a more general purpose "hooks" mechanism that's been talked about in Discord recently: https://discordapp.com/channels/717965437182410783/735365126227493004/837316216929517598
Is your feature request related to a problem? Please describe. My problem: I find myself creating blank notes relatively frequently in my workflow. My workflow tends to be: breakfast, then sit down and open up 2 daily journals: 1 for personal, 1 for work. Sometimes I don't write anything in them, but I do like to create them.
Describe the solution you'd like a la
doctor
, ajanitor
command which cleans up blank notes. The command should ideally be able to run like Doctor (CTRL SHIFT P,Dendron: Doctor
) or after X amount of time (i.e. a week) after the note was created/the day the journal entry was based off of.Blank notes can be roughly described as:
Describe alternatives you've considered
Additional context n/a