Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rudolfochrist/trivial-configuration
A trivial configuration file reader
https://github.com/rudolfochrist/trivial-configuration
Last synced: 4 days ago
JSON representation
A trivial configuration file reader
- Host: GitHub
- URL: https://github.com/rudolfochrist/trivial-configuration
- Owner: rudolfochrist
- Created: 2022-03-18T22:27:59.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-03-19T20:52:15.000Z (almost 3 years ago)
- Last Synced: 2024-12-05T17:46:44.266Z (about 1 month ago)
- Language: Common Lisp
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.txt
Awesome Lists containing this project
README
1 NAME
======trivial-configuration --- A trivial configuration file reader.
2 VERSION
=========,----
| 0.2
`----3 SYNOPSIS
==========,----
| (config:read-config "/path/to/config.conf")
| *server-port* ;=> 5000
`----4 DESCRIPTION
=============Translate simple configuration `key=value' pairs to global variables.
Example:
app.conf
,----
| a=b
| foo=hello
| baz="some whitespace contained"
| quux="some whitespace with \"escape\""
| num=56
| make_me_param_case=12.5
| db_user=foo
| db_pass=bar
| db_host=localhost
| db_port=5432
| db_name=names
| database_url="postgres://$db_user:$db_pass@$db_host:$db_port/$db_name"
`----Read them in:
,----
| CL-USER> (config:read-config "app.conf")
| ; No value
`----Use them:
,----
| CL-USER> *a*
| "b"
| CL-USER> *foo*
| "hello"
| CL-USER> *baz*
| "some whitespace contained"
| CL-USER> *quux*
| "some whitespace with \"escape\""
| CL-USER> *num*
| 56
| CL-USER> *make-me-param-case*
| 12.5
| CL-USER> *db-user*
| "foo"
| CL-USER> *db-pass*
| "bar"
| CL-USER> *db-host*
| "localhost"
| CL-USER> *db-port*
| 5432
| CL-USER> *db-name*
| "names"
| CL-USER> *database-url*
| "postgres://foo:bar@localhost:5432/names"
`----5 AUTHOR
========Sebastian Christ ()
6 LICENSE
=========Released under the MLP-2.0 license.