[logo] curn Features

Links

java.net Member

Related Links

Products and Sites that use curn

Caching

curn uses an on-disk cache, for several purposes:

  • curn uses the cache to keep track of the last time it retrieved each feed. It then uses that time in an HTTP If-Modified-Since header, to ensure that it doesn't retrieve the XML file if the contents haven't changed.
  • curn also caches information about each retrieved news item, so that it can suppress news items it already displayed during previous runs.

Generalized Plug-in Architecture

As of version 3.0, curn supports plug-ins. curn plug-ins can intercept various phases of curn processing and can enhance or modify curn's behavior. See the Plug-ins section of the curn User's Guide for complete details.

Pluggable Output Handlers

curn's output format is completely configurable. curn uses whatever output handlers are specified in its Configuration file. curn can be configured to email the output from all configured output handlers to a list of email addresses; if so configured, curn attaches each output handler's data as a separate attachment in a multipart/alternative email message. curn comes with several built-in output handlers. See Predefined OutputHandlers, in the curn User's Guide for more details.

Any class that implements the org.clapper.curn.OutputHandler interface can be used as a curn output handler. In addition, curn supports output handlers written in any scripting language supported by the Apache Jakarta Bean Scripting Framework (BSF). See Writing Your Own Output Handler in the curn User's Guide for more details.

Pluggable RSS Parser

By default, curn uses the Rome RSS parser. However, it's a trivial matter to plug in another RSS parser by writing a simple adapter. Writing an adapter is straightforward: You merely extend an abstract class and implement a few interfaces. Then, you specify the main adapter class in curn's configuration file. The curn source code contains one working example of an adapters, for the Rome RSS parser.

Extensive Configuration

curn's configuration file allows the user to control various aspects of curn's behavior. For instance, through the configuration file, the user can:

  • specify whether certain fields (author, dates, etc.) are displayed
  • specify or not HTTP parameters should be stripped from URLs, on a per-feed basis
  • perform a powerful perl-style regular expression substitution on the URLs returned from a feed
  • override a feed's title
  • change the cache time for a feed (or for all feeds)
  • specify a different RSS parser
  • specify the output handlers to use
  • specify one or more regular expression-based editing commands to edit an RSS feed's XML after it's been downloaded, but before it's been parsed. (See the discussion of the PreparseEdit configuration parameter in the curn User's Guide for details.)

and others.

Email Engine

curn contains its own email delivery logic, based on the The Java Mail API. This permits curn to mail its output in any environment. More important, it provides curn with the primitives necessary to combine the output from all its output handlers into a MIME multipart/alternative message.

Copyright

© 2004-2009 Brian M. Clapper

License

This software is released under a BSD-style license.

Copyright © 2004-2009 Brian M. Clapper. All rights reserved.