NotePlan / plugins

The main NotePlan repository, which contains the source code for all NotePlan plugins. If a release entry has been created, it will be available for installation from within NotePlan application.
MIT License
165 stars 56 forks source link

QuickAdd Plugin (more of an "how to" than a "feature request", actually) #335

Open Hileotech opened 2 years ago

Hileotech commented 2 years ago

I'm a new user of NotePlan, coming from Roam and landed into Obsidian and Logseq. So, please forgive me if this question has already been posted/answered here or in other places (Discord, Reddit...)

Is your feature request related to a problem? Please describe. I would like to be able to insert today's date using QuickAdd when appending my text to a note

Describe the solution you'd like I know that I could simply write today's date "by hand" (i.e. "2022-08-29" or whatever), but wouldn't it be simpler if I could just write something like ">date" (or whatever, of course)?

Describe alternatives you've considered Manually writing today's date (see above)

Additional context I'm trying to keep track of the topic(s) I talk about in my classes, and it would be really useful to append the topic to the appropriate section of the class' "big note" using today's date as a marker. No need to link to daily notes (I mean: no [[2022-08-29]], no ">2022-08-29")

jgclark commented 2 years ago

The settings for the plugin include this: "Text to append to new inbox tasks: optional text (that can include hashtags or mentions) to append to any tasks captured to the inbox."

At the moment I can't think of a way to get this text to automatically update. I could make it so that it uses standard date elements for parsing (e.g.YYYY-MM-DD) but leaving other punctuation as is. Would that work?

dwertheimer commented 2 years ago

@Hileotech The next version of Templating provides the ability to do this using "self-running templates". You can have it append/prepend any text you want as defined in your template. I don't know @mikeerickson's timeline for release of Templating2.0, so for the moment, you can do what you're doing and use the "DateAutomations" plugins to insert dates by hand. cc: @jgclark

CleanShot 2022-08-28 at 14 55 00@2x
Hileotech commented 2 years ago

Thank you both for your answers. @dwertheimer : I'm not (yet?) using a template for this workflow. I just (plan to) create a note for each class (i.e. "1A", "2A", etc) in which I have multiple headings (i.e. "# Topics", "# Assignments", "# Papers" etc). I just need to quickly add a few lines each time I talk about a certain topic in a certain class. I found QuickAdd the only plugin that could make this without searching for "1A" Note, scrolling to the right heading etc. @jgclark : I hope I understand your answer right: I don't care about "date format", as long as is "human readable" (forget about "492.309u234.040.94095" for "today", please). My ideal workflow would be:

The reason I'm looking to implement this "workflow" is that I have 18 different classes each week, from September to May, and you can easily understand that if I don't annotate properly. (and in an efficient way...) what I talk about in each class, I wouldn't be able to do my job. That's why I'm looking for a frictionless and quick way to add topics to the right class with the right date.

PS: until now I've been using Obsidian's Daily Note and Dataview to do this job, but I'm planning to leave Obsidian for a series of reasons that would go OT in this thread.

PPS: thank you again, both for you answer and your plugin!

EDIT: added some more infos.

jgclark commented 2 years ago

@Hileotech, thanks for confirming what I thought you were after. @dwertheimer, I can't see Templating 2.0 doing this without some JS as well. So I can build it into Quick Capture.

dwertheimer commented 2 years ago

I've been trying all morning to demonstrate what I had in mind. There was a NotePlan bug that had me running in circles. I wrote a piece of the Templating 2.0 which is how I know it will do it. But it's not released and not documented, so if @jgclark can build it into the plugin, that would be great.

On Mon, Aug 29, 2022 at 1:05 AM, Jonathan Clark @.***> wrote:

@Hileotech https://github.com/Hileotech, thanks for confirming what I thought you were after. @dwertheimer https://github.com/dwertheimer, I can't see Templating 2.0 doing this without some JS as well. So I can build it into Quick Capture.

— Reply to this email directly, view it on GitHub https://github.com/NotePlan/plugins/issues/335#issuecomment-1229923354, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACEI6VBHBHO7PBSB5WYWAJ3V3RVLXANCNFSM573V2UOA . You are receiving this because you were mentioned.Message ID: @.***>

dwertheimer commented 2 years ago

I know that @nmn is hoping to add some DataView-ish functionality in a plugin. @Hileotech said:

I teach and I need to keep track (even over the years) of what I talk about in any and each specific class. That's because some things that "happens" during courses simply don't find place (and really shouldn't) in official registers. I learnt, over my (quite long) career that it's better to rely on "class notes" than to rely on memory. In Obsidian I simply used Daily Notes and Dataview, like that: in today's daily note I would write something like "c1A:: Done this and that"; in "1A big-note-page" a simple Dataview query scanned all DailyNotes (within a certain range of time and/or folders) and showed all recurrences of "c1A" (don't ask why I needed to prepend a letter, but apparently Dataview doesn't/didn't like searches for strings beginning with numbers...) in a table. And this table is what I'm trying to replicate within NP, hopefully frictionlessly. To make things a little harder, each class notes should have some sections: not only "topics" (what I talked about and when), but even "Assignments", a section to include my Student's work (I call it "Papers"), a section to jot down notes about the class and/or single Students emerging during formal or informal meetings (call it "General Notes"). So it's fundamental that each entry goes under the right heading (I don't want a note like "John Doe did this" to go under the "Papers" section of the Class note). Hope this clarifies my needs. To be clear: I still haven't begun implementing this system, so any change to the structure I'm talking about is possible, even if it required to rethink from scratch the whole system. But I can't miss these three or four kind of information I need to retain and to find easily and quickly.

On Mon, Aug 29, 2022 at 12:26 AM, Hileotech @.***> wrote:

Thank you both for your answers. @dwertheimer https://github.com/dwertheimer : I'm not (yet?) using a template for this workflow. I just (plan to) create a note for each class (i.e. "1A", "2A", etc) in which I have multiple headings (i.e. "# Topics", "# Assignments", "# Papers" etc). I just need to quickly add a few lines each time I talk about a certain topic in a certain class. I found QuickAdd the only plugin that could make this without searching for "1A" Note, scrolling to the right heading etc. @jgclark https://github.com/jgclark : I hope I understand your answer right: I don't care about "date format", as long as is "human readable" (forget about "492.309u234.040.94095" for "today", please). My ideal workflow would be:

  • launch QuickAdd (/qalh)
  • select the correct note/class (say "1A")
  • select the right heading (say "Topics")
  • when inserting the topic I would like to insert a string (say ">today" or even better ">td" or whatever leading character) for QuickAdd to automatically add today's date and a few words resuming the topic (example: ">td Talked about John Doe's life" should render in note: "2022-08-29 Talked about John Doe's life")
  • Hit enter and... voilà.

The reason I'm looking to implement this "workflow" is that I have 18 different classes each week, from September to May, and you can easily understand that if I don't annotate properly. (and in an efficient way...) what I talk about in each class, I wouldn't be able to do my job. That's why I'm looking for a frictionless and quick way to add topics to the right class with the right date.

PS: until now I've been using Obsidian's Daily Note and Dataview to do this job, but I'm planning to leave Obsidian for a series of reasons that would go OT in this thread.

PPS: thank you again, both for you answer and your plugin!

— Reply to this email directly, view it on GitHub https://github.com/NotePlan/plugins/issues/335#issuecomment-1229885497, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACEI6VGFCK6QEGD2HZNYIUTV3RQ2DANCNFSM573V2UOA . You are receiving this because you were mentioned.Message ID: @.***>

jgclark commented 1 year ago

@Hileotech I was going through older issues here, and was reminded about this. After reviewing it, I think there's an easier approach, particularly if you already use a text expansion service such as TextExpander. I have defined a large set of expansion 'snippets' that make it very quick for me to type out dates of the form YYYY-MM-DD. For example >>0 always expands to today's date with a > prefix. >>1 to tomorrow's date etc. The advantage of this use of a separate utility is that it will work at any point in NotePlan or other app, and doesn't require more coding in NotePlan or its plugins.

I've now made the full set available to you and everyone at https://app.textexpander.com/public/06280036ad3fc09e5f0598ef8ff361fb.

Various other Mac utilities support expansions, including Alfred, if you don't use TextExpander.