After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 525199 - Add a feature to create a new note in a specific notebook from CLI
Add a feature to create a new note in a specific notebook from CLI
Status: RESOLVED NOTGNOME
Product: tomboy
Classification: Applications
Component: General
unspecified
Other Linux
: Normal enhancement
: 2.0.0
Assigned To: Tomboy Maintainers
Tomboy Maintainers
gnome[moved-to-github]
Depends on:
Blocks:
 
 
Reported: 2008-03-30 22:41 UTC by guido.conaldi
Modified: 2017-07-31 12:48 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Notebook Notes patch (6.92 KB, patch)
2008-04-02 19:18 UTC, Arun Chaganty
needs-work Details | Review

Description guido.conaldi 2008-03-30 22:41:26 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.
Comment 1 Arun Chaganty 2008-04-02 19:18:45 UTC
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.
Comment 2 Sandy Armstrong 2009-02-06 15:26:18 UTC
I keep forgetting to review this...hope it's not too late for 0.14.0 considering freezes in place...
Comment 3 Sandy Armstrong 2009-03-01 17:05:19 UTC
Pushing to next cycle.  Sorry Arun, will get this in as soon as we branch and trunk is open for new development.
Comment 4 Aaron D Borden 2011-06-12 03:37:21 UTC
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.
Comment 5 André Klapper 2017-07-31 12:48:38 UTC
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.