Skip to content

Instantly share code, notes, and snippets.

View derekvan's full-sized avatar

Derek Van Ittersum derekvan

View GitHub Profile
@derekvan
derekvan / move text to heading.js
Created May 27, 2022 12:13
Obsidian Templater template for moving text to a specified heading
<%*
// ```javascript
const file = tp.config.active_file
const headings = this.app.metadataCache.getFileCache(file).headings;
const editor = app.workspace.activeLeaf.view.editor;
let content = "";
const isSelection = editor.somethingSelected();
const selection = editor.getSelection();
const line = editor.getLine(editor.getCursor().line);
@derekvan
derekvan / obsidian_to_marked_wikilink_preprocessor.rb
Created April 2, 2021 18:00 — forked from radekkozak/obsidian_to_marked_wikilink_preprocessor.rb
Obsidian [[WikiLinks|with aliases]] preprocessor for Marked app
#! /usr/bin/env python
# -*- coding: utf-8 -*-
## iMDtoPDF.py
## by W. Caleb McDaniel
## http://wcm1.web.rice.edu
## This is a wrapper script for sending documents to Docverter
## for conversion from markdown to PDF using Pandoc. Typically
## Docverter calls are made with cURL; this script uses httplib.