Kopete Away Message Updater

Various KDE Stuff

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

0
Score 50.0%
Description:

Call this script from the Autostart folder, and it will update Kopete's away message for each interval (requires Kopete 0.12 or higher). The away messages are by default defined in ~/.kopete-away-msgs . Each line can contain either:

- a comment (starting with a #)
- flags message

The flags define some properties to each away message. Flags are defined
only at the start of the line, beginning and ending with a %. The following
flags are supported.

[0-9]*[smhd] Determines how long this message should be shown before a
new one is chosen. This is the sleep(1) syntax.
a Only show this message when you're away.
c This line is a command, use it's output as away message.
f Fortune mode. Picks a random line from a file and displays it.
i Show the contents of a file, line by line. The message should
contain the path to the file. Do not use ~ but use /home/$USER instead.
Empty lines in the included file are skipped.
n Use the next message in the file for the next iteration.
o Only show this message when you're online.
x Don't use this message when looking for a random message. This
means this line is only accessible when the former line contains
the n flag.
- Show the message less than normal times
-- Show the message even more less
--- Show the message sometimes


Example ~/.kopete-away-msgs file:
========================================================================

# Sometimes, show uptime for one minute
%1mc--% uptime

# Fortune rocks, but don't pick too long messages (the length of away
# messages is limited).
%2mc% fortune -s -n 120

# just show Hello world for the default interval
Hello world

# Show a away message for 60 seconds.
%a60% I'm away now.

# Ask people to say something when you're online
%o% Please message me!

# Show all contents of the Linux README line by line. Show each line for
# 3 seconds.
%3i% /usr/src/linux/README

# Tell a little story when I'm away. These lines must emerge in the
# right order, so mind the n and x flags! The x flags make sure we don't
# start in the middle of the story. And, show each line for about 5
# seconds.
%na5% Goodbye, all you people,
%nax5% There's nothing you can say
%nax5% To make me change my mind.
%ax5% Goodbye.

========================================================================


There are two ways of determining your online status:

1) Patched Kopete (direct status check)
Apply the patch in KDE Bug 117962
(http://bugs.kde.org/attachment.cgi?id=18979&action=view) to the Kopete source
in the KDE 3.5 branch. This will add DCOP calls used by this script to
directly query your online status.

2) Webstatus Plugin (indirect status check)
To determine your online status, you need to have the Web Presence plugin
enabled. By default, it reads the file ~/.webstatus.xml. Adapt the variable
below if you store the file somewhere else. The script won't do anything when
you're offline or partially away (that is, some protocols are Away, some
protocols are Online).
Because the web status plugin is used, the process of retrieving the current
webstatus is not really reliable. It may happen that you turn back to online
when you set the status on Away in a short time. If this doesn't happen in
about 10 seconds after the status change, you may consider the status change
as successful.
Last changelog:

12 years ago

o Ability to query the online/away status directly from Kopete (DCOP). This requires a patched Kopete, see the description for more details on how to proceed.
o Fortune mode: Pick a random line from a given text file.
o First check the online/away status to prevent unnecessary command calls.
o Various bugfixes

Be the first to comment

12 years ago

o Ability to query the online/away status directly from Kopete (DCOP). This requires a patched Kopete, see the description for more details on how to proceed.
o Fortune mode: Pick a random line from a given text file.
o First check the online/away status to prevent unnecessary command calls.
o Various bugfixes

12345678910
product-maker Base: 4 x 5.0 Ratings
Be the first to comment
File (click to download) Version Description PackagetypeArchitecture Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
0.2
updated Jan 14 2007
added Jul 21 2006
downloads 24h
0
mediaviews 24h 0
pageviews 24h 2