-
Notifications
You must be signed in to change notification settings - Fork 857
FoldingText Support using AppleScript
This AppleScript will convert a FoldingText outline into a Remark presentation. If stored in the FoldingText "Scripts Folder" it can be accessed by FT's keyboard commands. This script is designed to produce an HTML presentation which differs from the HTML in the README file in two ways:
-
It is designed for a locally stored
remark.min.js file
. If you wish to pull the online version instead, replaceremark.min.js file
withhttps://github.com/downloads/gnab/remark/remark-0.4.4.min.js
-
It uses an external CSS file, so as to avoid having to code the CSS in AppleScript
The script will start a new slide at every new H1, assuming H1 is marked with a single #
. This makes it easier to use FoldingText, which can collapse or zoom each slide.
Whenever the FT is updated you can quickly update the Remark HTML by running the script again, it will write-over the previous version.
Note, however, that this script cannot (yet) handle Remark's Markdown extensions for slide "name", "class", or "template" as these have to go before the slide division and the script starts a new slide at every
#
. If you have an idea for an improvement to this script, please leave a comment in the FoldingText Support thread about this script.
Because the script doesn't display properly in this wiki, I've moved it to Gist:
body { font-family: 'Droid Serif'; }
h1, h2, h3 {
font-family: 'Yanone Kaffeesatz';
font-weight: normal;
}
.remark-code, .remark-inline-code { font-family: 'Ubuntu Mono'; }
</style>
Code:
def add(a,b)
a + b
end
</textarea>
<script src="https://remarkjs.com/downloads/remark-latest.min.js">
</script>
<script>
var slideshow = remark.create();
</script>