Re: [Rest2web-develop] Where is "Index for" defined - can I change it?
Brought to you by:
mjfoord
|
From: Michael F. <fuz...@vo...> - 2007-03-09 12:55:54
|
Eur Ing Chris Green wrote:
> Where is the "Index for" that is used in force mode defined? I'd like
> to change it.
>
>
It is in the 'provide_default_index' of the restprocessor.
(restprocessor.py). I should make this configurable. When I have
finished my book...
def provide_default_index(self, filename=None):
"""Provide defaults for a missing index page."""
if filename is None:
page_title = split(self.dir.rstrip('/\\'))[1]
else:
page_title = splitext(split(filename)[1])[0].replace('_', '
').title()
content = self._default_index
restindex = {
'page-title': 'Index for %s' % (page_title
or self._top_level_name),
'format': 'rest'
}
return restindex, content
Fuzzyman
http://www.voidspace.org.uk/python/articles.shtml
|