Quantcast
Channel: DEVONtechnologies Community - Latest posts
Viewing all articles
Browse latest Browse all 17772

Script: Convert Markdown to TextBundle with images included

$
0
0

Since people here are occasionally asking for TextBundle support, I whipped up a Javascript script that converts the selected Markdown records to TextBundle packages in the file system (not in DT, since DT doesn’t support TextBundle natively). It copies all local images (i.e. those not referred to by http/s URLs) into the TextBundle’s asset folder.

The code is only minimally tested with a single MD document, containing several images. Bear could import the resulting TextBundle just fine. Note that the TextBundle will not display an icon!

I tried to comment the script as detailed as possible. Please don’t hesitate to ask any remaining questions here.

Also note that the code relies on the existence of the SetFile system command. It is part of the XCode command line tools. If you don’t have a usable SetFile installed, please install the XCode command line tools. See this StackExchange thread for details.

JavaScript code to convert a Markdown document into a TextBundle package (click for more details)

Viewing all articles
Browse latest Browse all 17772

Trending Articles