Jump to content
barton986

windows (Archived) Convert Tags to Text at end of notes?

Recommended Posts

Hi all,

I've gotten myself into a bit of a quandary. My tags list has grown to the point of being unwieldy and unuseful (a few hundred probably). I have found that for most things, I prefer searching my notes anyway and so the plethora of tags seems even more in the way. I'd like to pear down the list to something much more meaningful and easy to remember.

However... many of my notes were created/tagged with the assumption that the tags would be the main means of finding them, and so are missing key bits of text that will help me find them in the future. What I would like to do is figure out a way to append all of my tags to the end of all of my notes in a relatively automated manner.

1. Is there any way to do this currently?

2. If not, what might be the best/easiest method to create something to do this? (i.e. PowerShell scripts, going through the native API or web API, something I haven't thought of)

Thanks for any advice you can share on this...

-Jon

Share this post


Link to post

Hi all,

I've gotten myself into a bit of a quandary. My tags list has grown to the point of being unwieldy and unuseful (a few hundred probably). I have found that for most things, I prefer searching my notes anyway and so the plethora of tags seems even more in the way. I'd like to pear down the list to something much more meaningful and easy to remember.

However... many of my notes were created/tagged with the assumption that the tags would be the main means of finding them, and so are missing key bits of text that will help me find them in the future. What I would like to do is figure out a way to append all of my tags to the end of all of my notes in a relatively automated manner.

1. Is there any way to do this currently?

2. If not, what might be the best/easiest method to create something to do this? (i.e. PowerShell scripts, going through the native API or web API, something I haven't thought of)

Thanks for any advice you can share on this...

-Jon

No way to do this using the Windows Local API (i.e., ENScript.exe). You can certainly do it using the cloud API; don't know what would take longer, though, getting up to speed with the API, or just sitting down and doing it (depends on how many notes you have). I have heard a rumour that there's a COM API for the Windows client, but haven't seen any documentation on that (there might have been a way in for PowerShell there).

One thing that I can think of that might be an easy entreé: if you were to export each notebook to .ENEX format (you get one file per notebook), you could maybe figure out a script or simple program to chew through these and do the work. You'd need to bone up on the ENML format (http://dev.evernote....apters/ENML.php). There are <tag> elements for tags in each note representation, and you can locate to the end of the note by looking for the <en-note> elements -- the end is just before that. At that point, you can add your keywords, probably wrapped up in a <div>. Once you're done, import those suckers back in -- you'll wind up with a bunch of new notebooks (named like "Imported Notes [#]"), and you go from there.

If you do something like this, be sure to back up your database thoroughly, experiment before you "go live", yada-yada,

Edit: And yes, I am aware that in general, regexes are not the sharpest tool with which to parse XML, so if you go that route, do be casreful -- I hope that you haven't clipped the ENML spec, for example... :)

  • Like 1

Share this post


Link to post

I've gotten myself into a bit of a quandary. My tags list has grown to the point of being unwieldy and unuseful (a few hundred probably). I have found that for most things, I prefer searching my notes anyway and so the plethora of tags seems even more in the way. I'd like to pear down the list to something much more meaningful and easy to remember.

However... many of my notes were created/tagged with the assumption that the tags would be the main means of finding them, and so are missing key bits of text that will help me find them in the future. What I would like to do is figure out a way to append all of my tags to the end of all of my notes in a relatively automated manner.

While I don't have any suggestion on how to export your tags, there is a potential solution that may elminate the need to export into you Note body.

When you enter text into the Search box, EN automatically searches ALL of the following fields to find the text:

  • Note body
  • Title
  • Tags

So, if you search for "Apple" (without the quotes), it will find all Notes that have words that start with "Apple" in your note body, Title, and Tags.

Try this and see if it works for you.

To cleanup your tag list you could create two top-level parent Tags, and move all other tags as a child tag of one of the parents:

  • ActiveTags
  • InactiveTags

You can collapse the InactiveTags container so that all of the tags you don't want to use anymore don't show.

HTH.

Share this post


Link to post

No way to do this using the Windows Local API (i.e., ENScript.exe). You can certainly do it using the cloud API; don't know what would take longer, though, getting up to speed with the API, or just sitting down and doing it (depends on how many notes you have). I have heard a rumour that there's a COM API for the Windows client, but haven't seen any documentation on that (there might have been a way in for PowerShell there).

If you do something like this, be sure to back up your database thoroughly, experiment before you "go live", yada-yada,

You could do this with the COM API but I wouldn't attempt it unless you are an experienced programmer. There are some nuances to using COM Variants, the types of data fields used by COM and therefore the Evernote COM API, that make working with the COM API trickier than using the Cloud API. Unfortunately with the Cloud API you are going to have to deal with OAuth 2.0 authentication so you have weigh the pros and cons here.

-- roschler

Share this post


Link to post

Is the COM API publicly documented? If so, I haven't found it yet.

Share this post


Link to post

Hello Jeff,

I requested it directly from support a long time ago. I'm not sure what the current status is.

-- roschler

Share this post


Link to post
To cleanup your tag list you could create two top-level parent Tags, and move all other tags as a child tag of one of the parents:
  • ActiveTags
  • InactiveTags

You can collapse the InactiveTags container so that all of the tags you don't want to use anymore don't show.

I think I like this approach as a quick and temporary solution. I realized that the tags would show up in the regular search a while ago, which is what eventually led me to want to go down this path. The only problem left with this is when actually applying tags the list will still be a bit too much. I can probably mitigate that by adding some sort of prefix to any of my "inactive" tags. Thanks for the suggestion!

I would like to learn the ins and outs of the API for other uses too though, so I will still pursue that route. It looks like if I go the Web-API route and use Python that the OAuth 2.0 stuff shouldn't be too bad since there are some user friendly libraries. Is this not the case? I wouldn't really call myself an experienced programmer (C/C++ in school and occasionally at work, and a bunch of back alley scripting languages at work), so the Cloud-API seems like the way to go.

-Jon

Share this post


Link to post
I would like to learn the ins and outs of the API for other uses too though, so I will still pursue that route. It looks like if I go the Web-API route and use Python that the OAuth 2.0 stuff shouldn't be too bad since there are some user friendly libraries. Is this not the case? I wouldn't really call myself an experienced programmer (C/C++ in school and occasionally at work, and a bunch of back alley scripting languages at work), so the Cloud-API seems like the way to go.

Hello Jon,

There's only one way to find out. Grab the Python libraries and try to write something simple. As usual with all open source items, it will either work great for you out of the box and you're set, or you'll hit a wall and then will have to make the decision whether or not to spend significant time on it. One major caveat. Since you are attempting an operation that will do significant writing to your database, please follow these three rules:

  • Backup your data
  • Backup your data before each write operation
  • Backup your data incrementally

Yes I'm making a bit of a joke here with the old multiple list items that are really the same item joke, but there's a reason for that. Since you are about to engage in a mass change operation on your database, you may introduce errors you won't recognize until much later in the future. If you do frequent incremental backups, you will at least be able to recover Notes you may have damaged, and then unwittingly copied those Damaged notes over your backup copies thereby losing any copy of the undamaged originals. Obviously this tip is divorced from the Evernote and its API and applies to all programming projects that involve mass changes to an important database.

-- roschler

  • Like 1

Share this post


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

×
×
  • Create New...