HYPOTHESIS

Import your Hypothesis notes and highlights into Roam!

Installation

You could use the Copy Extension button below to individually install this extension. To install, just paste anywhere in your Roam graph and click "Yes, I Know What I'm Doing".

Manual Installation

If the extension doesn't work after using the copy extension button above, try installing manually using the instructions below.

First create a block with the text {{[[roam/js]]}} on any page in your Roam DB. Then, create a single child of this block type three back ticks. A code block should appear. Copy this code and paste it into the child code block in your graph:

var existing = document.getElementById("roamjs-hypothesis-main");
if (!existing) {
  var extension = document.createElement("script");
  extension.src = "https://roamjs.com/hypothesis/main.js";
  extension.id = "roamjs-hypothesis-main";
  extension.async = true;
  extension.type = "text/javascript";
  document.getElementsByTagName("head")[0].appendChild(extension);
}

Finally, click "Yes, I Know What I'm Doing".

Instructions

Overview

This extension includes SmartBlock commands designed to pull in annotations from Hypothes.is. To get started,

  1. Register for a free user account at Hypothes.is

  2. Assign the Hypothesis User Token API (See Configuration section on this page)

Configuration

The following settings are for configuring the behavior of the Hypothes.is SmartBlocks. These settings could be configured on the roam/js/hypothesis page.

To access your annotations, you need a free developer key from Hypothes.is which can be obtained at: https://hypothes.is/account/developer. Add this token to the token tab of your config page.

The output format for the block for a highlight can be customized. You can use standard Roam elements in a block and in the template including HIGHLIGHT for where the highlight text should appear and URL for where the URL to the hypothesis annotation.

The output format for the block for a note can be customized. You can use standard Roam elements in a block and in the template including NOTE for where the note text should appear and URL for where the URL to the hypothesis annotation.

SmartBlocks

HYPOTHESISOPENSITE

Description: look at text in the current block for a URL. It opens the URL in Hypothes.is for annotation

HYPOTHESISINSERTANNOTATIONS

Description: Looks at text in the current block for a URL to an article. For that URL retrieves "my" annotations and inserts them as child blocks.

The first argument is a limit parameter to specify how many annotations are returned. By default, the value is 20 with the max being 200.

HYPOTHESISPUBLICANNOTATIONS

Description: Looks at text in the current block for a URL to an article. For that URL retrieves annotations from all users and inserts them as child blocks.

The first argument is a limit parameter to specify how many annotations are returned. By default, the value is 20 with the max being 200.

Coming Soon...

Description: Asks for a start date and returns all annotations made by the user from that date until now

  • Insert my annotations made from a date until now

  • Insert article titles of articles I have annotated from a date until now

  • Insert annotations from date with tag(s)

Contributors

This extension is brought to you by RoamJS! If you are facing any issues reach out to support@roamjs.com or click on the chat button on the bottom right. If you get value from using this extension, consider sponsoring RoamJS by clicking on the button below!

ROAMJS DIGEST

Add your email below to stay up to date on all RoamJS features, fixes, and news!

Other Extensions