wwwoffle-users  

Re: [WWWOFFLE-Users] fetaure idea: allow multiple included files in a section

Andrew M. Bishop
Wed, 01 Mar 2006 22:48:49 -0800

Miernik <[EMAIL PROTECTED]> writes:

> Currently one can only include one file in each section, like this:
> 
> DontGet
> [
> wwwoffle.DontGet.conf
> ]
> 
> 
> It would be very useful, and probably even more simple to implement, to
> allow multiple files to be included, like this:
> 
> DontGet
> [
> wwwoffle.DontGet-ads.conf
> wwwoffle.DontGet-counters.conf
> wwwoffle.DontGet-non_essential_graphics.conf
> ]

Making it possible to include more than one file would be relatively
simple as you say.  The reason that only one include file is allowed
for a section is the configuration editing pages.  If you edit and add
in a new item there is no way to specify which of the files that it
goes in.  Remembering which file is which and allowing the user the
choice of which one to add the new entry to is the difficult part.


> This would ease very much automated changes in configuration with
> scripts, for example if we are at home with boardband we could have a
> script that detects that we have our broadband IP to move
> wwwoffle.DontGet-non_essential_graphics.conf out of the way replacing it
> with an empty file, and run 'wwwoffle -config'. Then when we go on the
> road and have only GPRS, it would reverse the operation. This of course
> is an example of usage if you use WWWOFFLE on a laptop.

There is already a solution to automate changes to the configuration
file and it is distributed with the WWWOFFLE source code.  If you look
in the contrib directory for the file config/wwwoffle-config.pl you
will find a perl script that acts as a pre-processor for WWWOFFLE
config files.  You annotate the options that you want in certain
conditions and the script will enable or disable them for you.

-- 
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop                             [EMAIL PROTECTED]
                                      http://www.gedanken.demon.co.uk/

WWWOFFLE users page:
        http://www.gedanken.demon.co.uk/wwwoffle/version-2.8/user.html