Refactoring, using const, removing global variables, passing some new arguments.
[treecutter.git] / treecutter / main.py
index bbde87083269b17ca9e14fff10dfa99a96e25871..ba09eaf801d080d523ade9dcbc640f24d1675f51 100644 (file)
@@ -12,13 +12,6 @@ parser.add_argument('--output', nargs='?',
                     default=os.path.dirname(os.getcwd())+'/htdocs/')
 args = parser.parse_args()
 
-style_xslt = args.style+"docbook.xsl"
-outputdir = args.output
-
-tmptarget = tempfile.mkdtemp()+'/'
-
-MAXLEVEL = 10000
-
 ts = time.time()
 dir_ = Directory()
 sitemap = Sitemap()
@@ -38,10 +31,10 @@ if len(missing)+len(removed) != 0:
     sitemap.write_map()
 sitemap.graph()
 
-sitemap.process()
+sitemap.process(args.style)
 
 t1 = time.time()
-sitemap.publish()
+sitemap.publish(args.output,args.style)
 t2 = time.time()
 print "Publish  [%5.2f s]" % (round(t2-t1,2))
 print "Total    [%5.2f s]" % (round(t2-ts,2))