]> oss.titaniummirror.com Git - webber.git/commitdiff
webber.py: allow class Directory to read directory.conf files
authorHolger Schurig <hs4233@mail.mn-solutions.de>
Mon, 5 Jul 2010 18:19:33 +0000 (20:19 +0200)
committerHolger Schurig <hs4233@mail.mn-solutions.de>
Mon, 5 Jul 2010 18:19:33 +0000 (20:19 +0200)
in/directory.conf [new file with mode: 0644]
in/overview.md [deleted file]
in/plugins/directory.conf [new file with mode: 0644]
in/webber.conf
webber.py

diff --git a/in/directory.conf b/in/directory.conf
new file mode 100644 (file)
index 0000000..8ebf1d2
--- /dev/null
@@ -0,0 +1 @@
+category: "Webber"
diff --git a/in/overview.md b/in/overview.md
deleted file mode 100644 (file)
index ffcb759..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-title: Overview
-parent: Webber
-ctime: 2009-06-24
-hide: true
-
-*Webber* is a static web-site generation tool, loosely based on ideas
-from IkiWiki and my own likings.
-
-TODO
diff --git a/in/plugins/directory.conf b/in/plugins/directory.conf
new file mode 100644 (file)
index 0000000..86c7fbe
--- /dev/null
@@ -0,0 +1 @@
+category: "Webber plugins"
index e9e3789d8f93bf06127f21f75493f25679f33050..ec221355df0b0e9351f4c51105939093556dc34a 100644 (file)
@@ -20,6 +20,7 @@ exclude_dir: [
        ]
 exclude_files: [
        "webber.conf",
+       "directory.conf",
        "*.tmpl",
        ]
 copy_files: [
index c40fcee68226de47127f7d11b3253f92194e468e..22e18428a1c587ef0f9515b7c06c2db51f8dd811 100644 (file)
--- a/webber.py
+++ b/webber.py
@@ -50,7 +50,15 @@ class Directory(Holder):
 
        def __init__(self, **kw):
                Holder.__init__(self, **kw)
-               directories[kw["rel_path"]] = self
+               kw["rel_path"] = self
+               if self.rel_path == "":
+                       self.rel_path = "."
+               directories[self.rel_path] = self
+               try:
+                       self.load(os.path.join(self.abs_path, "directory.conf"))
+                       #print self
+               except IOError:
+                       pass
 
 
 files = {}