Move macros into the wiki
[geekigeeki.git] / geekigeeki.py
index f906c07c53e638a08e55d9062aa0d10b95cfcbf6..01027ee23b69b7da0a60f32c2925ab4f04dcfb1c 100755 (executable)
@@ -331,7 +331,7 @@ def handle_get(pagename, form):
         else:
             send_httperror("403 Forbidden", pagename)
 
-# Used by macros/WordIndex and macros/TitleIndex
+# Used by sys/macros/WordIndex and sys/macros/TitleIndex
 def make_index_key():
     links = ['<a href="#%s">%s</a>' % (ch, ch) for ch in 'abcdefghijklmnopqrstuvwxyz']
     return '<p style="text-align: center">' + ' | '.join(links) + '</p>'
@@ -415,7 +415,7 @@ class WikiFormatter:
                 return self.kvargs[args[0]]
             macro = globals().get('_macro_' + args[0])
             if not macro:
-                exec(open("macros/" + args[0] + ".py").read(), globals())
+                exec(open("sys/macros/" + args[0] + ".py").read(), globals())
                 macro = globals().get('_macro_' + args[0])
             return macro(*args, **kvargs)
         except Exception, e: