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

Siri shortcuts/workflow: Problem with relative links in richt text in "Create New Note" - mitigation with <base> tag

Recommended Posts

I am adding a "Safari web page" or a rich text (converted from html) to Evernote by means of the Action "Create New Note" or "Append to Note" from the shortcuts app.

For all local hyperlinks the href attribute gets completly wiped. The <a> tags themselves are being maintained (at least returned to shortcuts) by Evernote.

In the final Evernote note the links are not availale/visible at all. 

While this makes somewhat sense as relative links require a base url,

Evernote could evaluate the "safari web page" structure which contains the following details as available in shortcuts app: 

  • Page Contents 
  • Page Selection
  • Page URL
  • Name

 

 

The missing functionality can be mitigated by

  1. Extracting the page contents or selection from the safari web page,
  2. Converting the content to html by means of the "Make HTMK from Rich Text" action with the "Make Full Document" switch enabled and
  3. Adding a <base> tag with the "Page URL" as the value for the href argument. the Page URL can be extracted by the "Get Details of Safari Web Page" of the shortcuts app. 
    To add the <base> Tag I use the "Replace Text" action to search for the <head> tag (ideally with "Regular Expression" enabled) to cover for optional parameters in the head tag.

 

This way selections and full pages (as rich text) can be added to Evernote, e.g. when collecting research. 

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

×