GNOME Bugzilla – Bug 525199
Add a feature to create a new note in a specific notebook from CLI
Last modified: 2017-07-31 12:48:38 UTC
A use case in wich such a function would be useful: I created a notebook called 'Summaries' with a specifically edited template. Now I would like to create an 'Open with..' custom command which creates a new note with the filename of the pdf as title in the Summaries notebook.
Created attachment 108496 [details] [review] Notebook Notes patch Here's a simple patch to fix the same. It will create a new notebook note with the template applied (if it exists). The command line option is --new-notebook-note [notebook-name] [note-name] . One note is that the patch creates a new function in the Notebook class, which is create note, which creates a Note with the applied notebook template and tag.
I keep forgetting to review this...hope it's not too late for 0.14.0 considering freezes in place...
Pushing to next cycle. Sorry Arun, will get this in as soon as we branch and trunk is open for new development.
Review of attachment 108496 [details] [review]: Cool! Thanks for the patch. ::: RemoteControl.cs @@ +112,2 @@ + // Check if the notebook exists. Create a notebook note + // else, just make a blank note TODO: prompt creation of a new notebook Why not just create the new notebook if it doesn't exist? @@ +120,3 @@ + return note.Uri; + } catch { + return ""; indenting. @@ +157,3 @@ + return note.Uri; + } catch { + return ""; indenting ::: Notebooks/Notebook.cs @@ +153,3 @@ + + /// <summary> + /// Creates a note with the notebook template This says notebook template, but the template that you're grabbing on line 168 is the default note template.
The Tomboy team has moved from GNOME Bugzilla to GitHub for bug reports and feature requests: https://github.com/tomboy-notes/tomboy/issues/ Closing this report as NOTGNOME as part of Bugzilla Housekeeping (bug 781054) to keep tasks in one place. Please feel free to transfer this task to GitHub if this task is still valid in a recent Tomboy version. We are sorry for the inconvenience.