Reviewer: Jonathan Singer
Copyright © 2001, 2002 Frerich Raabe
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
KNewsTicker is a news ticker applet for the KDE panel (also known as Kicker).
Table of Contents
KNewsTicker is an applet for the KDE panel (also known as Kicker) which provides an easy and convenient way to access the news as reported by many news sites (such as Slashdot, Linux Weekly News or Freshmeat).
To achieve this, KNewsTicker requires the news sites to provide a special RSS file, which contains the headlines as well as pointers to the corresponding full articles. Such files are very common these days, and KNewsTicker already comes with a selection of good news sources which provide such files.
RSS files are becoming more and more popular these days, and this applet is not the first application which takes advantage of them. But what are RSS files? This section tries to give a brief answer to this question, as well as pointers to other sources for further reference.
The short answer: RSS is a XML-based format for syndicating web contact.
RSS is often used as an acronym for “Rich Site Summary” - that's not a common definition but it gives an idea on what the creators of RSS had in mind. There is no consensus on what RSS stands for, so it's actually not an acronym, it's a name.
RSS originated in 1999 and was invented by NetScape as a syndication format for their my.netscape.com website; this very first RSS release was version 0.9. A few months after that, Netscape introduced RSS version 0.91, which incooperated many features of the “<scriptingNews>” format.
The basic concept of all RSS files is to provide a clean, simple and portable way to distribute web content, in particular news: the news sites provide a RSS file which basically contains a set of records, and each record consists of a headline and an URL which points to the complete article. The RSS file also contains other general information about the particular news site, such as it's name and the homepage, which is evaluated by KNewsTicker.
Nowadays there are a few additional, more sophisticated versions of the RSS format (0.91, 0.92, 0.93, 1.0 and the current format version 2.0) but the first two versions still make up about 85% of the files provided on the web. Nevertheless, all versions up to 2.0 can be processed with KNewsTicker!
Of course, this is only a short and highly incomplete attempt at explaining the basic ideas behind RSS files. If you're interested in this topic, you might want to visit any of the following links which point to further and more complete sources on this:
A very pragmatic introduction to the RSS format, with concrete examples and guidelines. Together with the authoritative specifications, this makes a good guid for people who think about providing a RSS newsfeed on their home page.
The RSS page from O'Reilly features a lot of general articles about employing and using RSS files, up to date news about the RSS development community as well as vital information for web developers who are considering taking advantage of RSS.
This page is another excellent source of news about the RSS development, which is especially interesting to developers working with RSS-based technology.
The authoratative source about RDF, an XML-based language from which modern RSS versions are derived, published by the World Wide Web Consortium. It features a comprehensive list of links to other sites on the topic as well as a timeline of the RDF development, an overview over the architecture, an archive with articles about RDF as well as a carefully assembled list of tools for developers who intend to work with RDF.
Developers will also want to check the authoritative specifications for the various RSS versions:
RSS Specifications
Version 0.90: http://www.purplepages.ie/rss/netscape/rss0.90.html
Version 0.91: http://backend.userland.com/rss091
Version 0.92: http://backend.userland.com/rss092
Version 0.93: http://backend.userland.com/rss093
Version 1.0: http://web.resource.org/rss/1.0/
Version 2.0: http://backend.userland.com/rss
If you find any other sites or documents on this topic, and think they're worth being mentioned here, don't hesitate to send them to Frerich Raabe <raabe@kde.org> so that they can be included in this document and help everybody.
Thank you very much!
KNewsTicker is started like every other Kicker applet. You just have to add it to the panel (or any child panel of the main one). To do so, just richt-click on the KDE panel and choose Add->Applet->KNewsTicker.
Another good way to use KNewsTicker is to put it into its own child panel. Just add a new child panel by choosing Add->Extension->Child Panel from the panel menu;. Now you can simply right-click on the child panel and select KNewsTicker as described above.
A third, popular, way to run KNewsTicker is by selecting Internet->KNewsTicker (News Ticker) from the K menu. This will start KNewsTicker and make it run in it's own window which you can then resize and move around as you wish.
You can access KNewsTicker's configuration dialog by right-clicking
onto the scroll text, or by clicking on the button with the arrow on it and
choosing the entry labelled Preferences in the menu.
Here you can define how fast the text should be scrolled around, what it should look like as well as other options for the applet. Here is a brief info on what each of the switches and buttons on this tab does:
This slider allows you to define how fast/slow the text should be scrolled when using the mousewheel.
Here you can define in what intervals KNewsTicker queries the configured news sources for new headlines. This depends generally on how fast you'd like to hear about news and how much load you want to put on the network:
A lower value (lower than 15 minutes) enables you to be notified about news very quickly if you want or need to. Please note, that it increases the network traffic significantly, though. Therefore, such low values shouldn't be used if you query popular news sites (such as Slashdot or Freshmeat) as they have generally already enough work with processing the incoming queries.
A higher value (higher than 45 minutes) won't make you hear about news that quick. For non-timecritical applications, it should be suitable, though. The positive aspect of longer intervals is that only very little load is put on the network; this saves resources and nerves, for you and the system administrators of the news sites you query.
The default value (30 minutes) should be appropriate and reasonable in most cases.
Check this box to make the news ticker use the names you specified in the list of news sources (available on the tab labeled News sources) instead of the ones the news sites themselves report. This can be handy for news sites which report a very long or useless name.
Check this box to make KNewsTicker slow the scrolling down when you move the mouse cursor over the scrolling text. This makes clicking on items and dragging away the icons (if enabled) a lot easier.
On this tab you can manage and maintain the list of news sites KNewsTicker queries for news. Click on any entry with the right mouse button to open a context menu which lets you remove the current entry, or add a new entry. At the bottom of the page you can also find three buttons which have the same effect.
If you have started, KNewsTicker, you can play around with the settings now. Pressing Apply makes KNewsTicker use the new settings immediately, you don't have to restart it.
There are four ways to add a new news site to the list:
You can click on the button at the bottom labeled Add....
You can click with the right mouse button on the table and choose Add news source.
You can drag any RSS file from another application (such as Konqueror) onto the table. This adds a new entry to the list, sets the name to “Unknown” and sets the maximum number of articles to 10.
And finally, you can just click on any RSS file in the Konqueror filemanager to have it added to the list immediately.
Either way will cause the News site dialog to show up, presenting you with a form to enter the properties of the news site to add.
There are two ways to adjust the properties of an existing news site:
You can click on the button at the bottom labeled Modify....
You can right-click with the right mouse button on the news site you'd like to edit and choose Modify '...' from the menu.
No matter which way you chose, it will cause the News site dialog to pop up, showing the properties of the selected news site.
Of course, you want to remove a news source from the list sometimes. To do this, you can either
You can click on the button at the bottom labeled Remove.
You can right-click with the right mouse button on the news site you'd like to edit and choose Remove '...' from the menu.
In both cases, a confirmation box will pop up and make sure you didn't select the wrong entry.
You can also remove multiple news sites at once by holding Ctrl while clicking on the entries you 'd like to remove, or by clicking the left mousebutton and dragging the mouse over all the entries you'd like to select.
When adding or modifying a news site, the news site dialog (shown above) pops up and provides input facilities to edit the various properties of a news site:
This is the name of the news source.
This text will only be used if Use custom names for news sites on the tab labeled General is activated.
Here you can set the URL which references the RSS file of this news site; this can either be a local file, or a file saved on a remote server. You can also click on the button at the right to open a convenient file-selection dialog and browse to the file you would like to use, instead of typing the URL by hand.
If this file is checked, KNewsTicker will not assume that the URL (which was specified in the Source file field) references a RSS file, but rather that the URL refers a program (usually a script). When querying this news site, KNewsTicker will execute the program and treat whatever the program prints to stdout as RSS markup. This is very convenient for conversion scripts which download a HTML file and process it, producing RSS markup which is suitable for use with KNewsTicker.
You can find some scripts which e.g. download stock data in the kdeaddons module, in the knewsticker-scripts directory.
Here you can specify into which category the news site belongs. Arranging the news sites into categories makes it much easier to maintain large lists of news sites.
This option lets you define how many articles KNewsTicker will cache for this news site; the value will never be exceeded.
This is particularly handy for news sites which provide only three news items at once, but you'd like to see the last ten items (for instance); KNewsTicker will always download the three items and merge it into it's list, caching the last seven items.
Here you can specify an URL to an image file (preferably 16x16 pixels in size) which should be used for this news site. Icons make it much easier to distinguish multiple news sites, and see which news site a headline appeared on as it scrolls by in KNewsTicker.
At the button you will find the usual buttons, one of them deserves an extra note: clicking on the Suggest button will make KNewsTicker try to guess suitable values for most of the fields if you specify an URL to a valid source file.
This means that you can usually just paste an URL to an RSS file in the input field labeled Source file, press the Suggest button and then modify the suggested values as needed.
This tab allows you to define various filters which should be applied before showing the headlines in the scroll text.
These filters only affect the headlines which are shown in the scrolltext, the menu will always show all of the headlines.
The major part of the tab is occupied by a table which lists the currently configured filters. Each filter has a small checkable box - checking that box enables the filter, unchecking it temporarily disables it without removing it from the list.
By default there are no filters, so chances are that the table is completely empty for you. Of course, this dialog provides you with ways to add new filters, and manage them in general:
To add a filter, simply enter the filter properties (see Filter Components for a detailed description of the various filter properties) using the input fields in the box labeled Filter properties and then press the button labeled Add.
To modify an existing filter, select the filter you would like to edit in the table by left-clicking on it and then change it's properties in the box at the bottom.
To remove a filter, select it in the table and then press the button labeled Remove.
Each filter consists of four components:
Filter Components
Action - this can be either Show or Hide and defines what should happen to a headline in case this filter matches.
News sources - here you can define whether the filter affects only single news sources, or whether this filter should be applied to the headlines of all news sources.
Condition - this is a verb which defines, together with the Expression, whether a filter matches. A condition can be e.g. contains, doesn't equal or matches. See below for a more detailed description.
Expression - this is a user-defined string which forms the body of the filter, together with the Condition. See below for a more detailed description of this component.
All these components can be configured using the facilities in the frame labeled Filter properties. The possible states of the Condition component deserve a special explanation:
contain, doesn't contain: this filter matches if the headline contains / doesn't contain the specified expression.
The expression isn't treated case-sensitive, so the expressions “KDE”, “kDE” or “kde” will all match headlines which contain “KDE”.
equals, doesn't equal: this filter matches if the headline equlas / doesn't equal the specified expression.
The expression is treated case-sensitive, so of the expressions “Linux”, “linux” or “LINUX”, only the first will match “Linux”.
matches: using this condition will make KNewsTicker treat the given expression as a “regular expression”. For further information on regular expressions you might want to read this article which was published at www.evolt.org.
This tab lets you define various options which affect KNewsTicker's scroll text:
This slider lets you define how fast the scrolltext should be scrolling. If you have rather little space on your taskbar (and therefore a rather small news ticker), you should probably set this to a lower value so that you have a chance to read the headlines. For wider news tickers (and better eyes), a faster text is probably appropriate so that you have to wait for the next headline only as little as possible.
These options allow you to define in what direction the text should be scrolled, e.g. to the left or to the right, upwards or downwards. You can also rotate the text by 90 or 270 degrees here, which is not exactly readable but it makes sense for vertically aligned panels.
Click on the button at the right labeled Choose Font... to choose the font which will be used for the scrolling text.
Certain fonts are harder to read that others, especially when they're used for a scrolltext, so you should probably choose a font which can even easily be read if it's moving.
Click this button open a convenient color-selection dialog which lets you choose the color which will be used for the foreground of the scrolling text (e.g. the color of the text itself).
Click this button to open a convenient color-selection dialog which lets you choose the color which will be used for the background of the scrolling text.
Click this button to open a convenient color-selection dialog which lets you choose the color which will be used for the color of the headlines when they are highlighted (when you move the mouse over them).
Check this button to make the scrolltext show just the most recent headline for each news site, instead of showing every headline available from every news site.
Check this box to avoid that ugly break and the end of the scrolling (when all the headlines have appeared once). If endless scrolling is enabled and the last headline has been shown, KNewsTicker will attach the first headline to the end of the scrolling text.
Checking this box will make KNewsTicker show an icon (if available) in front of each headline which is scrolled along; this makes determining which news site provided each headline much easier.
Check this box to have the currently highlighted headline (e.g. the headline which is currently under the mouse cursor) underlined.
Using KNewsTicker is fairly straightforward and should give you no big problems, assuming that you have already configured KNewsTicker. No matter whether you are running KNewsTicker in the main panel, in its own child panel or in its own window, it appears as an area with a scrolling text and a button with a small arrow next to it.
The area (it is white per default, but you can change the background color easily using the preferences dialog) with the scrolling text in it is called the “news scroller”. It keeps scrolling the downloaded headlines (or just the most recent headlines) continuously and provides easy access to the articles. If you see an interesting article, just click on it to open the Konqueror web browser, showing the full article which belongs to the headline you clicked on. If you feel that a possibly interesting headline just scrolled out of view, you have some ways to influence the scrolling:
You can click on the news scroller with the left mouse button and move the mouse around (while holding the left mouse button pressed down). The news scroller will continue scrolling as usual if you release the left mouse button again.
If you own a so-called “wheel mouse”, you can use the wheel on your mouse to scroll the headlines back and forth.
There's also a very powerful context menu, which you can access either by clicking on the news scroller with the right mouse button, or by clicking on the arrow button with the left button. This context menu is the most interesting part of the applet, as it contains about all the functionality.
The context menu is basically split into two functional parts:
The upper part shows a list of entries, each entry having a small icon like
this next to it. This list represents
the list of currently configured news sites. You can click on any of the news
sources to open another menu which contains a listing of headlines which are
available for that particular news site as well as an entry labeled
Check news to
refresh the headline list for this news site. Each of the headlines has an
icon next to it indicating that that you
have read that article already or the
if it is still
unread.
The lower part shows currently five entries (explaining from top to bottom):
This entry has a little next to it. If you want to force KNewsTicker
to check the configured news sites for new articles, you can click
here.
This does not reset the internal timer which queries the news sites for new headlines automatically in certain intervals.
This entry in the context menu has no icon associated to it. Click this button to enable a special “offline mode” which pauses the internal timer for querying the news sites and prevents any automatic download of new headlines. The offline mode comes in handy if you have to leave your computer for a while during which the system isn't connected to the Internet, as it saves you from all the error messages which pop up if any of the news sites couldn't be connected.
You can still force a reload for single news sites as
well as for all the news sites by selecting the respective
Check news entry.
This entry is marked with a small . Clicking on this entry opens
the KNewsTicker documentation (which you're reading in this
moment) which details all the features and abilities of
KNewsTicker.
This entry is marked with a small . Clicking on this entry opens
a small dialog showing who's to blame for KNewsTicker and credits
people who contributed significant enhancements for
KNewsTicker.
This entry is easily recognizable due to the icon which is next to it. Select
this entry to open the preferences
dialog which lets you customize all of the properties of
KNewsTicker
5.1. | Where do I find the RSS file for the news site XYZ? |
It's possible that the news site you're referring to doesn't provide any RSS file at all! You might want to check http://www.webreference.com/services/news for a more or less comprehensive list of sites on the web which provide a RSS file. Other good resources are http://www.xmltree.com, and http://www.newsisfree.com, where you can find hundreds of RDF and RSS files, sorted by language and/or topic. If you found any interesting news sites which provide such a backend, don't hesitate to send them to Frerich Raabe <raabe@kde.org> so that they can be included in future releases. Thank you! |
KNewsTicker
Program copyright 2000, 2001, 2002 Frerich Raabe <raabe@kde.org>
Contributors:
Malte Starostik <malte.starostik@t-online.de>
Wilco Greven <greven@linux.org>
Adriaan de Groot <adrig@sci.kun.nl>
Documentation copyright 2001, 2002 Frerich Raabe <raabe@kde.org>
This documentation is licensed under the terms of the GNU Free Documentation License.
This program is licensed under the terms of the BSD License.
This chapter is intended to explain the various acronyms which have been used throughout the KNewsTicker documentation. If you feel any acronyms or terms are missing here, please don't hesitate to send an email to Frerich Raabe <raabe@kde.org> so that they can be added. Thank you!
Resource Description Framework. A language derived from XML which describes metadata. Commonly used as a backend format for articles and other publications. For more detailed information on RDF files, you might want to go directly to the official page on RDF files at the World Wide Web Consortium.
The RDF Site Summary is actually an extension to the RDF language. Quoting the official RSS v1.0 specification:
“RDF Site Summary (RSS) is a lightweight multipurpose extensible metadata description and syndication format. RSS is an XML application, conforms to the W3C's RDF specification and is extensible via XML-namespace and/or RDF based modularization.”
The Extensible Markup Language is the “universal format for structured documents and data on the Web”. It's a derivate of SGML which fits the need of the world wide web. You might want to check the the Extensible Markup Language page at the World Wide Web Consortium for further information.
An abbreviation for “World Wide Web Consortium”. Quoting the official homepage of the W3C, “the World Wide Web Consortium (W3C) develops interoperable technologies (specifications, guidelines, software, and tools) to lead the Web to its full potential as a forum for information, commerce, communication, and collective understanding”
URL stands for “Uniform Resource Locator”, a specially formatted string which can reference resources like images, documents and other things on the Internet. Please refer to the corresponding webpage for more detailed information on this topic.
The Desktop COmmunication Protocol is a way for applications to communicate to each other. For instance, KNewsTicker's configuration dialog uses DCOP to tell the applet itself about the current configuration.
KNewsTicker provides an extensive DCOP interface, which makes it possible to control many of KNewsTicker's functions from the commandline, script.
For more detailled information on DCOP you might want to visit http://developer.kde.org/documentation/library/2.0-api/dcop/HOWTO.html for a complete explanation.
KNewsTicker features a currently rather extensive, and steadily growing DCOP interface. This is not only used to communicate with other applications, it makes it possible to control KNewsTicker with a shellscript as well. The more the interface is extended, the more useful it will become and the more flexible KNewsTicker will be controllable from a script.
To use these DCOP functions you can either use the dcop commandline program or use the more convenient KDCOP application. Both provide the same functionality so it's actually just a matter of taste which program you prefer. :-)
This chapter assumes that you're using the commandline program dcop. To access KNewsTicker's DCOP functions make sure that KNewsTicker is started and then just enter something like this at the console:
% dcop knewsticker KNewsTicker [function]
If an error appears that tells you that dcop couldn't be found or executed, please check whether the file dcop exists in $KDEDIR/bin and make sure it's permissions are set appropriately.
In that command line, just replace “[function]” with the respective function name, i.e. type
% dcop knewsticker KNewsTicker updateNews
to make KNewsTicker check for new news and download them if neccessary.
In this section, all methods which are accessible via KNewsTicker's DCOP interface are listed.
This function forces KNewsTicker to update the internal list of articles (e.g. it queries the list of news sources which has been configured for new news) and downloads them when neccessary.
This also works if KNewsTicker is currently in offline mode.
Example:
% dcop knewsticker KNewsTicker updateNews
The reparseConfig command makes KNewsTicker reload it's configuration from the configuration file. This function is used by the configuration dialog to talk to KNewsTicker but you can use it in case you modified the configuration file by hand.
The configuration file is saved in ~/.kde/share/config/knewsticker_appletrc
Example:
% dcop knewsticker KNewsTicker reparseConfig
You can call this function to define whether KNewsTicker is currently in the offline mode (e.g. whether KNewsTicker should query the configured news sites for new news).
Example:
% dcop knewsticker KNewsTicker setOfflineMode true
to enable the offline mode, or type
% dcop knewsticker KNewsTicker setOfflineMode false
to disable offline mode.
Returns the currently configured news query interval in minutes.
Example:
% dcop knewsticker KNewsTicker interval 30 %
Returns the currently configured scrolling speed. The interval in which the text is scrolled one pixel is returned in milliseconds.
Example:
% dcop knewsticker KNewsTicker scrollingSpeed 100 %
Returns the number of pixels the scrolltext gets shifted per mousewheel step.
Example:
% dcop knewsticker KNewsTicker mouseWheelSpeed 15 %
Returns an integer which corresponds to the direction the scrolltext is scrolling in:
1 = To the left
2 = To the right
3 = Upwards
4 = Downwards
5 = Upwards, rotated
6 = Downwards, rotated
Example:
% dcop knewsticker KNewsTicker scrollingDirection 1 %
Returns either 'true' or 'false', depending on whether KNewsTicker uses custom names for the news sites.
Example:
% dcop knewsticker KNewsTicker customNames false %
Returns either 'true' or 'false', depending on whether KNewsTicker has the endless scrolling option enabled.
Example:
% dcop knewsticker KNewsTicker endlessScrolling true %
Returns either 'true' or 'false', depending on whether KNewsTicker currently only scrolls the most recent headlines for each news site.
Example:
% dcop knewsticker KNewsTicker scrollMostRecentOnly false %
Returns either 'true' or 'false', depending on whether KNewsTicker is currently in offline mode.
Example:
% dcop knewsticker KNewsTicker offlineMode false %
Returns either 'true' or 'false', depending on whether KNewsTicker was told to underline the headline which is currently below the mouse cursor.
Example:
% dcop knewsticker KNewsTicker underlineHighlighted true %
Returns either 'true' or 'false', depending on whether KNewsTicker currently shows the icon of the news site each particular headline was published at in front of the headline.
Example:
% dcop knewsticker KNewsTicker showIcons true %
Returns either 'true' or 'false', depending on whether KNewsTicker has the “slowed scrolling” feature activated.
Example:
% dcop knewsticker KNewsTicker slowedScrolling false %
Returns the currently configured foreground color as a string in the format “#rrggbb”, where “rr”, “gg” and “bb” are two-digit hexadecimal values representing the intensity of the red, green and blue components in a scale of 00-ff.
Example:
% dcop knewsticker KNewsTicker foregroundColor #804000 %
Returns the currently configured background color as a string in the format “#rrggbb”, where “rr”, “gg” and “bb” are two-digit hexadecimal values representing the intensity of the red, green and blue components in a scale of 00-ff.
Example:
% dcop knewsticker KNewsTicker backgroundColor #0030ff %
Returns the currently configured highlight color as a string in the format “#rrggbb”, where “rr”, “gg” and “bb” are two-digit hexadecimal values representing the intensity of the red, green and blue components in a scale of 00-ff.
Example:
% dcop knewsticker KNewsTicker highlightedColor #000080 %
Returns the list of currently registered news sources. Note that this does return all news sources, not just the selected ones. In the output, each news source name will be printed on a line.
Example:
% dcop knewsticker KNewsTicker newsSources Freshmeat GNOME News dot.kde.org Slashdot.org %