I am currently considering using a scheme based static site generator and found out about Skribilo and its accompanying Skribe markup language. It seems quite powerful and interesting.
I’m curious if anyone here has hands-on experience with Skribilo/Skribe.
Any review, tips or some other sort of insight would be really helpful. If you have any examples or resources of sites using it, that would be great as well
Hi, I started to use Skribe recently. I use it via Haunt — dthompson.
It uses a very small subset of Skribe, and I think it is good enough as a start point.
Hey, yeah I saw that Haunt has support for Skribe. So for now you are just using it for your website? Because I saw that it also has a outline syntax which is similar to org, so maybe someone is using it also for note taking and other things
I think skribilo is quite cool even if a bit rough around the edges.
My goal is to some day be able to generate text and tables from the same data as tools like Character Generators, statistical evalutions etc.
It might be useful as examples for beginners as I am a beginner as well and don’t do anything fancy.
I also found the skribilo code itself to be quite readable.
You can check it out here:
Its under a CC license and the intention is to be a “free as in freedom” project as a ttrpg.
Nice. I invested some time yesterday to get started with Skribe in Haunt. It is working for now but as you said, it is only using a small subset so I probably have to expand the reader
As far as I understand generating text based on data or programming logic is one of the key design goals of skribilo, they call it “Document Programming”.
table-top role playing games (ttrpg) are a good usecase for this.
Books for these games combine prose, often quite similar to a fantasy novel, with descriptions of game mechanics.
Game mechanics are in a very formal language often containing many numbers which come from considerations of game design and balancing.
Being able to lets say change “the basic health value of a creature” and this is automatically put into the text and evaluated in calculated contexts like “The life drain spell of an evil wizard does damage equal to half the basic health value” is cool.
I like it more. I would want to see metadata attachment to get serious. We kind of have two things in org, templating and metadata.
The metadata is the more valuable case I think. That’s how we specify all our export settings, attach data to headings for manipulation by applications etc.
We use noweb for templating in Org, and I hate it. Not sure if templating with Lisp would make templating more useful to the point that it acquires more use cases, but I like the unquote idea.
A perfect fusion of markdown and JSON but in Lisp would be my dream.
“Templating” can be done by writing a number of special functions for your specific template. Let’s say you want a template for ACM research papers. You would write functions like “article”, “abstract”, “review”, … to insert special latex/html.
(article
(abstract [i am an abstract])
(p [i am a paragraph]) ;; inherited from base skribe
)
Essentially you create your own domain specific mini language. The entire syntax can be changed.
“Metadata” is added with keywords.
(article
:title "Important Paper"
:organization "Systemcrafters"
(abstract [i am an abstract])
(p [i am a paragraph])
)
Small update:
Next to Skribe for Guile Scheme there is also Scribble: The Racket Documentation Tool, which seems to have a more extensive documentation + ecosystem (and a general focus on creating domain specific languages).
Org attaches metadata to structural elements such as headings:
* A Heading
:PROPERTIES:
:FOO: value
:BAR: so-valuable
:END:
Regular conent again
#attr_html: width 40%
[[images/some-diagram.png]]
#keyword: value of a keyword element
:DRAWER:
some
raw
data
:END:
#+begin_src: elisp :parameter value :param-two another-value
(message "so block parameters are lisp-like, but nothing else?")
#+end_src
This is likely not all of them.
The properties drawer and affiliated keyword (#+attr_html) are the main ones. We typically do not export that content directly but instead treat it as embedded data that may specify how something is exported. We may also use it to implement the data storage for some stateful application built on top of the org format.
It should be apparent that this is very not lisp-like syntax and that there are many (to many) ways to attach metadata. Org is not lisp like. Org is not even org like. It’s kind of just a pile of things that people borrowed from other markups.
I started an experiment (currently on hold) to rewrite the Guile course materials in Skribilo/Skribe and see a lot of promise in it, though I dunno how comfortable it would be to write compared to Org Mode.
It is very nice to be able to write your own procedures to reduce repeated patterns, though. You can basically make your own special-purpose document markup language that you write asScheme.