aboutsummaryrefslogtreecommitdiffstats
path: root/example.py
diff options
context:
space:
mode:
authorLaurent Bachelier <laurent@bachelier.name>2010-01-05 01:21:14 +0100
committerLaurent Bachelier <laurent@bachelier.name>2010-01-05 01:21:14 +0100
commita65fc04bf7a025e36c64188d142b847154ddf47b (patch)
treebc3b75af9fca0bc2a056f8d6fae853cf5f2d24ee /example.py
parentFirst import (diff)
downloadconfman-a65fc04bf7a025e36c64188d142b847154ddf47b.tar.xz
Support for conditional dotfiles
It executes python code under a limited environment (it is not designed to be secure, it is thought for laziness). Also uses a new "options" attribute.
Diffstat (limited to 'example.py')
-rwxr-xr-xexample.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/example.py b/example.py
index ade298e..913c5ec 100755
--- a/example.py
+++ b/example.py
@@ -2,10 +2,17 @@
from confman import ConfigSource
-c = ConfigSource("~/dotfiles", "/tmp/dotfiles-test")
+options = \
+{
+ 'tags': ['desktop'],
+ 'hostname': 'test',
+}
+
+c = ConfigSource("~/dotfiles", "/tmp/dotfiles-test", None, options)
c.analyze()
c.check()
c.sync()
+print
from pprint import pprint
pprint(c)