From 1adff0f057992cccfa68bd558b98c083b1ad18b4 Mon Sep 17 00:00:00 2001 From: hpk Date: Wed, 14 Feb 2007 03:29:11 +0100 Subject: [PATCH] [svn r38781] the target docpath needs to be determined per project --HG-- branch : trunk --- py/doc/confrest.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/py/doc/confrest.py b/py/doc/confrest.py index bfd9d6fee..cd8201756 100644 --- a/py/doc/confrest.py +++ b/py/doc/confrest.py @@ -4,7 +4,6 @@ from py.__.misc.difftime import worded_time from py.__.doc.conftest import get_apigenpath, get_docpath from py.__.apigen.linker import relpath -mydir = py.magic.autopath().dirpath() html = py.xml.html class Page(object): @@ -107,6 +106,7 @@ def getrealname(username): class Project: + mydir = py.magic.autopath().dirpath() # string for url, path for local file stylesheet = mydir.join('style.css') title = "py lib" @@ -123,11 +123,14 @@ class Project: def get_content(self, txtpath, encoding): return unicode(txtpath.read(), encoding) + def get_docpath(self): + return get_docpath() + def process(self, txtpath): encoding = self.encoding content = self.get_content(txtpath, encoding) - docpath = get_docpath() - reloutputpath = txtpath.new(ext='.html').relto(mydir) + docpath = self.get_docpath() + reloutputpath = txtpath.new(ext='.html').relto(self.mydir) outputpath = docpath.join(reloutputpath) stylesheet = self.stylesheet