Jump to content
Michael Hyatt

mac (Archived) REQUEST: New note from template

Recommended Posts

This would make Evernote significantly more useful. I see this functioning just like Pages, Word, or most other major apps. You coud save the templates themselves in a “Template” notebook.

Share this post


Link to post

This feature has been implemented in the forthcoming 4.4 Windows release; it's a common request, and I'd be surprised if it didn't make it on the Mac client as well, though that's just my impression of things.

Share this post


Link to post

I have searched in vain for this in the Windows version. I am running 4.4. I don't see it.

Can you point me in the right direction? Thanks.

Share this post


Link to post

Ah. There's nothing about 'templates' per se, but you should look at the new Copy Note operation. You'll find it in menu that appears when you right-click on a note in the note list. You can either copy the note to your default notebook (I think) and tags are preserved, or to another notebook, in which case you can choose to preserve tags and/or created/updated dates. So it's on you to create the templates, and them you can use Copy Note to do the work.

  • Like 1

Share this post


Link to post

The Mac beta version already has this. It is not what I was envisioning.

I am looking for the ability to select File | New Note from Template and then select the template I want.

The current functionality would work if (as I posted in detail on another thread), after EN copied the note it took you to that note. As it currently is, you have to:

1. Select the note you want to copy.

2. Right click and choose Copy to Notebook.

3. Move to the new note in the destination notebook.

4. Open the new note.

I'd like to eliminate the last two steps. I also think my suggestion is what most users are accustomed to, given the wide-spread use of Word, Excel, Keynote, Pages, etc.

Thanks.

Share this post


Link to post

It's a whole heck of a lot easier than it was before, at least.

Share this post


Link to post

Hi. I'm starting to use "Copy to Notebook" to make templates and "templated" Notes.

I put the templates into a separate Notebook "Templates" to avoid my potential confusion in editing/using it.

I like that it can copy the Tags from the Template (via Options from the Copy to Note menu.)

I am about to use a single template to create ~50 notes.

Very helpful -- after copying once, the Note menu offers a choice to Copy to same notebook again!

But when the Template creates a new Note, it uses the same Title as the Template.

This strikes me as problematic, because if I'm not careful I could end up with Notes with the same Title.

(It's also odd because my Template needs to have a title that differentiates it as a template vs. its clones.)

Is there any way for Evernote to copy the Template into a Note with a different Title?

Or to prompt me to modify the Title? (Granted, I guess it's not too hard to do it by manually...)

I'd welcome hearing more tips about Templates, thanks

Share this post


Link to post

I built an AppleScript to address this problem, inspired by the code at veritrope. The veritrope code was really useful, but I implemented a bunch of improvements for my own purposes. I'll post the code below, but keep an updated version in a shared evernote note. A screenshot is shown here

You can create as many templates as you want, and access them from a menu pulldown. Any notes in a notebook of your choice, and tagged to mark as templates, become note templates. Tags are preserved from the templates to the new notes. The new note title is the template title concatenated with the date. I hope you find it useful.

# Templates in Evernote (Mac version)
# gtuckerkellogg AT gmail.com (inspired by http://veritrope.com/code/evernote-new-note-based-on-template/)
# No guarantees. It works for me; use at your own risk
#------------ INSTALLATION -----------------
#
# Put this in a Run AppleScript container in Automator and associate with Evernote
#------------ USAGE ---------------
# If you have this script installed as an Automator service, find it in Evernote->Services
# menu. A dialog will appear allowing you to choose from your list of templates. New
# notes will be created based on the templates, preserving tags (removing the template tag itself)
# and creating a date-stamped title based on the template note title.
#-------------THREE CONFIGURATION VARIABLES ----------
# 1. One notebook (by default, named "~meta") contains your template notes
# 2. One tag (by default, "templates") holds your templates
# 3. One notebook (by default, named "_inbox/in") will be used to place your new notes based on templates
# Change these to whatever you like. The notebooks must exist in order for the script to run.
# Any notes in the tag notebook tagged accordingly will be considered note templates The
# notebook with your templates can contain any other notes, but all the templates have to be
# in one notebook
global template_notebook
global template_tag
global new_note_notebook
set template_notebook to "~meta" # this is the Notebook where templates are stored
set template_tag to "template" # this is how templates are tagged
set new_note_notebook to "_inbox/in" # this is where new notes created from templates are placed
---------------- NO CONFIGURATION IS NEEDED BELOW THIS LINE --------------------
if check_notebook_existence() then
set template_titles to get_template_titles()
if template_titles is equal to {} then
none_found()
else
set template_name to pick_template from template_titles
if template_name is not equal to {} then
create_note_using_template from template_name
end if
end if
end if
tell application "System Events" to set frontmost of process "Evernote" to true

---------------- SUBROUTINES -----------
on get_template_titles()
set template_titles to {}
tell application "Evernote"
set template_list to find notes "notebook:\"" & template_notebook & "\" tag:" & template_tag
repeat with my_note in template_list
set template_titles to template_titles & {title of my_note}
end repeat
end tell
return template_titles
end get_template_titles

on pick_template from template_list
choose from list template_list
if result is not false then
set template_title to result
else
set template_title to {}
end if
end pick_template

on create_new_note_title from template_title
set {year:y, month:m, day:d} to (current date) # extract elements of the date for the title
set new_note_title to template_title & " --- " & m & " " & d & ", " & y as string # this will be the title of your new note
return new_note_title
end create_new_note_title

on create_note_using_template from template_title

tell application "Evernote"
set query_string to "notebook:\"" & template_notebook & "\" tag:\"" & template_tag & "\" inTitle:\"" & template_title & "\""
set template_list to find notes query_string
set template_note to item 1 of template_list
tell me to set new_note_title to create_new_note_title from template_title
set template_content to HTML content of template_note
set new_note to ¬
create note title new_note_title with html template_content ¬
notebook new_note_notebook
set the_tags to (the tags of template_note)
assign the_tags to new_note
repeat with T in the_tags
if (name of T) is equal to template_tag then
unassign T from new_note
end if
end repeat
count (every item of the_tags)
open note window with new_note
end tell
end create_note_using_template

on check_notebook_existence()
tell application "Evernote"
try
get the first notebook whose name is equal to new_note_notebook
on error
display dialog "The notebook for new notes: \"" & new_note_notebook & "\" does not exist"
return false
end try
try
get the first notebook whose name is equal to template_notebook
on error
display dialog "The notebook for templates: \"" & template_notebook & "\" does not exist"
return false
end try
end tell
return true
end check_notebook_existence

on none_found()
display dialog ("No templates found") ¬
& ("in notebook \"" & template_notebook & "\"" & return & return) ¬
& ("with tag \"" & template_tag & "\"")
end none_found

Share this post


Link to post

Request noted. This is something that's been discussed a few times already.

thanks!

Share this post


Link to post

I am looking for the ability to select File | New Note from Template and then select the template I want.

This is exactly what we need, with the addition of:

  1. Make sure it has a shortcut key
  2. When you select the template, also allow (but do not require) the selection of the Notebook for the new note
    • The default should be your Evernote Default NB as set in preferences

[*] Open the new Note ready for entering data, starting with the Title.

Thanks.

EDIT: A great bonus would be the ability to optionally set a default Template for all new Notes. Of course the template could be "none".

Edited by JMichael

Share this post


Link to post

I don't know if anyone else has tried my template AppleScript, but I use it all the time now, and it does pretty much what is requested in this thread Message me if it doesn't work for you.

Greg

Share this post


Link to post

For Windows, I stumbled across this "feature" by accident. If you click and drag a note from Evenrnote to your desktop, it will create a standalone ENEX file. Double-clicking on that file will create a new note in your default notebook with the ENEX file's characteristics -- title, attachments, content, tags, everything except date created.

It's not really a templating system but if you mainly use one device it could suffice. Doesn't work for me as I regularly move between desktop, laptop, ipad and iphone.

Note that ENEX doesn't seem to be associiated with Evernote in all cases. You may need to add the association the first time you double-click on the file.

Share this post


Link to post

On the Windows side, how is using a .ENEX file any different from using the Copy Note functionality that already exists in Evernote? Maybe easier to use in some situations?

Share this post


Link to post

I don't know if anyone else has tried my template AppleScript, but I use it all the time now, and it does pretty much what is requested in this thread Message me if it doesn't work for you.

Greg

It works. Sort of. I use templates with coloured backgrounds, but apparently the script only grabs the content of the notes, not the CSS hacks, I have applied. Also, it does not pick up all templates in the designated template folder for me. Otherwise pretty neat.

Share this post


Link to post

Since whatever is sent to Evernote needs to be converted to ENML at some point down the line, I wouldn't expect CSS to work, since it's not supported, nor is the "style" elements, per the ENML spec, as far as I know.

Share this post


Link to post

I don't know if anyone else has tried my template AppleScript, but I use it all the time now, and it does pretty much what is requested in this thread Message me if it doesn't work for you.

Greg

It works. Sort of. I use templates with coloured backgrounds, but apparently the script only grabs the content of the notes, not the CSS hacks, I have applied. Also, it does not pick up all templates in the designated template folder for me. Otherwise pretty neat.

Oh, that's interesting. What do you mean by "not all templates in the designated folder"? It should list all the notes in a given folder (I use ~meta) tagged as templates (I use "template"). It should also remove the "template" tag when it creates a new note based on a template, keeping the other tags. Can you describe the behavior it has for you? Feel free to send me a direct message if you don't want to clutter up the forum.

I'm afraid I can't do anything about your CSS hacks from the AppleScript API. At least I don't think they've added the AppleScript hooks to make that possible. Sorry about that :-(. I decided to implement the templates in AppleScript rather than the Evernote developer API so I could have the functionality in the Evernote client, and create notes from templates even if I wasn't connected to the intertubes.

Share this post


Link to post

Oh, that's interesting. What do you mean by "not all templates in the designated folder"? It should list all the notes in a given folder (I use ~meta) tagged as templates (I use "template"). It should also remove the "template" tag when it creates a new note based on a template, keeping the other tags. Can you describe the behavior it has for you? Feel free to send me a direct message if you don't want to clutter up the forum.

Oh! My bad. I misunderstood the instructions - I thought it sufficed they were either in the specified notebook or have the specified tag. I only put the template it couldn't find in the notebook, but did not tag it appropriately. Applied the tag and everything works as intended :P

I'm afraid I can't do anything about your CSS hacks from the AppleScript API. At least I don't think they've added the AppleScript hooks to make that possible. Sorry about that :-(. I decided to implement the templates in AppleScript rather than the Evernote developer API so I could have the functionality in the Evernote client, and create notes from templates even if I wasn't connected to the intertubes.

Yes, I sorta had a hunch when I installed the script that it might not pick up on the CSS. It is mostly a matter of having a diferent background - I'll just use the "copy notebook" function for now. I will have good use for the script for some of the other templates that only consists fo texts.

  • Like 1

Share this post


Link to post

Yes, unfortunately there is no "move note" or "copy note" method in the Evernote AppleScript interface. Ah well. I keep trying to drop hints in the forums about how if Evernote supports AppleScript it may lower the frustrations of Evernote Mac users who complain (justifiably) about missing features on Evernote for Mac. I haven't gotten the sense that anyone at Evernote HQ agrees.

Share this post


Link to post

Hey, Jason. It's cool that you wrote this, and I am definitely going to check it out, but did you really need to post 10 or 12 identical copies of this post into the forums? Why not just make a general announcement?

Edit: Oops, sorry. Mac only, so I won't be trying it out after all. Wish you'd said that in your post. Still, I hope it works out -- looks awfully useful.

Share this post


Link to post

Something I'd like to see added to the requested template feature. In addition to just fields like a job number, customer, due date, and so on I'd like to see variables. I want the title to be made up of the fields I'll already be typing in. As the above fields are filled out the title of the note would read "2012/03/01 - 12345 - abc customer."

I use a backup program called SyncbackSE, www.2brightsparks.com. They have many variables. I use their %date% and %time% variables a lot. I have the program email me a log file after it runs, in the subject and the log file name i call it %date% - %time% - Customer name. The output looks like "04-15-12 - 1:54PM - lightnin93."

How I see this working in Evernote. When building a template you note title to be: "%due date% - %job number% - %customer name%." If the variable isn't in the built in list it then search inside the note for a match. Since %job number% won't be a built in variable it will pull it from the Job Number field inside the template. The details are typed once, note titles are consistant, and customizable.

  • Like 1

Share this post


Link to post

I'm working on an AppleScript to do this as well. There are several features lacking from EN which I think many people will want to have. It keeps a specific note for replacing tokens that lightnin93 refers to. You can place these substitution tokens in your template so the note is created with the replaced data on creation. If you are interested in this type of functionality, please let me know and I'll contact you when it is available. This tool will also allow you to set default tags on a per notebook/stack basis. You'll be able to define the tags that should be added to a new note based on what notebook it is being created in and which template is being used.

Hope this helps someone.

David

  • Like 1

Share this post


Link to post
Guest
This topic is now closed to further replies.

×
×
  • Create New...