When POSSE’ing to space-limited fora such as Twitter & Mastodon, it can be inconvenient to have a lengthy post truncated by the target platform. brid.gy offers the ability to specify platform-specific text to be sent to the target silo.
We can take advantage of the Org Export back-end feature
:filters-alist
to make this more
convenient. :filters-alist
is a property list defining various
filters to be applied to the Org document during publication. Salient
to our purposes is :filter-parse-tree
: this filter is applied
to the Org document’s abstract syntax tree after the initial parse.
indie-org.sh
sets this filter to the function
iosh/post/filter-parse-tree
; it will search for a top-level Org
heading tagged with toot-text
. If found, that heading will be
removed from the parse tree, but the contents will be used when
POSSE’ing to Twitter & Mastodon.
For instance:
#+TITLE: My Post #+DESCRIPTION: I made a thing ... * Introduction This is a very long post.... * The First Thing ... blah. Blahblahblah. * Mastodon :toot-text: I wrote a very long post!
When this document is POSSE’d to Mastodon, only the text “I wrote a very long post!” will appear, along with a link to the original document.