Jump to content
Join the #EverBetterChallenge and finish what you start in 2019. Read more... ×
dushkin12

EnScript createNote doesn't work for me

Recommended Posts

Hi,

I'd like to use EnScript createNote to write an import script.

So, I first tried it using the cmd line of Windows 10.

I tried the following:

enscript createNote /i "Test"

enscript createNote /i "Test" /n "Books"

With and without usernme and password.

The command execution hangs

I also tried 

echo. 2>&1 | enscript createNote /i "Test" /n "Books"

echo "Note body" 2>&1 | enscript createNote /i "Test" /n "Books"

These commands returned but didn't impact.

 

However, 

enscript listNotebooks

for example did work!

 

Please advise. 

Thank you.

Share this post


Link to post

From the documentation (here) :

Quote

createNote

Create a new note with the following options:

  • /s filename - Specifies a file containing the note's plain text contents. If omitted, the note contents are read from standard input.
  • /n notebook - Specifies the name of the notebook to create the note in. If the notebook does not exist, it is created.
  • /i title - Specifies the title of the note.
  • /t tag - Specifies the name of a tag to apply to the note. If the tag does not exist, it is created. You can repeat this flag to add multiple tags.
  • /a filename - Specifies a file to attach to the note. You can repeat this flag to attach multiple files.
  • /c date - Specifies the note creation date and time using the format "YYYY/MM/DD hh:mm:ss". If omitted, the current time is used.

I'm pretty sure that it's waiting for you to type. If you use the /s option, you'll be specifying a text file that contains the note contents. Since you're not using /s, then the program will read from standard input; i.e., you need to type the content of your note at the keyboard (presumably you're in a Windows command prompt shell). Type until you're done, and at the end, type Ctrl+Z, and your note should be saved. I'll have to try what you did with pipes later -- gotta head to work!!

Share this post


Link to post

I am trying to follow your guidelines...

1. Writing the command

2.Press "Return" (??)

3. Then Ctrl+Z (??)

 

It sometimes works, sometimes not...  😤

Share this post


Link to post

My testing showed this working fine. If the Evernote application is running, you shouldn't need to worry about username / password.. For example (note: "C:\bin>" is the command prompt):

c:\bin> enscript createNote <Enter>

This is my note<Enter>

A second line<Enter>

Last line</Enter>

<Ctrl+Z>

c:\bin>

 

Share this post


Link to post

Thank you Jefito.

Since I want to write a script to transfer notes from a csv I want to have a complete command line.I succeeded to use 

Quote

 

echo sometext | Enscript createNote /i "sometitle"

 

That works great so far.

My last question is how can make the someText to be created as a url inside the note because most of my notes are bookmarks.

Is there a way?

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×