Wielder

by victorb
5
4
3
2
1
Score: 34/100

Description

Category: Coding & Technical Tools

The Wielder plugin is a game-changer for Obsidian users who want to harness the power of Clojure directly within their documents. With Wielder, you can write code blocks marked as clojure and have them automatically run in view mode, allowing you to build complex pipelines and data visualizations without leaving Obsidian. The plugin also enables rendering React components with Reagent, making it possible to create interactive applications straight from your markdown files. Additionally, Wielder provides direct access to the Obsidian API, giving you unparalleled flexibility and control over your notes.

Reviews

No reviews yet.

Stats

105
stars
3,762
downloads
5
forks
1,416
days
852
days
1,416
days
1
total PRs
0
open PRs
1
closed PRs
0
merged PRs
8
total issues
7
open issues
1
closed issues
0
commits

Latest Version

4 years ago

Changelog

README file from

Github

Obsidian Wielder

Clojure inside your Obsidian documents!

This Obsidian plugin allows you to use the full power of Clojure directly inside of your documents in Obsidian! If you view documents with code blocks marked as clojure in the view-mode of Obsidian, this plugin will automatically run the code you have specified inside the block.

The plugin goes block by block for your entire document, so you can build pipelines of data with descriptive text in-between, and slowly build up to the final data and then present it. All directly in your documents without doing anything outside of Obsidian.

Add in rendering React components with Reagent, and you can build fully interactive applications by just writing in markdown files, rendered in Obsidian!

Wielder also allows you to access the Obsidian API directly (via window.app), so anything you can do with a plugin, you could also do directly in just document.

Installation Instructions

Take a look at the Installation Tutorial to learn how you can install Wielder in Obsidian

Warning: Wielder can run any code defined as Clojure code-blocks in your Obsidian documents

Just like Templater or Dataview, Wielder executes code defined by your Obsidian documents. This means any sort of code.

Unless you know exactly what the code you're executing does, it can be harmful to your Vault, Obsidian installation or even complete system.

You should take care to only run Wielder with code you understand what it does, and also not copy-paste code from strangers into your Vault without fully understanding what it does.

Wielder will never run any code defined from outside your Obsidian Vault, so you are yourself responsible for the code that gets executed.

Again, take care of what code you run with Wielder, as it can be potentially destructive.

Demonstration Vault

It's hard to describe exactly what you can do with Wielder with just text, so easiest is to just install the plugin and checkout the demo-vault provided in this repository.

If you don't want to install the plugin before seeing it in action, you can checkout a web version of the vault (and Wielder) here: https://wielder.victor.earth (ah yeah I forgot to mention: of course it works with webpages as well as inside Obsidian!)

Code Layout

The main pieces are the following files:

  • sci-js/src/sci/api.cljs - ClojureScript file which provides a JS<>CLJS interface to be used by this plugin
  • src/evaluator.ts - TypeScript source for initializing the SCI environment and evaluating code snippets from DOM elements
  • src/main.ts - Obsidian Plugin's main source file. Is what gets compiled into main.js and published as the plugin
  • src/publish.ts - Source of the publisher part. Include the compiled version of this library and your published site will work (mostly) the same way as your vault when loaded via desktop Obsidian.