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

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

Install ThoughtAsylum Action Group

Due to size limitations being neared in the Aple 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 a number of action groups to produce a suite of ThoughtAsylum action groups.

  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

Here are a few additional pages of information that you may be interested in: