xuv's notebook

Side notes, howtos and random bits of information related to Julien Deswaef's activities

User Tools

Site Tools


tools:cooklang

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tools:cooklang [2026/08/25 10:41] – [Dokuwuki plugin] Julien Deswaeftools:cooklang [2026/08/27 10:44] (current) – Julien Deswaef
Line 1: Line 1:
-====== Cooklang ======+# Cooklang 
  
-===== Dokuwuki plugin =====+## Dokuwuki plugin
  
-I’ve started writing some [[recipes:]] with [[https://cooklang.org|Cooklang]]. And so I thought about adding the [[https://github.com/afranchuk/dokuwiki-plugin-cooklang|Dokuwiki Cooklang plugin]] to this notebook. <del>But I’ve been struggling to get it to work.</del>+I’ve started writing some [[recipes:]] with [Cooklang](https://cooklang.org). And so I thought about adding the [Dokuwiki Cooklang plugin](https://github.com/afranchuk/dokuwiki-plugin-cooklang) to this notebook. ~~But I’ve been struggling to get it to work.~~
  
-  - I needed to figure out how to install ''cook'', the commandline software that parses cooklang recipes. I figured out that OVH might permit me to put this in the ''cgi-bin'' subfolder on my shared hosting. + - I needed to figure out how to install `cook`, the commandline software that parses cooklang recipes. I figured out that OVH might permit me to put this in the `cgi-bin` subfolder on my shared hosting. 
-  - After that, I had to figure out how to configure the Dokuwiki to actually find it. It’s all about finding the right path. + - After that, I had to figure out how to configure the Dokuwiki to actually find it. It’s all about finding the right path. 
-  - But even after that the plugin would still return an error and never display properly a recipe. + - But even after that the plugin would still return an error and never display properly a recipe. 
-  - Turns out at OVH compiles its PHP with ''--enable-sigchild'' which makes ''proc_close'', a function that the plugin calls to close the connection with `cook` always return undefined or an error. So the plugin never moves to displaying the recipe. + - Turns out at OVH compiles its PHP with `--enable-sigchild` which makes `proc_close`, a function that the plugin calls to close the connection with `cook` always return undefined or an error. So the plugin never moves to displaying the recipe. 
-  - After chatting with Gemini for a while to debug this PHP issue and look for alternative. Gemini suggested to create a third output pipeline just to catch the return of the command. That seemed to have done the trick. The forked and working code is here https://github.com/xuv/dokuwiki-plugin-cooklang/tree/fix_only_errors Maybe the original author will accept the pull request.+ - After chatting with Gemini for a while to debug this PHP issue and look for alternative. Gemini suggested to create a third output pipeline just to catch the return of the command. That seemed to have done the trick. The forked and working code is here https://github.com/xuv/dokuwiki-plugin-cooklang/tree/fix_only_errors Maybe the original author will accept the pull request.
  
-==== Limitations ====+### Limitations
 The plugin will only work with simple recipes. It does not work with meta-data, titles for sections,  The plugin will only work with simple recipes. It does not work with meta-data, titles for sections, 
 notes or recipe reference notes or recipe reference
  
-==== Updating cookcli ==== +### Updating cookcli 
-To update the cookcli on this server, find [[https://github.com/cooklang/cookcli/releases/t|the release]] that’s named: ''cook-x86_64-unknown-linux-musl.tar.gz'', unpack it and move it to ''cgi-bin'' folder+To update the cookcli on this server, find [the release](https://github.com/cooklang/cookcli/releases/t) that’s named: `cook-x86_64-unknown-linux-musl.tar.gz`, unpack it and move it to `cgi-bin` folder 
 + 
 +### TODO 
 + - Cooklang Dokuwiki plugin needs to be updated to render the latest version of the specification. Until then, it’s probably only partially usable and with quite simple recipes.
  
tools/cooklang.1787647277.txt.gz · Last modified: by Julien Deswaef