Jump to content
actant

tools for editing enex files

Recommended Posts

In a previous thread, I referred to Komodo Edit as the tool for tweaking .enex files. But JS scripting functionalities in the free version of Komodo Edit are very limited.

I think that many people here work with tweaking .enex files in their daily work. Could you kindly share your idea about the the best tool for editing .enex file, especialy in scripting with regex to modify .enex files in a sophisticated way?

Thanks!

Share this post


Link to post
9 minutes ago, actant said:

Could you kindly share your idea about the the best tool for editing .enex file, especialy in scripting with regex to modify .enex files in a sophisticated way?

My suggestion would be to use a really good text editor that is strong on RegEx usage.

For the Mac (my platform), that would be BBEdit.  This comes highly recommended by every experienced Mac user I know, and is probably the best all round text editor for the Mac.

Someone else will have to suggest a text editor for  Windows.

BTW, one strong point for the Mac -- AppleScript.  I have recently learned that if you are careful, you can use Mac AppleScript to edit the HTML contents of a Note, and retain all of the Notes non-text features, like images, attachments, etc.

  • Thanks 1

Share this post


Link to post
2 minutes ago, JMichaelTX said:

My suggestion would be to use a really good text editor that is strong on RegEx usage.

For the Mac (my platform), that would be BBEdit.  This comes highly recommended by every experienced Mac user I know, and is probably the best all round text editor for the Mac.

Someone else will have to suggest a text editor for  Windows.

BTW, one strong point for the Mac -- AppleScript.  I have recently learned that if you are careful, you can use Mac AppleScript to edit the HTML contents of a Note, and retain all of the Notes non-text features, like images, attachments, etc.

I'm a Windows user and have no experience with Mac. Anyway, thanks for your quick response!

Share this post


Link to post
1 hour ago, actant said:

I think that many people here work with tweaking .enex files in their daily work.

I edit the note  .enml files on my Mac, using the Textastic app; any text editor will work

  • Thanks 1

Share this post


Link to post
8 minutes ago, DTLow said:

I edit the note  .enml files on my Mac, using the Textastic app; any text editor will work

Thanks for sharing! The text editor should better be good at scripting with RegEx and handling files batchwise.

Share this post


Link to post
1 hour ago, actant said:

The text editor should better be good at scripting with RegEx and handling files batchwise.

Can you identify use cases that require batch files, scripting and regex; my edits tend to be simple html tweaking, one-off stuff

 

Share this post


Link to post
3 hours ago, actant said:

Thanks for sharing! The text editor should better be good at scripting with RegEx and handling files batchwise.

On WIndows, perl (buddha help you, #nowyouhavetwoproblems), PowerShell, Python? For text editors, NotePad++ can let you create, save & run macros, but I don't know whether it will suit your needs (I don't use the macro facility very often). Maybe try a web search on "windows text editor scripting"?

4 hours ago, actant said:

I think that many people here work with tweaking .enex files in their daily work.

I kinda doubt that myself. I tweak occasionally, but only to make nicer note templates that I can duplicate when I need them.

Share this post


Link to post

You must only search the Forum to learn that it is definitely not a common hobby to tweak .enex files, neither on your daily work nor just for the fun of doing so. No group of Enex-Tweakers as a vivid subforum, not much to be found about it etc. Sure it  can be done ...

Before learning the „how“ I would like to understand the „why“ ! What is the usecase for this ?

Share this post


Link to post

Thank you for your comments! A typical case is like this:

20 html files saved on disk > batchwise processing (similar to web scraping) > imported to Evernote > automatically indexing by adding tags or other fields

Share this post


Link to post

OK, depends on the volume.

Currently, I use my INBOX to collect stuff, and then distribute it further adding tags, sometimes a little text and assigning notebooks. If I have some similar notes, I choose them as a group on a desktop client, assign them all the tags, and move them off into their notebook.

Following GTD, I try to have my INBOX empty daily, at least once a week. I do better on the later than the former 😂

Share this post


Link to post
5 hours ago, actant said:

20 html files saved on disk > batchwise processing (similar to web scraping) > imported to Evernote > automatically indexing

Hmmn.  HTML files can be read by a browser and clipped into Evernote,  or will be imported (mostly*) by an Import Folder.  Subscribers could also email notes into Evernote,  giving extra control over titles and tags.  Filterize can be used to automate tags,  tables of content and searching.

* the note titles will be variations on the file name and the level of success will depend on the complexity of the code.

Share this post


Link to post

Thank you @gazumped for your comments!

This is the first time I hear about Filterize, which claims to use "an AI algorithm that can detect the structure you use in your Evernote database". It seems not to be a good idea to allow a third-party app to access the whole database.

Share this post


Link to post

Always depends on who you let in, and if you trust these people.

Comfort goes along with openness ... one reason why I prefer to pay for my more important services, instead of believing that a good product will be available „for free“.

The „free“ model of filterize is obviously for testing purposes only (very restricted), so pay as you use stands for me for a sustainable business model.

Share this post


Link to post

I suppose there exist tools for Windows as well to manipulate local HTML-content. Typically there is a lot of 3rd-party freeware available, for all type of uses, often in an eternal status  of rel 0.9 (use it, but don’t blame anybody if it goes wrong).

Depending of from which source the content arises, I think there are alternatives to manipulating the HTML /ENEX files directly. I especially like the Windows version of the Scansnap software, that is far superior to the rudimentary stuff available on the Mac. For me this is one reason why I live with both desktop clients.

Share this post


Link to post
8 hours ago, actant said:

A typical case is like this:

20 html files saved on disk > batchwise processing (similar to web scraping) > imported to Evernote > automatically indexing by adding tags or other fields

It's an interesting idea, but you also need tools to export/import the enex files.  Is this a manual process?

The preferred method is to use Evernote's APIs and work directly with the note contents.  It's do-able using Applescript (Mac)

Share this post


Link to post
1 hour ago, actant said:

It seems not to be a good idea to allow a third-party app to access the whole database.

Just in their mild defence (no axes to grind here,  other than I'm a subscriber to their service too...) you

  • have a choice whether or not to activate the "AI" which -true to my general experience of AI assistants so far- makes dozens of dumbass suggestions and (to me at least) is largely a time-soak when it's working;  and you
  • get to specify which notebooks Filterize can access.

Filterize themselves have a section on security which seemed fairly comprehensive.

Just sayin'  ;)

Share this post


Link to post

Thank you @gazumped for your comments!

Thank you @DTLowfor your reference to Evernote's APIs!  I have two questions about those APIs:

1. Are Evernote's APIs accessible for common users (but not mobile app developer) on Windows desktop?

2. The EN client for Windows does not store every single note as  a separate enml (?) file as the EN client for Mac does. So, on Windows desktop, it's impossible to directly modify the source code of a specific note without Export/Import it. Does Evernote APIs make this do-able with the Windows client?

  • Like 1

Share this post


Link to post

On Windows there is a SQLite-DB behind the client. Maybe even easier to handle through external access (SQL-code) than the multi-documented Mac back end.

Share this post


Link to post
7 minutes ago, PinkElephant said:

On Windows there is a SQLite-DB behind the client. Maybe even easier to handle through external access (SQL-code) than the multi-documented Mac back end.

Do you mean that Evernote APIs can access the local database directly and also get the changes synced to the server? Thank you!

Share this post


Link to post
2 hours ago, actant said:

Thank you @DTLowfor your reference to Evernote's APIs!  I have two questions about those APIs:

1. Are Evernote's APIs accessible for common users (but not mobile app developer) on Windows desktop?

2. The EN client for Windows does not store every single note as  a separate enml (?) file as the EN client for Mac does. So, on Windows desktop, it's impossible to directly modify the source code of a specific note without Export/Import it. Does Evernote APIs make this do-able with the Windows client?

I'd say yes, open to all.  Yes to updating the note's source code

I'm a lightweight developer, using Applescript; we need feedback from other developers. 

Share this post


Link to post

If it will sync, I do not know. Maybe there is a trigger in the DB-structure, that is read when the client opens and causes the sync ?

First thing if I were you is that I would push my account to Premium/Business - because you should not expect us users to really solve an issue like that. With a paid account you have access to support - and if you really want to dive that deep, you will probably need it.

 

Share this post


Link to post
9 hours ago, actant said:

access the local database directly and also get the changes synced to the server?

The Evernote APIs access/update the data store on the servers

I make use of the SQLite process, but it's not recommended for the average user.

Direct database access is not sanctioned by Evernote, and will not sync to the servers by default

Share this post


Link to post
1 hour ago, actant said:

Do you mean that Evernote APIs can access the local database directly and also get the changes synced to the server? Thank you!

No. Don't do that. Don't.

FYI: Windows does have the enscript utility:

(c:\Program Files (x86)\Evernote\Evernote)
>enscript -?

Usage: ENScript <command> [options]

Commands:

  createNote     - creates note from the specified file or url
  importNotes    - imports notes from the specified export file or url
  showNotes      - displays specified notes in the Evernote window
  printNotes     - prints specified notes from the Evernote window
  exportNotes    - exports specified notes into a file
  createNotebook - creates a notebook
  listNotebooks  - lists specified notebooks to standard output
  syncDatabase   - synchronizes database to the service

Type "ENScript <command> /?" to get command specific help.

@filename - specifies response file name contaning options one per line.

Command line options that follow response file name specification override
options specified in the response file.


 

  • Like 3

Share this post


Link to post
3 hours ago, DTLow said:

it's not recommended for the average user.

Really.  Don't.

Share this post


Link to post

@dconnet   Interesting - is there a more detailed description of this scripting option for Windows somewhere ? Is tagging an option ?

Share this post


Link to post
16 hours ago, dconnet said:

No. Don't do that. Don't.

FYI: Windows does have the enscript utility:

Thank you for comments from all the people above!

@dconnet  Thank you for sharing info about enscript! I have another question: is it possible to work out a solution to work with EN just as VBScript working with Microsoft Office?

Share this post


Link to post
On 6/14/2019 at 3:54 PM, dconnet said:

FYI: Windows does have the enscript utility:

It would be really great if Evernote open-sourced this as a sample Windows application. Of course,that might also reveal the secret sauce that allows enscript to directly communicate with the Windows application directly, which isn't part of the published API (at least as far as I know).

Share this post


Link to post
23 hours ago, jefito said:

It would be really great if Evernote open-sourced this as a sample Windows application. Of course,that might also reveal the secret sauce that allows enscript to directly communicate with the Windows application directly, which isn't part of the published API (at least as far as I know).

 We need the enscript app because Windows lacks the tools to make use of the "open-sourced API"
Even then, there is limited access; only the features listed by @dconnet

On Mac's we access the "open-sourced API" using Applescript.  It opens a much larger set of features
On IOS, we use Siri Shortcuts

Share this post


Link to post
14 minutes ago, DTLow said:

You need the enscript app because Windows lacks the tools to make use of the "open-sourced API"
There's limited access; only the features listed by @dconnet

Yes, I know and understand what enscript does already (e.g. https://discussion.evernote.com/topic/53536-how-to-backing-up-evernote-using-powershell/). It uses the API to interact with the Evernpte servers on its own, and it also can communicate with the Evernote Windows application separately, using an undisclosed API (the showNotes and printNotes commands, at a minimum). And yes, we all know about Mac AppleScript and are jealous of it and all, but this is a Windows-specific topic so that doesn't really pertain.

The former part would be a nice demonstration sample for a Windows API developer. None of that should be problematic when open-sourced.

The latter would be interesting / useful as well (maybe for someone to provide a more comprehensive Windows scripting solution?), though I don't know that Evernote would wish to divulge it, or go through the process of publishing, documenting or supporting its secret Evernote for Windows API. 

ENScript is helpful,but not quite enough for my tastes...

 

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

×
×
  • Create New...