Skip to content

Instantly share code, notes, and snippets.

@RobTrew
RobTrew / dtSheetMMDPrettyPrinted.js
Last active October 3, 2022 18:22
Selected DEVONthink Sheet -> DEVONthink markdown record (pretty-printed MMD table)
((options) => {
'use strict';
// (NB JavaScript for Automation – JXA: Save as .scpt )
// Selected DEVONthink Sheet -> DEVONthink markdown record (MMD table)
// (New record containing MMD table created is same group as selection)
// Uses original fileName stem, with '.md' appended.
// This is the *whitespace pretty-printed* version
@RobTrew
RobTrew / BBDrafts.js
Last active January 17, 2023 16:45
First draft of (Drafts 5 - based) JS (JXA) interface functions for BBEDIT
// A draft JXA library which aims to provide macOS BBEdit
// (https://www.barebones.com/products/bbedit/)
//
// with some of the iOS Drafts 5 (http://getdrafts.com/)
// editor functions.
// Save this file as '~/Library/Script Libraries/BBDrafts.js'
// Rob Trew (c) 2018
@RobTrew
RobTrew / bbEditCaseCycle-001.js
Created May 16, 2018 11:40
A BBEDIT version of a Drafts 5 action which toggles the case of selected text
(() => {
'use strict';
/*
A JavaScript for Automation script for BBEDIT
Cycle the case of selected text :: Mixed -> Upper -> Lower -> Mixed
(If the selection is collapsed, the nearest word will be selected)