Re: [Rest2web-develop] Defaults for some values in sections - enhancement request
Brought to you by:
mjfoord
From: Chris G <cl...@is...> - 2007-04-08 09:08:14
|
On Thu, Apr 05, 2007 at 10:42:05PM +0100, Michael Foord wrote: > Chris G wrote: > > Would it be possible to have default values for a couple of the items > > in the sections:pages:page dictionary please? > > > > If you use --force and a page has no header of any sort then there is > > no link-title or crumb value for the page. Setting them to the file > > name by default would be useful. > > > > I suspect that setting the default restindex page-title might be an > > effective cure for this as well (you have a note in the documentation > > that this would be a good idea). > > > > This sounds like a reasonable request. I'll add it to the list of things > to do with rest2web. :-) > > Presumably the crumb should omit the file extension ? What about the > link-title ? > Yes, I guess they should both be without extension. However I very rarely have files with extensions anyway (it's the 'Unix' way). I have actually written a little pre-processor for r2w.py that creates temporary symbolic links of <filename>.txt for all files that return 'text' in the result in response to "file <filename>". A post-processor then removes all symbolic links which end in .txt afterwards. -- Chris Green |