Skip to content

artyom-poptsov/guile-ini

Repository files navigation

Guile-INI

https://github.com/artyom-poptsov/guile-ini/actions/workflows/guile2.2.yml/badge.svg https://github.com/artyom-poptsov/guile-ini/actions/workflows/guile3.0.yml/badge.svg

A GNU Guile library for working with INI format.

License

Guile-INI is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Please see COPYING file for the terms of GNU General Public License.

Requirements

Usage

This program reads an INI data from the standard input, converts it to a scheme list and then converts it back to INI data:

#!/usr/bin/guile \
-L modules -e main -s
!#

(use-modules (ice-9 pretty-print)
             (ini))

(define (main args)
  (let ((data (ini->scm (current-input-port)))
    (pretty-print data)
    (scm->ini data #:port (current-output-port)))