Next: Getting fbnews, Previous: (dir), Up: (dir) [Contents]
This manual is for fbnews 0.5 Copyright © Frithjof Engel
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.
• Getting fbnews: | ||
• Understanding how fbnews works: | ||
• Configuration: | ||
• Invoking fbnews: | ||
• Copying: | ||
• Credits: |
Next: Understanding how fbnews works, Previous: Top, Up: Top [Contents]
• Requirements: | ||
• Installing: | ||
• Creating a fluxbox menu entry: | ||
• Automatically starting fbnews: |
Next: Installing, Previous: Getting fbnews, Up: Getting fbnews [Contents]
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]
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]
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]
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]
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]
• Specifying rss files: | ||
• General configuration: |
Next: General configuration, Previous: Configuration, Up: Configuration [Contents]
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
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.
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”.
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]
You can control the way fbnews works in the file ~/.fluxbox/fbnewsrc. The syntax is:
<option>: <value>
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.
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
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
fbnews reports the status of the last fetch here. Default is:
Logfile: ~/.fluxbox/fbnews.log
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
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]
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
Normally fbnews runs as a daemon. To suppress this, use this option. Fbnews will fetch the rss data and then quit.
Write the converted rss data to screen instead of writing it to a file (normally ~/.fluxbox/news).
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]
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.
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