Information For Developers Or Advanced Users

The KNewsTicker Handbook
Prev |  |

# Appendix B. Information For Developers Or Advanced Users

KNewsTicker features a currently rather limited but 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 appropriately set.

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.

# B.1. DCOP Reference

So, here's (finally) the complete list of all the DCOP which KNewsTicker provides:

updateNews

  This function forces KNewsTicker to updates 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

reparseConfig

  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/knewstickerrc`

  Example:

       % dcop knewsticker KNewsTicker reparseConfig

setOfflineMode [bool]

  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.

Prev | Home |
Compilation And Installation |  |