TADpoLe

Overview

The ThoughtAsylum Drafts Library, also known as TADpoLe, is a collection of JavaScript for working with the Drafts application. They cover a broad range of areas, and will no doubt continue to grow over time. The library was built over the course of several years as I needed to build out more functionality in the Drafts application through it’s actions framework, and in particular through the script (JavaScript) action step. Being a JavaScript developer is not my day job (nor has it ever been); so it is very much a piece of work that is provided as-is and perhaps doesn’t adhere to the coding styles and structures that others may use.

The library began construction in 2018 when Drafts 5 was released, and has been reworked several times and grown substantially in the intervening years. The expectation is that it will continue to grow and updates will be made available through the TADpoLe sub-site when they are ready for a public release.

At initial release in July 2020, the library contents came in at over 300 functions associated with standard JavaScript objects, Drafts objects, and some TADpoLe specific classes.

Library Documentation

The TADpoLe sub-site provides the documentation for the TADpoLe library as well as the library file itself. It is purposefully provided in a similar format to the Drafts scripting resource, and in a similar way you can review each class by selecting one of the links. Within each you will find a variety of properties and functions. Many of the functions are extensions of existing JavaScript or Drafts objects, and all library functions are prefixed TA_ as an identifier.

Functions provide details of the functionality, parameters, returns, and a simple example. Some functions also provide some more detailed sets of information about their use. Properties and classes unique to the library are similarly described with what we hope is enough detail for them to make sense and be used.

TADpoLe Posts

Additional pages of information around how to use specific parts of the library will be published over time here and tagged as tadpole posts. A list of the currently available posts is listed below.

Action Group Suite

The main way that most users will gain access to the library will be through the use of the ThoughtAsylum Action Group Suite (TAAGS), available from the Drafts Action Directory.

Install ThoughtAsylum Action Group

Due to size limitations being neared in the Apple sync system utilised by Drafts, the original action group now only holds core functionality to be used by other actions. The hundreds of other actions have been split into separate action groups to produce what is referred to as the suite.

  1. Install ThoughtAsylum - Writing Action Group
  2. Install ThoughtAsylum - Management Action Group
  3. Install ThoughtAsylum - Export/Import/Share Action Group
  4. Install ThoughtAsylum - Trove Action Group
  5. Install ThoughtAsylum - Tasks & Lists Action Group
  6. Install ThoughtAsylum - Power User Action Group

What is in the Suite?

The suite consists of hundreds of actions. In fact it topped 500 actions in November 2020. While each action is described, it can be tedious to try and read them all. In fact even with what’s referenced below, that’s not the intention. Rather the action group suite provides you with an ever growing toolbox of actions that you can rummage around in when you find you need something new.

For anyone who wants a quick way to search through the list of available actions across the groups, there is a one page list available of all of the actions, including their descriptions.

For anyone who just wants to check on what is new or changed since a previous date, there is also a change log. The log doesn’t just note new actions, but any updates to existing actions too.