sas: simple app script
simple is a simple app script for remarkable that lets developers write apps without needing to compile code.
simple app script applies the unix philosophy of pipes to building a UI: a description of the UI to display is provided on stdin and when there is an event on a widget, it prints the UI’s current state and the event to stdout and exits.
using simple app script greatly reduces the amount of code needed to put a UI on the screen and reduces the development lifecycle for developers, since you can immediately re-run your app and see the changes without waiting for the compilation cycle.
the spec is still being prototyped, but the core of the concept is the intermediate language. the backend for the language can be written with qt, rust or plain c/cpp.
an example layout:
button 50 50 200 50 I'm a button
button 50 150 400 50 I'm a different button
label 50 100 300 50 I'm some text
image 50 200 200 200 /home/root/bomb-solid.png
[paragraph 80 450 800 200 I'm multi-line text, I'm multi-line text, I'm
multi-line text, I'm multi-line text, I'm multi-line text, I'm multi-line text,
I'm multi-line text, I'm multi-line text, I'm multi-line text, I'm multi-line
text, I'm multi-line text, I'm multi-line text, I'm multi-line text, I'm
multi-line text, I'm multi-line text, I'm multi-line text,]
an example bash program with one scene and one event:
#!/usr/bin/env sh
while true; do
app="
button 50 50 200 50 option 1
button 250 50 200 50 option 2
label 500 500 200 50 you pressed: ${option}
[paragraph 500 600 500 500 ${output}]
"
echo "APP IS"
echo "${app}"
option=`echo "${app}" | apps/simple.exe | grep 'selected:' | sed 's/selected: //'`
output=`cat /etc/os-release`
sleep 0.1
done
tutorials
Eeems has written a great tutorial for geting started with simple
spec concepts
see the sas spec