Does anyone know of a library that writes ini format files from maps/vectors?
Needed it for a demo: Wrote my own minimal one:
defn manifest-ini(map):
defn section(key sec):
reduce-kv _ "[$key]\n" sec:
fn(sec key val):
sec +: "$key = $val\n"
reduce-kv _ '' map:
fn(ini key val):
ini +: section(key val)manifest-ini::
uwsgi:
module:: module
pythonpath:: dir
socket:: -"$dir/uwsgi.sock"
chmod-socket:: permission
callable:: application
logto: /var/log/uwsgi/uwsgi.log
->
[uwsgi]
module = uwsgi_module
pythonpath = /var/www
socket = /var/www/uwsgi.sock
chmod-socket = 644
callable = my-app
logto = /var/log/uwsgi/uwsgi.log