New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow use of templates [enhancement] #296

Closed
jd666 opened this Issue Aug 18, 2016 · 8 comments

Comments

Projects
None yet
3 participants
@jd666

jd666 commented Aug 18, 2016

A lot of notes are created following a certain repetitive schema and the use of templates would help a lot. (Meeting notes, Daily routines)
Suggested enhancements:

  • A specific template folder (configurable?)
  • Create note from template by dragging template to note folder
  • In Note Editor: jump between special template fields by shortcut (like Alt-Tab)

On Note creation replace template fields with the usual replacements:

  • automatic replacement for date/time/timezone (%Y-%m-%d %H:%M:%S %Z)
  • automatic replacement for current file name (%s ?)
  • automatic replacement for current author (%a ?)

@pbek pbek added the enhancement label Aug 18, 2016

@pbek

This comment has been minimized.

Owner

pbek commented Aug 18, 2016

Currently you can do a lot of that with a script yourself.
See: https://github.com/pbek/QOwnNotes/blob/develop/doc/scripting/custom-new-note-headline.qml
You could for example create a note that starts with [mn] (for meeting notes), search for the text in your script and decide what text to output.

If you need more information in the handleNewNoteHeadlineHook() please let me know.

@pbek

This comment has been minimized.

Owner

pbek commented Aug 18, 2016

And if you have any questions please let me also know.

@pbek pbek closed this Aug 18, 2016

@pbek

This comment has been minimized.

Owner

pbek commented Aug 21, 2016

There will be custom actions in v16.08.16!

@pbek

This comment has been minimized.

Owner

pbek commented Aug 21, 2016

16.08.16

  • you are now able to define custom actions that will be shown as menu
    entry in the scripting menu and optionally in the toolbar as button
    • there is an example for opening the current note with KWrite
      and to create a new note with a custom text at
      custom-actions.qml
    • there is a small documentation about the function
      registerCustomAction and other functions in the
      scripting documentation
    • you can also assign shortcuts for your custom actions in the
      shortcut settings
  • added new methods to the scripting engine
    • you can now also get the full file path of the current note
      with script.currentNote().fullNoteFilePath
    • you can now register a custom action with script.registerCustomAction()
    • you can now create a new note with script.createNote()
    • you can now access the clipboard with script.clipboard()
    • take a look at the scripting documentation
      for more information
  • there now is a new example to create a note from a 5pm email with a
    custom action at
    note-from-5pm-mail.qml

@jd666, you should now be able to create note templates that are accessible from a menu and a button toolbar! Could you please be so kind and report your experiences.

@pbek pbek added this to the 16.08.16 milestone Aug 21, 2016

@pbek

This comment has been minimized.

Owner

pbek commented Aug 21, 2016

16.08.16 is now released...

@muesli

This comment has been minimized.

muesli commented May 17, 2018

I'm really missing this being a standard feature. I must admit I'm not too keen on scripting my notes editor.

@pbek

This comment has been minimized.

Owner

pbek commented May 17, 2018

You would tell a different story if you would know what you are able to do in scripts. :) Static templates are not of much use anyway in QOwnNotes (because by default the headline is the filename of the note)... but you can even create a script to edit static note templates in the the script settings

@pbek

This comment has been minimized.

Owner

pbek commented May 17, 2018

so what feature are you missing exactly @muesli, maybe I can help you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment