Newsbruiser Configuration

Leonard Richardson <leonardr@segfault.org>
Version: 1.4.1

NewsBruiser uses two types of configuration files: an installation configuration file (sometimes called a ".nbrc", even though that may not be the filename you chose), and a notebook configuration file. The former is installed in the location you specified when running setup.py. You need to change your isntallation configuration file if you want to add or delete notebooks from your NewsBruiser installation, or change passwords.

NewsBruiser also creates a notebook configuration file for each notebook. You should never have to look at it or edit it directly; instead, you should administer it through configure.cgi. The vast majority of NewsBruiser's configuration options are settable through configure.cgi, and once you get a NewsBruiser installation up and running, you will do almost all configuration through that interface. The configure.cgi options are described in detail on the CGI itself, so they are not discussed here.

In addition, there is a file called "config.location" which setup.py writes to the directory containing your NewsBruiser installation. It contains only the path to your installation configuration file. You only need to change it if you change the location of your installation configuration file.

A note on upgrading

If you've used a version of NewsBruiser previous to 1.4.0, then when you hit a page for a notebook, NewsBruiser will automatically write the notebook-specific configuration file for that notebook. You can then go through your .nbrc and clean out everything for that notebook except for working-dir, password, and ordinal. You can trigger this action for all notebooks at once by hitting index.cgi, and then clean out your entire .nbrc.


Installation configuration file (.nbrc)

Your installation configuration file contains the list of and configuration for the notebooks you want to run. You probably only need one notebook if you're just using NewsBruiser to run your weblog. An example installation configuration file is provided.

The installation configuration file has an optional DEFAULT section and one or more notebook sections. The value of a key in the DEFAULT section will be used for all notebooks except for notebooks which override that key. You should specify working-dir in the DEFAULT section, and possibly password.

There are three valid installation configuration file variables:

working-dir

The directory in which this notebook's entries will be stored. Must be writable by the webserver. It's a good idea to specify this in the DEFAULT section rather than separately for every notebook. You must specify this variable.

password

The encrypted password for this notebook. You can turn your plaintext password into an encrypted value for password by running the encrypt.py script found in tool/ (or any other program which does the same thing). You don't have to specify this variable, but if you don't then anyone can write to your notebook (which might be your intention).

ordinal

A somewhat hacky variable, used to determine the order in which notebooks are shown in lists. This is neccessary because ConfigParser scrambles the order of the notebooks as found in the configuration file. The default is 0, so if you only have one notebook you don't need to specify a value for this variable. Every notebook must have a unique ordinal, values of ordinal must start with 0, and there must not be any gaps in the values of ordinal (so if you have notebooks with ordinals 1 and 3, you must also have one with ordinal 2).


cfg.py

Previous versions of NewsBruiser required that you change the Python file cfg.py. In almost all cases you will not need to do this anymore. The only entry in cfg.py you might need to change is baseURL.

NewsBruiser tries to guess baseURL, and it almost always guesses correctly, but if it doesn't then you need to set it straight by changing cfg.py. It should be set to the relative URL to the directory in which you've installed NewsBruiser. For instance, if your webserver root is /home/httpd and you've put NewsBruiser in /home/httpd/cgi-bin/newsbruiser/, then your baseURL is "/cgi-bin/newsbruiser/".

If you change the names of the CGIs used for view/add/edit/search, you'll also need to change the corresponding cfg.py variables so that generated links will point to the right places.


Back to the main documentation