flatlanderdox 7 Posted January 21, 2015 Share Posted January 21, 2015 I just recently wrote this article on Lifehacker on how to Create Desktop Shortcuts to Your Favorite Evernote Notes and Tags. I know you can use command line to do even more than just saved searches -- e.g. creating new notes with certain tags, etc. But I'm not sure what that looks like. In the example pictured above, I add the following code to the end of the "Target" field in the desktop shortcut: showNotes /q "notebook:Lists" If I was to create a desktop shortcut to create a new note with a given tag, what would that syntax look like? where would I put it? Thanks in advance. Link to comment
Level 5* jefito 5,586 Posted January 22, 2015 Level 5* Share Posted January 22, 2015 For more information on the ENScript program, see https://dev.evernote.com/doc/articles/enscript.php. Note that you can also script against the Evernote.exe executable as well (also documented in the same linked page). Link to comment
flatlanderdox 7 Posted January 22, 2015 Author Share Posted January 22, 2015 Thanks Jeff. Right, my question is about how to get these parameters to work in a desktop shortcut. I can't seem to figure out how to do this. I can get the showNotes parameters to work (e.g. for the tag "Wiki"): showNotes /q "tag:""Wiki""But if I try something similar with the createNote command, it doesn't work for me (e.g. creating a new note in the "Reference" notebook):createNote /n "Reference"I'm obviously doing something wrong, but not sure what. Link to comment
Level 5* jefito 5,586 Posted January 22, 2015 Level 5* Share Posted January 22, 2015 Ah, OK. The createNote option is different. You need a parameter to specify the note's text content with the /s parameter; the associated file must be text. If you leave out the /s parameter, text content is read from standard input. When running ENScript on the command line, that would mean that you'd just type in some, with Ctrl+Z to finish.I'm not sure how that works in a shortcut. If you wanted to do some boilerplate (say, an empty note), you could probably do something like: createNote /n MyNotebook /s MyBlankFile.txt. You'd use the /a option to attach non-text files. Link to comment
flatlanderdox 7 Posted January 22, 2015 Author Share Posted January 22, 2015 Awesome, thanks so much Jeff!createNote /s "C:\New note.txt" /n "Test Notebook" /i "This a Test" /t "test"The syntax above (added after the filepath to ENScript.exe) creates a new note with the plain text of the .txt file in the notebook "Test Notebook", title "This is a Test" and tagged "test". Very cool to know how to do this! I'm not sure what is meant by "text content is read from standard input". What is "standard input"? Link to comment
Level 5* jefito 5,586 Posted January 22, 2015 Level 5* Share Posted January 22, 2015 In the command line world (e.g. DOS, Windows' Command Prompt, etc.) programs can interact with command line users via standard input (typing) and standard output (writing text to the console). For such programs, the command line program usually makes available the ability to send the contents of a file into the standard input channel of the program, such that whatever is in the file appears to the program as if you'd typed it manually. That's called "redirecting standard input" (commonly triggered on the command line using the "<" symbol). Similarly, you can usually capture the standard output of such a program into a file on disk (commonly triggered on the command line using the ">" symbol). Link to comment
flatlanderdox 7 Posted January 22, 2015 Author Share Posted January 22, 2015 Oh okay. Wow, thanks for that explanation! I've only just started learning about stuff like this. Seems like there are so many possibilities. Really appreciate your help. Link to comment
Level 5* jefito 5,586 Posted January 22, 2015 Level 5* Share Posted January 22, 2015 Wikipedia has a little primer for command-line interfaces: http://en.wikipedia.org/wiki/Command-line_interface. 30+ years after MS-DOS 1.0, I still use the command-line almost daily at work. Link to comment
unitseven 9 Posted July 7, 2015 Share Posted July 7, 2015 Check out this guys great post on some power creating notes. http://www.thoughtasylum.com/blog/2010/3/14/an-improved-template-system-for-evernote.html I've quite successfully taken his concept and extended it further to combine a bunch of separate files of each part of the notes EXEX that are combined with variables from the OS (windows user-name, current date, time, a command line input for project name) and then create a new note for each job as they come in. Link to comment
flatlanderdox 7 Posted July 9, 2015 Author Share Posted July 9, 2015 Check out this guys great post on some power creating notes. http://www.thoughtasylum.com/blog/2010/3/14/an-improved-template-system-for-evernote.html I've quite successfully taken his concept and extended it further to combine a bunch of separate files of each part of the notes EXEX that are combined with variables from the OS (windows user-name, current date, time, a command line input for project name) and then create a new note for each job as they come in.Very cool stuff. I love Stephen's approach. I keep meaning to dive more deeply into his process and the one Itmar O mentions in the comments. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.