From 3aefec56219486fdf7b6868aa882fa3459853ea7 Mon Sep 17 00:00:00 2001 From: Holger Schurig Date: Mon, 5 Jul 2010 20:19:33 +0200 Subject: [PATCH] webber.py: allow class Directory to read directory.conf files --- in/directory.conf | 1 + in/overview.md | 9 --------- in/plugins/directory.conf | 1 + in/webber.conf | 1 + webber.py | 10 +++++++++- 5 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 in/directory.conf delete mode 100644 in/overview.md create mode 100644 in/plugins/directory.conf diff --git a/in/directory.conf b/in/directory.conf new file mode 100644 index 0000000..8ebf1d2 --- /dev/null +++ b/in/directory.conf @@ -0,0 +1 @@ +category: "Webber" diff --git a/in/overview.md b/in/overview.md deleted file mode 100644 index ffcb759..0000000 --- a/in/overview.md +++ /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 index 0000000..86c7fbe --- /dev/null +++ b/in/plugins/directory.conf @@ -0,0 +1 @@ +category: "Webber plugins" diff --git a/in/webber.conf b/in/webber.conf index e9e3789..ec22135 100644 --- a/in/webber.conf +++ b/in/webber.conf @@ -20,6 +20,7 @@ exclude_dir: [ ] exclude_files: [ "webber.conf", + "directory.conf", "*.tmpl", ] copy_files: [ diff --git a/webber.py b/webber.py index c40fcee..22e1842 100644 --- 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 = {} -- 2.39.2