Re: What's the 'right' way to construct path with wgbwiki.py
Chris G <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Jul 17, 2007 at 03:40:44PM -0400, Will Guaraldi wrote: > On 7/17/07, Chris G <[email protected]> wrote: > > As you know I'm writing a plugin that works with wgbwiki.py. > > > > I have the following values for a sample file when I set the renderer > > to "debug" :- > > > > PATH_INFO -> /wiki/holidays/france2005/part1 > > wikidir -> /home/chris/webdev/info > > pi_bl -> wiki/holidays/france2005/part1 > > > > > > Now the path to the file I'm trying to display is actually:- > > > > /home/chris/webdev/info/holidays/france2005/part1.rst > > > > > > I.e. I need to remove the "wiki" from the front of pi_bl before > > appending it to wikidir to get the full path of the file. Should I > > simply the removing the "wiki" (which is the TRIGGER value in > > wgbwiki.py) or is there a more elegant/straightforward way of doing > > this? > > I'm not really following what you're doing but given the information > you've provided, I'm not sure there's a more elegant/straightforward > way of doing this. > My plugin uses the cb_prepare() callback. When it's called it needs to construct the full path to the file about to be rendered. Thus, if I'm using the wgbwiki.py plugin (which I am), I need to get rid of the TRIGGER part of the PATH_INFO as it's not 'real' as it were. I was just wondering if there is a variable floating around somewhere that just has the "/holidays/france2005/part1" in it. However it's hardly difficult to remove the "/wiki" from the front so it's a perfectly acceptable solution. There's another issue that has arisen related to this though, see my new message. -- Chris Green ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/