Jump to content

Create jump links in your notes with ELIN!


Recommended Posts

I created a simple java app elegantly named Evernote Link In Note aka ELIN. It is free and open source, you can check it out here.



This is just a simple app to easily genereate a jump for evernote notes, easily copy and paste into your note and style them how you please, and they should work. For example, if you have a rather large note and wanted to link the word "conclusion" to the bottom of your page where you have a header that said "conclusion" this app generates html that you can easily copy and paste into your note. Then you simply click the link and it will automatically scroll to the destination that the app generated!


Current Release: v1.1 - 4/25/15 

  • Like 2
  • Thanks 1
Link to comment

"Initial release, basic functionality, text is blurry and Icon is subpar." ??

that is for my app. the text and links it creates will show up in evernote just fine. It has to do with the web rendering that the text isnt anti aliased. As for the icon Im just not good at creating icons. However this only affects the icon on the program and will not appear in your notes

Link to comment
  • Level 5*

I created a simple java app elegantly named Evernote Link In Note aka ELIN. It is free and open source, you can check it out here.

Current Release: v1.1 - 4/25/15 

 

Can you provide a description/demo of your product?

What does it do?

How do your use it?

Why would I want it?

Link to comment

 

I created a simple java app elegantly named Evernote Link In Note aka ELIN. It is free and open source, you can check it out here.

Current Release: v1.1 - 4/25/15 

 

Can you provide a description/demo of your product?

What does it do?

How do your use it?

Why would I want it?

 

Oh wow! I can't believe I missed that! Alright, here goes.

This is just a simple app to easily genereate a jump for evernote notes, easily copy and paste into your note and style them how you please, and they should work. For example, if you have a rather large note and wanted to link the word "conclusion" to the bottom of your page where you have a header that said "conclusion" this app generates html that you can easily copy and paste into your note. Then you simply click the link and it will automatically scroll to the destination that the app generated!

I'll edit this into the main post. The description of the app is on the readme of the repository, but I forgot that users unfamiliar with github may not know to look there.

Link to comment
  • Level 5*

@CoreParadox:

 

Thanks for the description.  It sounds potentially useful.

 

But it is still not obvious to me how to use your tool.

It would be very helpful if you could provide step-by-step instructions, and a good clear example.

  • Like 1
Link to comment

@CoreParadox:

 

Thanks for the description.  It sounds potentially useful.

 

But it is still not obvious to me how to use your tool.

It would be very helpful if you could provide step-by-step instructions, and a good clear example.

 

directions.png

 

 

Basically, from top to bottom, you can see the document is rather long, so I want to make the text "info section" link to the header "Info section"

so for the jump name you can specify anything as long as there are no jumps with that name in your document, in this case I used "infolink"

the link text is what you want to click on to bring you to the jump

the Destination Text is what you want to link to

after that you click generate it will create a link and the jump location in that order respectively.

 

as you can see in the fourth picture I pasted the link into the document and it links "file:///#infolink"

Then later in the document I pasted the second text which has the html of  <a name="#infolink">Info Section</a>

So when I click the link it automatically scrolls down to the bottom where I put the Header

Sorry, I guess I'm not too great at explaining things!

  • Like 1
Link to comment
  • Level 5*

@CoreParadox:

 

So, it looks like your tool is a Windows application, right?

If so, could you create a Mac app (AppleScript?), or maybe better, a web app?

 

I can see how this would be really useful for EN Mac implemented as an AppleScript, invoked by a shortcut key.

Here's how I would see it being used via AppleScript:

  1. Assume that you have a EN Note long enough to create "jumps", or what HTML calls "bookmarks"
  2. Select the text to be used as the link
  3. Press the key to run the AppleScript
  4. AppleScript prompts for the BM name, and adds the link to the selected text
  5. It then prompts the user to select the text for the BM, and press "Continue"
  6. It then generates the HTML for the BM and replaces the selected text

This would allow the user to always remain in Evernote while creating the link and BM.

 

What do you think?

  • Like 1
Link to comment

 

 

So, it looks like your tool is a Windows application, right?

If so, could you create a Mac app (AppleScript?), or maybe better, a web app?

 

well, it's written in java, so the ".jar" executable will run on windows, mac, or linux, and could be easily ported to android! However, I am not familiar with applescript, but the project is open source, so if you are familiar with it and can loosely read java it probably wouldn't be too hard to port!

I'll work on a web app version of it soon, like within the next 2 days :)

  • Like 1
Link to comment

@CoreParadox:

 

So, it looks like your tool is a Windows application, right?

If so, could you create a Mac app (AppleScript?), or maybe better, a web app?

 

I can see how this would be really useful for EN Mac implemented as an AppleScript, invoked by a shortcut key.

Here's how I would see it being used via AppleScript:

  1. Assume that you have a EN Note long enough to create "jumps", or what HTML calls "bookmarks"
  2. Select the text to be used as the link
  3. Press the key to run the AppleScript
  4. AppleScript prompts for the BM name, and adds the link to the selected text
  5. It then prompts the user to select the text for the BM, and press "Continue"
  6. It then generates the HTML for the BM and replaces the selected text

This would allow the user to always remain in Evernote while creating the link and BM.

 

What do you think?

 

I already had something very similar, so I put together this OSX workflow/service (link to GIST repo with code and docs) and it works basically like how you described it (except that in step 3, instead of "pressing a key", you would right click and select "Services -> Create Cross Reference" -- and of course you can always assign a keyboard shortcut to the service... so yeah). Hope this helps!

 

Here's a demo...

 

create-cross-ref-screenshot.gif

Edited by frogwell
  • Like 3
Link to comment

 

after that you click generate it will create a link and the jump location in that order respectively.

 

as you can see in the fourth picture I pasted the link into the document and it links "file:///#infolink"

Then later in the document I pasted the second text which has the html of  <a name="#infolink">Info Section</a>

So when I click the link it automatically scrolls down to the bottom where I put the Header

Sorry, I guess I'm not too great at explaining things!

 

 

@CoreParadox:

 

May I ask why the link would start with "file:///"? I actually haven't got time to run your program yet, but I seem to remember that in the Evernote OSX client, a link of this form would take you to the "Finder".

Link to comment

 

 

after that you click generate it will create a link and the jump location in that order respectively.

 

as you can see in the fourth picture I pasted the link into the document and it links "file:///#infolink"

Then later in the document I pasted the second text which has the html of  <a name="#infolink">Info Section</a>

So when I click the link it automatically scrolls down to the bottom where I put the Header

Sorry, I guess I'm not too great at explaining things!

 

 

@CoreParadox:

 

May I ask why the link would start with "file:///"? I actually haven't got time to run your program yet, but I seem to remember that in the Evernote OSX client, a link of this form would take you to the "Finder".

 

Good question, that's just the way I was able to get it to work, How do your links work?

Link to comment

@CoreParadox:

 

I just use a link that starts with "#" (without the "file:///"), as in the usual HTML in-page linking technique: create a pair of <a> elements (the link and the anchor) and assign a label, and it would go like this:

 

<a href="#a-label">This would be the link!</a>

 

and

 

<a name="a-label">This would be the destination!</a>

Edited by frogwell
Link to comment

@CoreParadox:

 

I just use a link that starts with "#" (without the "file:///"), as in the usual HTML in-page linking technique: create a pair of <a> elements (the link and the anchor) and assign a label, and it would go like this:

 

<a href="#a-label">This would be the link!</a>

 

and

 

<a name="a-label'>This would be the destination!</a>

Hmm, interesting! I tried that method first and it was unsuccessful, could've been a quirk with windows, or something else! I'll revisit it when I have more time :)

Link to comment
  • Level 5*

I already had something very similar, so I put together this OSX workflow/service (link to GIST repo with code and docs) and it works basically like how you described it (except that in step 3, instead of "pressing a key", you would right click and select "Services -> Create Cross Reference"). Hope this helps!

 

@frogwell:

 

Many thanks.   You solution looks excellent!  I will test and evaluate and report back here.

Link to comment
  • Level 5*

I already had something very similar, so I put together this OSX workflow/service (link to GIST repo with code and docs) and it works basically like how you described it (except that in step 3, instead of "pressing a key", you would right click and select "Services -> Create Cross Reference"). Hope this helps!

 

@frogwell:

 

I need help installing your workflow and supporting libraries.

 

Specifically, how do I install pasteboard?

 

I have never used Ruby or gem.

I downloaded the pasteboard-master.zip from https://github.com/drbrain/pasteboard.

I unzipped it.

But when I run "gem install password", I get this error:

 

 

Fetching: pasteboard-1.0.gem (100%)

ERROR:  While executing gem ... (Gem::FilePermissionError)

    You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.

 

Perhaps I need to move the pasteboard-master folder somewhere special?  If so, where?

Do I need to run the "gem" command from a specific folder?

 

If you can, please provide specific, step-by-step instructions.  I suspect others (non-programmers) will need this as well.

 

Thanks.

Link to comment

 

I already had something very similar, so I put together this OSX workflow/service (link to GIST repo with code and docs) and it works basically like how you described it (except that in step 3, instead of "pressing a key", you would right click and select "Services -> Create Cross Reference"). Hope this helps!

 

@frogwell:

 

I need help installing your workflow and supporting libraries.

 

Specifically, how do I install pasteboard?

 

I have never used Ruby or gem.

I downloaded the pasteboard-master.zip from https://github.com/drbrain/pasteboard.

I unzipped it.

But when I run "gem install password", I get this error:

 

 

Fetching: pasteboard-1.0.gem (100%)

ERROR:  While executing gem ... (Gem::FilePermissionError)

    You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.

 

Perhaps I need to move the pasteboard-master folder somewhere special?  If so, where?

Do I need to run the "gem" command from a specific folder?

 

If you can, please provide specific, step-by-step instructions.  I suspect others (non-programmers) will need this as well.

 

Thanks.

 

Ah sorry that the doc isn't very clear... In this case, you can run

 

> sudo gem install pasteboard

 

and then enter your password and hit enter. "sudo" means "super do", which requires you have the superuser/administrator privileges to run commands. It's similar to the pop up dialog you get when installing some softwares that would ask you for confirmation and password.

 

P.S. I assume by "gem install password" you mean "gem install pasteboard"?

Link to comment
  • Level 5*

@frogwell:

 

Thanks.  Yes, I meant "pasteboard".

 

So I tried "sudo..." but got another error after I entered my password:

 

sudo gem install pasteboard

Password:

Fetching: pasteboard-1.0.gem (100%)

Building native extensions.  This could take a while...

ERROR:  Error installing pasteboard:

ERROR: Failed to build gem native extension.

 

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb

mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h

 

 

Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/pasteboard-1.0 for inspection.

Results logged to /Library/Ruby/Gems/2.0.0/gems/pasteboard-1.0/ext/pasteboard/gem_make.out

 

What do I do now?

 

Thanks for your help.

Link to comment

@frogwell:

 

Thanks.  Yes, I meant "pasteboard".

 

So I tried "sudo..." but got another error after I entered my password:

 

sudo gem install pasteboard

Password:

Fetching: pasteboard-1.0.gem (100%)

Building native extensions.  This could take a while...

ERROR:  Error installing pasteboard:

ERROR: Failed to build gem native extension.

 

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb

mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h

 

 

Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/pasteboard-1.0 for inspection.

Results logged to /Library/Ruby/Gems/2.0.0/gems/pasteboard-1.0/ext/pasteboard/gem_make.out

 

What do I do now?

 

Thanks for your help.

 

Well apparently I did not take into consideration that most people would not have xcode and other dev dependencies installed, my apologies... So I made an alternate version that does not require any ruby gem... Would you mind giving it a try? It's not quite as smooth as the original one (you won't be able to easily undo the operation, etc.) but the basic functionalities are the same.

Link to comment
  • Level 5*

Well apparently I did not take into consideration that most people would not have xcode and other dev dependencies installed, my apologies... So I made an alternate version that does not require any ruby gem... Would you mind giving it a try? It's not quite as smooth as the original one (you won't be able to easily undo the operation, etc.) but the basic functionalities are the same.

 

Thanks for the fix.  Before I try it, I had an idea I want to ask you about.

 

I read in your ReadMe that "Since the Evernote client will automatically add evernote-html-snippet:// to links with href starting with #, use applescript to scan the whole note and get rid of all these redundant strings".

 

What do you think about using "file:///" prefix? 

So, the link would be:  <a href="file:///#label-text">Link text</a>

 

Would that prevent the EN client from adding the "...snippet://" prefix?

Link to comment

 

Well apparently I did not take into consideration that most people would not have xcode and other dev dependencies installed, my apologies... So I made an alternate version that does not require any ruby gem... Would you mind giving it a try? It's not quite as smooth as the original one (you won't be able to easily undo the operation, etc.) but the basic functionalities are the same.

 

Thanks for the fix.  Before I try it, I had an idea I want to ask you about.

 

I read in your ReadMe that "Since the Evernote client will automatically add evernote-html-snippet:// to links with href starting with #, use applescript to scan the whole note and get rid of all these redundant strings".

 

What do you think about using "file:///" prefix? 

So, the link would be:  <a href="file:///#label-text">Link text</a>

 

Would that prevent the EN client from adding the "...snippet://" prefix?

 

Well, yes, it would indeed prevent EN client from adding "evernote-html-snippet://", but it still wouldn't work. Because then Evernote removes the link all together (assuming we are using the general clipboard/pasteboard). Or, even if we successfully insert the link with "file:///#label-tet" (using the `pasteboard` ruby gem to specifically formulate data in pasteboard), clicking on the link will take you to Finder and will try to locate a file on your system. This is because links starting with "file:///" is supposed to point to a local file (wiki), and in OSX the default handler application for "file:///" is the Finder. Theoretically it's possible to change the handler, but I don't think that is easy or makes sense.

Link to comment
  • Level 5*

Well apparently I did not take into consideration that most people would not have xcode and other dev dependencies installed, my apologies... So I made an alternate version that does not require any ruby gem... Would you mind giving it a try? It's not quite as smooth as the original one (you won't be able to easily undo the operation, etc.) but the basic functionalities are the same.

 

 

This workflow just doesn't seem to want to work for me.

Your alternate version (no ruby) doesn't work either.  It fails with a Javascript error.

Apparently the Automator "Run Javascript" is a new Action added in Yosemite.  I'm running Mavericks.

 

Here's the Automator error msg:

 

Mac-Automator-No-Javascript.gif

 

Sorry to be so much trouble.

 

Any suggestions on what to do next?

Link to comment

 

Well apparently I did not take into consideration that most people would not have xcode and other dev dependencies installed, my apologies... So I made an alternate version that does not require any ruby gem... Would you mind giving it a try? It's not quite as smooth as the original one (you won't be able to easily undo the operation, etc.) but the basic functionalities are the same.

 

 

This workflow just doesn't seem to want to work for me.

Your alternate version (no ruby) doesn't work either.  It fails with a Javascript error.

Apparently the Automator "Run Javascript" is a new Action added in Yosemite.  I'm running Mavericks.

 

Here's the Automator error msg:

 

Mac-Automator-No-Javascript.gif

 

Sorry to be so much trouble.

 

Any suggestions on what to do next?

 

My bad again, totally didn't think of compatibility issues. I re-wrote the workflow in AppleScript which should be supported in Mavericks (I think? I don't have access to a Mavericks machine at this moment so I cannot verify) and updated the gist. Would you be interested in trying it out?

  • Like 1
Link to comment
  • Level 5*

My bad again, totally didn't think of compatibility issues. I re-wrote the workflow in AppleScript which should be supported in Mavericks (I think? I don't have access to a Mavericks machine at this moment so I cannot verify) and updated the gist. Would you be interested in trying it out?

 

Fantastic!  It works very well in Mavericks (10.9.5) with EN Mac 6.0.7.

 

Thank you so much for all your patience and quick responses to my posts.

 

May I make one suggestion?  Instead of pasting the link, how about just leaving it on the clipboard and displaying a popup dialog to that effect?  Then the user to go to the desired location and paste it, rather than having to cut and paste.

 

Thanks again.  This is a huge addon feature for EN Mac.

 

May I request another addon?

 

Often this need for an internal link/bookmark comes up because it was originally setup as part of a real web page.

Would it be possible to select a group of lines (like you would have in an internal TOC for a web page), and then convert them to the proper links needed to goto the anchors/bookmarks that, hopefully, already exist in the EN Note?

 

Here is an example web page that contains a TOC at the top, with links to lots of anchors/bookmarks below:

https://developer.apple.com/library/mac/documentation/AppleScript/Conceptual/AppleScriptLangGuide/conceptual/ASLR_fundamentals.html#//apple_ref/doc/uid/TP40000983-CH218-SW2

 

Maybe you could do a EN web clip of this page, and then convert the TOC links?

Link to comment
  • Level 5*

@frogwell:

 

Well the saga continues.  It appears that EN Mac 6.0.10 broke your cross link code.

 

It seems to still work on some Notes created prior to Ver 6.0.10, but does not work on any new Notes.

The link still has the "snippet" prefix:  href="evernote-html-snippet://#anchor-en773"

Link to comment

@frogwell:

 

Well the saga continues.  It appears that EN Mac 6.0.10 broke your cross link code.

 

It seems to still work on some Notes created prior to Ver 6.0.10, but does not work on any new Notes.

The link still has the "snippet" prefix:  href="evernote-html-snippet://#anchor-en773"

I don't think it's the EN 6.0.10, it's probably due to the funkyness of the workflow itself (the implementation is far from ideal).

 

A few things to check:

1. Is the note you are editing opened in a separate window?

2. If not, is the note shown as the first item in the note list in the main window?

 

The awkwardness comes from the fact that I don't see a easy and definite way to get "the current note in the main window" via applescript. The workflow sort of assumes that use is editing the note in a separate window, or the note list in the main window is sorted by "updated time".  I've updated the workflow (gist) to include a dialog asking user to confirm that the script has the right idea about which note is being editing currently.

Link to comment
  • Level 5*

I don't think it's the EN 6.0.10, it's probably due to the funkyness of the workflow itself (the implementation is far from ideal).

 

A few things to check:

1. Is the note you are editing opened in a separate window?

2. If not, is the note shown as the first item in the note list in the main window?

 

The awkwardness comes from the fact that I don't see a easy and definite way to get "the current note in the main window" via applescript. The workflow sort of assumes that use is editing the note in a separate window, or the note list in the main window is sorted by "updated time".  I've updated the workflow (gist) to include a dialog asking user to confirm that the script has the right idea about which note is being editing currently.

 

 

Why don't you just use this code to get the Note which is selected:

I've been using it a long time, and it works well.

tell application "Evernote"		set _sel to selection -- Gets the Note(s) Selected in Evernote	if _sel ≠ {} then		set aNote to first item of _sel -- Get ONLY the 1st Note		-- Process the selected Note	end ifend tell
Link to comment

 

My bad again, totally didn't think of compatibility issues. I re-wrote the workflow in AppleScript which should be supported in Mavericks (I think? I don't have access to a Mavericks machine at this moment so I cannot verify) and updated the gist. Would you be interested in trying it out?

 

Fantastic!  It works very well in Mavericks (10.9.5) with EN Mac 6.0.7.

 

Thank you so much for all your patience and quick responses to my posts.

 

May I make one suggestion?  Instead of pasting the link, how about just leaving it on the clipboard and displaying a popup dialog to that effect?  Then the user to go to the desired location and paste it, rather than having to cut and paste.

 

Thanks again.  This is a huge addon feature for EN Mac.

 

May I request another addon?

 

Often this need for an internal link/bookmark comes up because it was originally setup as part of a real web page.

Would it be possible to select a group of lines (like you would have in an internal TOC for a web page), and then convert them to the proper links needed to goto the anchors/bookmarks that, hopefully, already exist in the EN Note?

 

Here is an example web page that contains a TOC at the top, with links to lots of anchors/bookmarks below:

https://developer.apple.com/library/mac/documentation/AppleScript/Conceptual/AppleScriptLangGuide/conceptual/ASLR_fundamentals.html#//apple_ref/doc/uid/TP40000983-CH218-SW2

 

Maybe you could do a EN web clip of this page, and then convert the TOC links?

 

The problem with leaving link in the pasteboard is... the workflow would not be able to run the "sanitizing" process as it has to happen AFTER the link is pasted into Evernote, because Evernote adds the "evernote-html-snippet://" when the link is pasted.

 

The trouble with the "restoring TOC" idea is it would require operating on the HTML and doing quite a few modification of the raw HTML content, and I'm a bit hesitant about the idea for general users, and more imporantly, I don't think this process could be implemented as a workflow or system service easily because we would need to traverse the html and do quite a few string replacements.  With JavaScripts (NodeJS + cheeriojs + AppleScript) or Ruby (rails + Nokogiri + AppleScript) or Python it's simple enough (a few short scripts), but it's kind of another long story to talk about installing dev environments, various module dependencies, etc.

Link to comment

Why don't you just use this code to get the Note which is selected:

I've been using it a long time, and it works well.

tell application "Evernote"		set _sel to selection -- Gets the Note(s) Selected in Evernote	if _sel ≠ {} then		set aNote to first item of _sel -- Get ONLY the 1st Note		-- Process the selected Note	end ifend tell

That's a very good idea, I missed that part about "selection" from the official document, thanks! I just updated the workflow with the snippet.

  • Like 1
Link to comment
  • Level 5*

That's a very good idea, I missed that part about "selection" from the official document, thanks! I just updated the workflow with the snippet.

 

Thanks.  I'll give it a try.

Link to comment
  • Level 5*

 

Why don't you just use this code to get the Note which is selected:

I've been using it a long time, and it works well.

tell application "Evernote"		set _sel to selection -- Gets the Note(s) Selected in Evernote	if _sel ≠ {} then		set aNote to first item of _sel -- Get ONLY the 1st Note		-- Process the selected Note	end ifend tell

That's a very good idea, I missed that part about "selection" from the official document, thanks! I just updated the workflow with the snippet.

 

 

@frogwell:

 

I took a look at your revised Applescript code for Note selection, and I don't understand it.

Why still use your original approach of "set currentNote to item 1 of notes of window 1"?

Couldn't this still lead to selection of the wrong Note?

 

Seems like all you need is the selection code:  "set currentNote to first item of _sel -- Get ONLY the 1st Note"

 

What am I missing?

tell application "Evernote"		set noteCount to count of notes of window 1		set currentNote to missing value		if noteCount is equal to 1 then			set currentNote to item 1 of notes of window 1		else			set _sel to selection -- Gets the Note(s) Selected in Evernote			if _sel ≠ {} then				set currentNote to first item of _sel -- Get ONLY the 1st Note				-- Process the selected Note			end if		end if		if currentNote is missing value then			return		end if
Link to comment
  • Level 5*

 

That's a very good idea, I missed that part about "selection" from the official document, thanks! I just updated the workflow with the snippet.

 

Thanks.  I'll give it a try.

 

 

OK, I have tested on one Note in EN Mac 6.0.10 and 6.0.6, and both worked fine.

 

FYI, I setup my Notes so that the Note I tested was NOT the first Note in the Note list to make sure that your code was using the correct Note for the "sanitizing".  It worked!

 

I'm still a bit concerned about the Note selection AppleScript code, but it worked OK in my limited testing.

 

BTW, I renamed the Automator Service to "EN Create Bookmark" to help identify it as an Evernote service and to use the HTML "bookmark" term.

 

Thanks again for sharing this Automator Workflow/service, and for all your help in making it work for my environment.

 

Now that the basic code/process is working, are you open to enhancement requests?

I would do them myself, but I know nothing about Ruby and the other code/scripts you used.

But I would be glad to be your Beta tester.   ;)

Link to comment

 

 

That's a very good idea, I missed that part about "selection" from the official document, thanks! I just updated the workflow with the snippet.

 

Thanks.  I'll give it a try.

 

 

OK, I have tested on one Note in EN Mac 6.0.10 and 6.0.6, and both worked fine.

 

FYI, I setup my Notes so that the Note I tested was NOT the first Note in the Note list to make sure that your code was using the correct Note for the "sanitizing".  It worked!

 

I'm still a bit concerned about the Note selection AppleScript code, but it worked OK in my limited testing.

 

BTW, I renamed the Automator Service to "EN Create Bookmark" to help identify it as an Evernote service and to use the HTML "bookmark" term.

 

Thanks again for sharing this Automator Workflow/service, and for all your help in making it work for my environment.

 

Now that the basic code/process is working, are you open to enhancement requests?

I would do them myself, but I know nothing about Ruby and the other code/scripts you used.

But I would be glad to be your Beta tester.   ;)

 

You are absolutely right about "selection". I sort of hastily scrawled the code earlier today without reading the documentation carefully. Still the code should work just fine, though. Because I put the "set currentNote to item 1 of notes of window 1" statement INSIDE an IF statement, so it will only be excuted if the frontmost Evernote window is a separate note window (which contains precisely one note). But since apparently "selection" refers to the frontmost window already, the IF statment is not necessary. I've updated the gist to reflect the change, but the workflow's behavior isn't really affected.

 

I'll take a look at the dependencies of my scripts tomorrow before posting them. It doesn't really do the "select a bunch of lines" thing as you described, instead it runs through all links in the note and try to identify those linking to in-page bookmarks/anchors and format them so their href's start with "#", and making sure the destination has a proper <a name="label">destination text</a> tag.

  • Like 1
Link to comment

 

My bad again, totally didn't think of compatibility issues. I re-wrote the workflow in AppleScript which should be supported in Mavericks (I think? I don't have access to a Mavericks machine at this moment so I cannot verify) and updated the gist. Would you be interested in trying it out?

 

Fantastic!  It works very well in Mavericks (10.9.5) with EN Mac 6.0.7.

 

Thank you so much for all your patience and quick responses to my posts.

 

May I make one suggestion?  Instead of pasting the link, how about just leaving it on the clipboard and displaying a popup dialog to that effect?  Then the user to go to the desired location and paste it, rather than having to cut and paste.

 

Thanks again.  This is a huge addon feature for EN Mac.

 

May I request another addon?

 

Often this need for an internal link/bookmark comes up because it was originally setup as part of a real web page.

Would it be possible to select a group of lines (like you would have in an internal TOC for a web page), and then convert them to the proper links needed to goto the anchors/bookmarks that, hopefully, already exist in the EN Note?

 

Here is an example web page that contains a TOC at the top, with links to lots of anchors/bookmarks below:

https://developer.apple.com/library/mac/documentation/AppleScript/Conceptual/AppleScriptLangGuide/conceptual/ASLR_fundamentals.html#//apple_ref/doc/uid/TP40000983-CH218-SW2

 

Maybe you could do a EN web clip of this page, and then convert the TOC links?

 

So here's a piece of JavaScript code that does a bit of "TOC clean up" (gist), I tried it with a clipped note from the webpage you provided and it seems to work fine. Short story is that the script invokes a subprocess in AppleScript to obtain the HTML content of target note, goes through the html and replace all links of the form "https://developer.apple.com/library/mac/documentation/AppleScript/Conceptual/AppleScriptLangGuide/conceptual/ASLR_fundamentals.html#//apple_ref/doc/uid/TP40000983-CH218-SW1"to "#//apple_ref/doc/uid/TP40000983-CH218-SW1" if it finds another element that matches this link in the note, and then invoke another AppleScript subprocess to update the target note's HTML content. It should work with the two most commonly seen TOC implementation on web (one is a pair of <a> tags, the other is an <a> tag with href pointing to another element via the 'id' property).

 

It's a command line tool (not an automator workflow). You don't need Yosemite for this, but you do need Node.JS, npm and a few node modules. Those are very popular javascript developer libraries so you should be able to find instructions on how to install them easily (this for example), if you really want to try it out. I would probably do:

 

$ brew install node

$ npm install -g temp

$ npm install -g cheerio

 

then download the en-toc-cleanup.js script and run

$ node en-toc-cleanup.js <note link>

with the <note link> replaced by the actual note link to your target note.

 
Link to comment
  • Level 5*

So here's a piece of JavaScript code that does a bit of "TOC clean up" (gist), I tried it with a clipped note from the webpage you provided and it seems to work fine.

 

Many thanks for your code and effort.  I really appreciate it.

 

While I would much like to dig into this deeper and get into "developer mode", I just don't have time right now.

But if you can package this into a simple download/install, I would be happy to beta test it for you.

Link to comment
  • 11 months later...
  • 4 weeks later...

Hi, I just started using your jump2link windows app & it allows me to perform internal note linking that was sorely needed in Evernote.Desktop

It works great!

Would it be possible to change one step in you're program?

Instead of scrolling down to the "destination link", Could you insert the cursor at that location following the "header link",

The problem is in Evernote the cursor remains at the jump link after a edit.

This would save time and confusion.

Thanks for your effort.!

 

 

 

 

Link to comment
On 4/25/2015 at 5:46 PM, CoreParadox said:

I created a simple java app elegantly named Evernote Link In Note aka ELIN. It is free and open source, you can check it out here.

Current Release: v1.1 - 4/25/15 

CoreParadox, I love ELIN! I find it more difficult to implement than you might imagine, in that some perfectly good (as far as I know) jump links never work, or stop working after a few days, but when it works, it's fabulous!

I have no idea how it works. you say it generates the destination in the form <a name="#infolink">Info Section</a> but i never see that. As far as i can tell, the Destination Text is plain text. Still I do select it and paste it into my evernote, even if the text already existed. I can't get ELIN to work without creating by pasting the Destination Text immediately after adding the hypertext Link Text. Then I have to close that evernote and sync, and if I'm lucky, when I go back to that note, the ELIN Jump links work.

You say the Jump Name must be unique to that evernote, but i don't seem to be able to reuse a Jump Name that I'm not using any more. I have 2 Jumps that the Link Text and Destination Text are the same word, "BVC" (they are different places, #8 and #9 in a list) and ELIN jumps to the right place just fine!

So thanx for ELIN!

Link to comment
  • 8 months later...

I'm hoping this is the right forum for my question - I've just realised that when I clip a webpage like Wikipedia that has internal hyperlinks (i.e. for footnotes), when I click on these links in the EN note, instead of moving to the relevant place in the note (the reference at the bottom of the page, which *is* clipped as part of the whole website), it takes me back to the browser and reloads the webpage. I understand that in this case the hyperlink is set to a Wikipedia URL, but would it not be a fairly simple add-on feature that links get altered in clipping so that they refer internally to the note? Or would this be too big a task?

Appreciate your advice. I'm running EN Version 6.11 Beta 2 on Mac OS Sierra, clipping from Chrome using the Clipper plugin.

Link to comment
  • Level 5*
32 minutes ago, benimadimben said:

I'm hoping this is the right forum for my question - I've just realised that when I clip a webpage like Wikipedia that has internal hyperlinks (i.e. for footnotes), when I click on these links in the EN note, instead of moving to the relevant place in the note (the reference at the bottom of the page, which *is* clipped as part of the whole website), it takes me back to the browser and reloads the webpage. I understand that in this case the hyperlink is set to a Wikipedia URL, but would it not be a fairly simple add-on feature that links get altered in clipping so that they refer internally to the note? Or would this be too big a task?

Appreciate your advice. I'm running EN Version 6.11 Beta 2 on Mac OS Sierra, clipping from Chrome using the Clipper plugin.

Hi.  You're posting in a thread about a completely separate application.  You should create a new post if you have a specific question like this.  In this case however there's no chance that Evernote could translate the links on the fly so you can jump around the page within Evernote.  You're probably best off saving a bookmark clip and reading the original page online.  You could suggest this as a feature request if you wish...

Link to comment

Thanks @gazumped. I'll consider a feature request. As a follow-up, I've noticed that some websites seem to be able to easy translate their URL hyperlinks to internal links when you download an article from its HTML version for offline reading - see for one example this one (at the top select 'Print' then save as pdf). So I'm not sure why it would be so out of the realm of possibility for EN...

Link to comment
  • Level 5*
36 minutes ago, benimadimben said:

As a follow-up

As @gazumped said, you should not be tacking on to this discussion
Start a discussion of your own, and I'd be happy to discuss your points

Link to comment
  • 3 months later...

CoreParadox: I would LOVE to use this. I followed your link but there was a message about your ENIL being inactive. Can you share with me, please. This would make my life SO much easier. Thank you! :)

Link to comment
12 minutes ago, kristinj said:

CoreParadox: I would LOVE to use this. I followed your link but there was a message about your ENIL being inactive. Can you share with me, please. This would make my life SO much easier. Thank you! :)

https://github.com/CoreParadox/EvernoteLinkInNote/releases

From there you can just download the .exe or .jar, but i'm no longer using Evernote so I have no intention to update or improve this app. If you would like to maintain it feel free to make pull requests.

  • Thanks 1
Link to comment

Thank you, CoreParadox! 

Might I ask what you're using now? Also, I don't know how to install something like this-- how do I know whether to download the .exe or .jar? I'm on a Mac with OS X, if that helps. :)

Link to comment
6 minutes ago, kristinj said:

Thank you, CoreParadox! 

Might I ask what you're using now? Also, I don't know how to install something like this-- how do I know whether to download the .exe or .jar? I'm on a Mac with OS X, if that helps. :)

For Mac, you would have to download the .jar file, you would also need java installed on your system, which it may already be. But I can't say for sure if the app still works correctly, it was a really sloppily hacked together app anyhow. But I messaged you what I'm using now, since I found it distasteful to post on Evernote's forums.

Link to comment
  • 11 months later...
14 hours ago, alejandrogarbis said:

@CoreParadox Thank you very much. I downloaded the *.jar file and it works perfectly. It was something I have been looking for a long time in Evernote. Great job!

I was never able to get it to work for me, might you have any times, Alejandro? :) 

Link to comment
  • 1 year later...

Sorry for bumping an old thread but i really want this feature on Evernote Windows

 

Does it actually work any more? Ive been trying all sorts of combinations of hyperlink type coding from this app and just creating my own but none seem to jump around in evernote at all?? Any help?

Thank you

J

Link to comment
  • Level 5*
20 hours ago, jicjoc said:

Sorry for bumping an old thread but i really want this feature on Evernote Windows

 

Does it actually work any more? Ive been trying all sorts of combinations of hyperlink type coding from this app and just creating my own but none seem to jump around in evernote at all?? Any help?

Thank you

J

Hi.  Can you explain what you're using these links for?  Evernote still doesn't allow you to jump to a specific place in a note,  and I'd be cautious about basing a workflow on a bit of code that someone developed for their own convenience - the feature can just disappear again as may have happened here.  I tend to use small notes for paragraphs and tie them together with a table of contents note so I can jump around easily,  and re-arrange the order manually if I need to.

Link to comment

Oh goodness, l I'd forgotten about this. 

If someone could get this feature to work, it'd be AMAZING and would totally change my workflows. I've stopped using Evernotes for a lot of things and have instead shifted to Google Docs for lists I'd rather keep & share in Evernote because of the lack of this very feature. I'm currently using the "outline" feature in Google Docs for this purpose. 
Fingers crossed that the power that be at Evernote builds this into their next release for Evernote on MacOS. :) 

Link to comment
  • Level 5*

I rolled my own for this using PhraseExpress.  Created link points using _linkpointname and a hot key that was executed with mouse click when hovering over the _linkpointname..  Not particularly difficult, or elegant, but it worked.  Hotkey basically did an in note find next.  FWIW.

  • Like 1
Link to comment
2 hours ago, CalS said:

I rolled my own for this using PhraseExpress.  Created link points using _linkpointname and a hot key that was executed with mouse click when hovering over the _linkpointname..  Not particularly difficult, or elegant, but it worked.  Hotkey basically did an in note find next.  FWIW.

CalS: how does this work? I've heard of PhraseExpress. Are you using the Evernote app on MacOS (or the website or some other version)? I'd love to know step by step how to make this work. :)

Link to comment
  • Level 5*
On 10/20/2019 at 11:35 AM, jicjoc said:

Does it actually work any more?

No, the resultant note update no longer functions for jump links within the note
On my Mac, the link jumps to my browser app (Safari)

Link to comment
  • Level 5*
4 hours ago, kristinj said:

CalS: how does this work? I've heard of PhraseExpress. Are you using the Evernote app on MacOS (or the website or some other version)? I'd love to know step by step how to make this work. :)

Here is the PE phrase.  The steps replicate what you would do manually - double click to highlight the word under the cursor, copy, find in note, paste, select next, close find in note. 

  • {#LEFTMOUSEBUTTON -count 2}{#CTRL -chars c}{#CTRL -chars f}{#CTRL -chars v}{#mouseposition -x 2755 -y 775}{#LEFTMOUSEBUTTON}{#mouseposition -x 2510 -y 775}{#LEFTMOUSEBUTTON}

The mouse positions at the end are specific to where you have the EN on your setup so the EN window needs to be in the same position for this to work.    Since I always have EN open full screen on the right monitor of a two monitor set up, not an issue for me. For the demo attached I shrank the EN window and simply modified the locations.  I use a tool called MousePos.exe to determine location.  I use _ as a prefix so that the word is unique.  Sounds and looks more complicated than it actually is.  You could actually copy/paste the above into a new PE phrase and modify the positions and be good to go.

Demo.  I copied a bit of this page and added the jump link _Answer to it.  Then executed the PE macro triggered by Shift+Alt+RightMouse.  Hope it helps.

 

20191021_164416.gif.c779908dfe2f9d9e43a4947bee5efa75.gif

  • Like 1
Link to comment
  • 6 months later...
  • 1 year later...

These posts remind that I would SO love this feature AND I still cant get the *jar file or any of the solutions mentioned here to work. I'm using the Evernote Legacy app 7.14.1 on a Mac OS Big Sur 11.4. Might anyone have the patience to walk me through the exact steps, please?  I'm pretty good with with technology, certainly not a novice but definitely no expert (if I dont know how to do some thing I google it then follow the instructions and usually get it to work). I don't use Terminal in my Mac often but when given clear instructions, I've done so in the past. Any one willing to help me, please? 

 

Link to comment

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...