Last tended on 3 September, 2022 (first created 3 September, 2022)

, ,

What I intend to do and why

I’ve been using h. in the past weeks, and I like the tool. It created/uses a W3C protocol and has an API I can use with a token connected to my account.
I want to integrate annotations I make with my notes I keep locally better. This points towards using h. ‘headless’ in the sense I push things to and pull things from the API, rather than do my annotations in browser. This would reduce friction in my note making flow.

There are several things I can think of, at different levels of difficulty to achieve.

  • Being able to submit urls with a page wide annotation, tied to how I save webpages and a motivation for saving with a markdown clipper.
  • Being able to annotate a page saved in my notes, and send the annotations to the right url in h.
  • Being able to update annotations.

The first is the most straightforward, and the first I will try to achieve.

Steps taken

Save new page annotations

  • Envisioned path:
    • Use markdownload to save a page in markdown in an Obsidian folder. Alter the template to have the relevant info in a predictable spot (h post status, URL, web archive url and motivation for saving)
    • Run a script that checks for new files in that folder and filters those with a status of not yet posted to h.
    • Run API calls to submit the selected notes to h.
    • Change the status of the notes in Obsidian to published to h.
  • Steps taken
  • Steps to take
    • Try out the minimal JSON / POST structure in Postman to get it right
    • Try out the same JSON / POST re-using an earlier micropub script to post from PHP to h.
    • Find out how to evaluate the response and then set the status in the Obsidian note, re-using the script I use to blog from my notes to WP.

2 reactions on “Send Annotations to Hypothes.is

, ,

Comments are closed.