brainsteam.co.uk/brainsteam/content/posts/2023/01/22/hypothesis-vscode-plugin.md

36 lines
2.9 KiB
Markdown
Raw Normal View History

2023-01-22 12:46:23 +00:00
---
2023-07-09 11:34:44 +01:00
date: 2023-01-22 12:45:13+00:00
description: More tinkering has resulted in yet another plugin for hypothesis annotations
- this time in vscode
2023-01-22 12:46:23 +00:00
mp-syndicate-to:
- https://brid.gy/publish/mastodon
- https://brid.gy/publish/twitter
2023-07-09 11:34:44 +01:00
post_meta:
- date
2023-01-22 12:46:23 +00:00
tags:
2023-07-09 11:34:44 +01:00
- hypothesis
- pkm
- ToolsForThought
title: Hypothesis Vscode Plugin
type: posts
url: /2023/1/22/hypothesis-vscode-plugin
2023-01-22 12:46:23 +00:00
---
I've been trying out [Dendron](https://dendron.so) for managing my personal knowledge and notes. When I saw that there were no vscode plugins that appear to sync with [Hypothesis](https://hypothes.is) and given my own use of hypothesis for literature notes and my recent [Joplin integration attempt](https://brainsteam.co.uk/2022/12/11/joplin-hypothesis-0-1-0/), I couldn't help myself.
Introducing [Markdown Hypothesis Sync](github.com/ravenscroftj/md-hypothesis-sync) a plugin for [Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=RavenscroftSoftware.md-hypothesis-sync) and [VSCodium](https://open-vsx.org/extension/RavenscroftSoftware/md-hypothesis-sync) that allows you to download your hypothesis annotations and any quotations in context and store them in your markdown-based second brain.
![a screen recording of the plugin in action](https://github.com/ravenscroftj/md-hypothesis-sync/raw/HEAD/images/screenrecording.gif)
The plugin comes with built in Dendron integration so that the required markdown frontmatter records can automatically be generated immediately after sync by running [Dendron Doctor](https://wiki.dendron.so/notes/ZeC74FYVECsf9bpyngVMU/#fixfrontmatter).
The plugin uses a frontmatter attribute called `hypothesisURI` to track which markdown file is associated with which website that you have annotated and it uses HTML comments which are invisible in rendered markdown to track where each annotation begins and ends within files.
That means that it's possible for you to move and rename your notes and add more detail to the markdown file without the plugin losing information or getting confused. It also means that if you add more annotations to a site you annotated before they can be added to your markdown file incrementally.
I'm really enjoying Dendron so far and, I'm publishing a subset of my permanent notes and useful links as a static digital garden [here](https://notes.jamesravey.me). This has been a fun weekend hack that has allowed me to have a go at learning to build VS Code plugins.
If you end up using my plugin, please share your experience with me over on [fosstodon](https://fosstodon.org/@jamesravey), by [email](hypothesis-plugin@jamesravey.me).
Although I have switched to Dendron for now, I plan on updating my existing Joplin plugin with some of the new functionality I developed for the VSCode tool soon (specifically, the ability to have a single note contain multiple annotations versus the current tool which creates new notes per annotation).