# fbnews Manual 0.5

## Table of Contents

- 1 Introduction
- 2 How to obtain and install fbnews
  - 2.1 Requirements
  - 2.2 Installing
  - 2.3 Creating a fluxbox menu entry
  - 2.4 Automatically starting fbnews
- 3 Understanding how fbnews works
- 4 Configuration via fbnewsrc
  - 4.1 Specifying rss files
    - 4.1.1 Using scripts instead of rss sources
    - 4.1.2 Categories
    - 4.1.3 Separators
  - 4.2 General configuration
    - 4.2.1 Browser
    - 4.2.2 Sleep
    - 4.2.3 Newsfile
    - 4.2.4 Logfile
    - 4.2.5 Siteformat
    - 4.2.6 Maxlen
- 5 Invoking fbnews
  - 5.1 Options
    - 5.1.1 —once, -1
    - 5.1.2 —dump
    - 5.1.3 –html file
- 6 Copying
- 7 Credits

Next: Getting fbnews, Previous: (dir), Up: (dir) [Contents]

# fbnews

This manual is for fbnews 0.5 Copyright © Frithjof Engel

## 1 Introduction

fbnews is a RSS/RDF news fetcher for fluxbox. It creates a submenu structure in the fluxbox menu and fills it with the content of the RSS sources you specify. You can then read the news items with your favorite browser.

Next: Understanding how fbnews works, Previous: Top, Up: Top [Contents]

## 2 How to obtain and install fbnews

Next: Installing, Previous: Getting fbnews, Up: Getting fbnews [Contents]

### 2.1 Requirements

fbnews requires Python 2.3 and the recent fluxbox devel version. If you want documentation, you need GNU texinfo as well.

Next: Creating a fluxbox menu entry, Previous: Requirements, Up: Getting fbnews [Contents]

### 2.2 Installing

You can download fbnews on its website www.fms-engel.de. Then do:

    tar xzf fbnews-0.4.tar.gz
    cd fbnews-0.4
    su -c "make install"

If this is your first installation of fbnews, copy the example rc file to your personal .fluxbox directory.

    cp fbnewsrc ~/.fluxbox

Next: Automatically starting fbnews, Previous: Installing, Up: Getting fbnews [Contents]

### 2.3 Creating a fluxbox menu entry

For every specified rss file, one submenu in the News menu will be created. The News menu is basically just a fluxbox submenu which must be created manually. Its position in the fluxbox menu file does not matter:

    [submenu] (Apps) {}
        [exec] (Cool program) {cool}
    [end]

    [submenu] (<- News ->) {}             <- This is the newsmenu
        [include] (~/.fluxbox/news)
    [end]

As shown above, the Newsmenu only has to include one file; the file in which fbnews writes the converted rss data. The actual name of the menu (in this case ’<- News ->’ does not matter.

Previous: Creating a fluxbox menu entry, Up: Getting fbnews [Contents]

### 2.4 Automatically starting fbnews

There are several ways to automatically invoke fbnews when starting fluxbox. The most elegant way in the author’s opinion is putting an [startup] entry into .fluxbox/apps. Just add the following line.

    [startup]              {fbnews}

Other ways are using X’s .xinitrc/.Xsession facilities. However, these are not further illustrated here.

Next: Configuration, Previous: Getting fbnews, Up: Top [Contents]

## 3 Understanding how fbnews works

fbnews consists of a small set of Python scripts that parses rss input and converts it into the fluxbox menu format. The normal operation mode is invoking fbnews on fluxbox startup. By default it will then fetch the rss files you have specified and afterwards sleeps for some time until it refetches the rss data. The converted data now reside in a file (default is ~/.fluxbox/news) you can include from your fluxbox menu.

fbnews’ behaviour can be configured in the file ~/.fluxbox/fbnewsrc and by passing command line options. See the following two chapters on how to do this.

Next: Invoking fbnews, Previous: Understanding how fbnews works, Up: Top [Contents]

## 4 Configuration via fbnewsrc

Next: General configuration, Previous: Configuration, Up: Configuration [Contents]

### 4.1 Specifying rss files

In your ~/.fluxbox/fbnewsrc file, you’ll find a line called [Sources]. Below that line you can list the rss files you want to have fetched. An example:

    [Sources]
    http://url.to/rdf
    http://secondurl.com/site.rss

#### 4.1.1 Using scripts instead of rss sources

If the site you want to syndicate does not offer an rss file, you can use scripts that parse the regular HTML code and send the headlines to stdout in rss format. (You’ll find some of these scripts on the author’s webpage)

Such scripts can be used in fbnews:

    [Sources]
    Scripts: ~/scripts/somesite.py

This will execute the script and take the output as rss code.

#### 4.1.2 Categories

Fbnews supports subcategories. To define a category, use the keyword “Cat:” followed by a name:

    [Sources]
    http://someurl.bla/rdf # This resides in the root fbnews menu
    Cat: Computers
    http://acomputersite.com/rss
    Cat: Recreation
    http://thingsiliketodo.com/rdf

This example features two categories, with each one rss file in it: “Computers” and “Recreation”.

#### 4.1.3 Separators

Sometimes it’s useful to visually separate certain site items in the fluxbox menu for better navigation. You can use Separators for this:

    [Sources]
    http://url.to/rdf
    Sep: -- Science --
    http://science.url/rdf

This will insert a Separator between the first and the second URL.

Previous: Specifying rss files, Up: Configuration [Contents]

### 4.2 General configuration

You can control the way fbnews works in the file ~/.fluxbox/fbnewsrc. The syntax is:

    <option>: <value>

#### 4.2.1 Browser

When you click on a menu item, that is, news item, your browser will load the webpage for it. The default is:

    Browser: "startmoz %s"

This will look for a mozilla browser you have installed. When an instance is already running, it will open a new tab for it, otherwise it will start a new instance. Startmoz is actually a utility script that is installed by fbnews to open new tabs in mozilla browsers. Alternatively, you can specify your browser of choice here. %s is the URL that will be passed as an argument.

#### 4.2.2 Sleep

The time in minutes fbnews sleeps after each news fetch. Please set a reasonable high value here to not annoy site administrators. Default is:

    Sleep: 120

#### 4.2.3 Newsfile

The newsfile is the output file for fbnews. This contains the fluxbox menu code for your rss files. You include this file from your main fluxbox menu, as described in the chapter on installation. Default is:

    Newsfile: ~/.fluxbox/news

#### 4.2.4 Logfile

fbnews reports the status of the last fetch here. Default is:

    Logfile: ~/.fluxbox/fbnews.log

#### 4.2.5 Siteformat

By default fbnews uses the site title given in the rss file as its site caption. If you don’t want this, you can define a custom rule for site captions:

    Siteformat: ``%s'' # The default, nothing special

#### 4.2.6 Maxlen

Some sites have an annoyingly long title. This will expand the fluxbox menu beyond useful dimensions. To avoid it you can specify a maximum title length here:

    Maxlen: ``30'' # This will limit site titles to 30 characters

Next: Copying, Previous: Configuration, Up: Top [Contents]

## 5 Invoking fbnews

    Usage: fbnews [options]
    Options:
      -1, --once        Just fetch feeds once, then exit
      -f rcfile,        Use alternative rcfile as fbnewsrc
      --file rcfile
      --dump            Dump output to screen
      --html file       Write html output to file
      -d, --debug       Be verbose on the screen
      -h, --help        Print this screen

### 5.1 Options

#### 5.1.1 —once, -1

Normally fbnews runs as a daemon. To suppress this, use this option. Fbnews will fetch the rss data and then quit.

#### 5.1.2 —dump

Write the converted rss data to screen instead of writing it to a file (normally ~/.fluxbox/news).

#### 5.1.3 –html file

Fbnews writes html output to file. Note that normal output to fluxbox news file will NOT happen if you specify this option.

Next: Credits, Previous: Invoking fbnews, Up: Top [Contents]

## 6 Copying

Both fbnews and this manual can be distributed under the terms of the GNU General Public License. See file COPYING that came with this distribution.

Previous: Copying, Up: Top [Contents]

## 7 Credits

fbnews was written by Frithjof Engel frithjof_engel@users.sf.net. Others have helped in one way or another. Take a look at the file “THANKS” that came with this software.

fbnews is postcard-ware. If you like it, please consider sending the author a postcard. That always makes his day.

    Frithjof Engel
    Goetenkamp 26
    22927 Grosshansdorf
    Germany