the Hypothes.is quote bubble icon next to the purple obsidian gem-like icon

Hypothes.is + Obsidian = Hypothesidian for easier note taking and formatting

Anyone who knows me knows that I love Hypothes.is for all my online highlighting, annotating, and general note taking. They also know that if one isn’t actively using their notes to some better end, then it’s likely not worth having taken them at all, so I store mine in markdown in Obsidian for future-proofing and portability.

Hypothes.is + Obsidian

A while back I came across RoamHacker’s work to dovetail Hypothes.is for use in Obsidian and finally managed to get it up and running with my Obsidian vault. I’ve previously outlined a method for pulling in my notes from Hypothes.is using RSS, however this doesn’t give one any formatting capabilities and it also doesn’t provide any of the Hypothes.is tags as RSS has no layer for taxonomies.

RoamHacker’s work, which leverages the Templater Plugin for Obsidian, fixes both of these problems. I suspect that I’ll keep my prior method in place to create the individual notes, but use this additional work to clean up my fleeting notes from Hypothes.is in my actual commonplace book. Since there’s no server involved, it’s harder to automate the entire process so that every time you create notes they’re automatically ported across either in real-time or in batches every few hours.

Formatting your notes

I did spend some time last night to modify some of RoamHacker’s code to re-format the annotations to better suit my current notes format and layout. I’m excerpting the most relevant part below, but the entire Gist can also be downloaded or further modified for easier copy/pasting into one’s own vault for the needed set up.

I’ve only modified the section of the original Gist at the bottom that follows the line:
/* TEMPLATE STARTS HERE */

The changes still keep all the relevant data fields, but reorder them and add a bit of formatting to fit the layout and the way I use my Obsidian notebook. I changed the formatting so that tags in Hypothes.is are turned into [[wikilinks]] rather than #⁠hashtags as in the original. (The original also doesn’t do so well with multi-word tags, which I use quite a lot.)

Hopefully the small changes I’ve made and comparison with the original Gist will allow those who aren’t as code-savvy to better understand the template and potentially let them make changes to suit their own needs.

/* TEMPLATE STARTS HERE */ 
if (tp.file.content.length==0) {
  //likely a new document, insert front matter
  tR += `---\n`;
  tR += `fileType: HypothesisAnnotations\n`;
  tR += `creationDate: ${tp.date.now('YYYY-MM-DD')} \n`;
  tR += `annotationDate: ${articleAnnotations[0].created.substring(0,10)}\n`;
  tR += `uri: ${articleAnnotations[0].uri}\n`;
  tR += `---\n`;
}

tR += `# ${articleAnnotations[0].title}\n`
tR += `URL: ${articleAnnotations[0].uri}\n\n`

for( a of articleAnnotations) {
  let tags = '';
  let user = '';
  if(a.tags.length>0) tags = ' ' + (a.tags.map(t=> '[['+ t + ']]')).join(' ');
  if(insertUser) user = ' _(' + a.user.replace('acct:','').replace('@hypothes.is','') + ')_';
  if(a.text) tR += `${a.text}\n—[[${user}]]\n\n`;
  tR += `## Source \n`;
  tR += `> ${a.highlight}[^1]\n\n`;
  tR += `[^1]: [${articleAnnotations[0].title}](${articleAnnotations[0].uri}) | [syndication link](tk) \n`;
  tR += `\n---\ntags: \nlinks: ${tags} \n- broader terms (BT):  \n- narrower terms (NT):  \n- related terms (RT):  \n- used for (UF) or aliases:  \nconnected ideas:  \nMOC:  \n\n---\n`;
}
%>

Published by

Chris Aldrich

I'm a biomedical and electrical engineer with interests in information theory, complexity, evolution, genetics, signal processing, IndieWeb, theoretical mathematics, and big history. I'm also a talent manager-producer-publisher in the entertainment industry with expertise in representation, distribution, finance, production, content delivery, and new media.

30 thoughts on “Hypothes.is + Obsidian = Hypothesidian for easier note taking and formatting”

    1. This is pretty slick and looks pretty in its published form. Great to see others are using clever set ups like this as posting interfaces.

      I have a feeling that other TiddlyWiki users would love this sort of thing. While TW may not seem as au courant, it’s still got some awesome equivalent functionality and great UI which is what most of the users in the note taking space really care about.

      I do still wish that there was a micropub set up for Hypothes.is to make this sort of thing easier for the non-technical users.

      Syndicated copies:

Reposts

  • Eleanor Konik
  • RoamHacker - exploring PKM and its future

Leave a Reply

Your email address will not be published. Required fields are marked *