Switching to address based map generation. Divided to subroutines.
[treecutter.git] / treecutter / directory.py
old mode 100755 (executable)
new mode 100644 (file)
index dd8ae44..0c633a7
@@ -1,21 +1,8 @@
 #!/usr/bin/python
 import os
 import fnmatch
-import subprocess
-import amara
-import re
-import tempfile
-import errno
-import time
-import argparse
-import shutil
-import pygraphviz as pgv
-import glob
-import gettext
-import shutil
 from amara import bindery
-from amara.xslt import transform
-from Cheetah.Template import Template
+import treecutter.const as const
 
 class Directory():
     """Class containing the state of the directory with articles"""
@@ -28,7 +15,7 @@ class Directory():
             for filename in filenames:
                 if fnmatch.fnmatch(filename, '*.xml'):
                     file_ = os.path.join(dirname,filename)
-                    doc = bindery.parse(file_, prefixes=PREFIXES)
+                    doc = bindery.parse(file_, prefixes=const.PREFIXES)
                     title = doc.xml_select(u'/db:article/db:info/db:title')
                     menu  = doc.xml_select(u'/db:article/db:info/db:titleabbrev')
                     if title and menu: