summaryrefslogtreecommitdiff
path: root/examples/simple-config-reader.lua
blob: b1b47195ab512dbc87ea27e0905d29ff033a03de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
-- examples/simple-config-reader.lua
--
-- Simple configuration reader which interrogates only specific keys
--
-- Copyright 2012 Daniel Silverstone <dsilvers@digital-scurf.org>
--

clod = require "clod"

local configuration = [[
project.name "Clod"
project.head "refs/heads/master"
]]

conf = clod.parse(configuration)

print("Project name is", conf.settings["project.name"])
print("Project HEAD is", conf.settings.project.head)