
For several weeks now we have been using the wave to organize the work of a small such freelance team. And everything would be good in general, but in order to be able to respond quickly to new tasks or bug reports, it was necessary not only to keep the wave interface open, so also to pay attention to it periodically. And this is not always possible even when you just read some nonsense, not to mention the state “buried in the work of the ears.”
I also added the discovery that I, firstly, work on a netbook - for script programming it is enough, of course, but the less heavy applications are running on it, the better :), and secondly, I don’t use Firefox, More recently
AddOn was released, reporting on updated waves.
From this add-on, I started to dance, vaguely hoping that its developer got somewhere some api, with which you can easily get information about the number of unread updates.
')
When I disassembled the addon into pieces, it turned out that, unfortunately, there was used in fact a rather brutal way, which I myself thought of when I was just thinking about writing a notifier - we just log in, get the web interface code, and parse json'ovsky an object that stores a bunch of different information, including the number of unread updates of blips.
So I spent some amount of time and made Python's script player doing almost the same thing - with a certain interval it shows a
system pop-up message with the number and names of the updated waves.
“Out of the box” it will probably run only under ubuntu with gnome , simply because it uses
notify-send (which I recently found out about, rereading old topics on Habré, thanks, brain2xml :) for outputting messages
) .
upd: According to
xdemon , it works in kde4, archlinux. So, apparently, the design is not quite intolerable :)
But I think that it will not be a particular problem for those who want to rewrite the script for their system and their favorite way of communication, especially since the output code of the notification is specially
(a cunning plan) put into a separate function.
So, put the notifier:
- Make sure that we have a python :), urllib, urllib2, cookielib. The easiest way is to enter python in the console, in the appeared line - import urllib, urllib2, cookielib. If you do not quarrel - Ctrl + D, to get out. If you quarrel - set.
- Download archive from here
- Unpack it somewhere
- We rule notify.conf - in the most obvious way, login and password
Another parameter in the config, timeout , is, accordingly, the interval between checks in seconds - sudo chmod + x ./notify.py in the console in the folder where unpacked
You can run :)
For the first time, it is probably better to run from the console,
./notify.py , simply because it displays a set of different debagging and not very information by which you can see if everything is in order.
The archive still has a file
run.sh , written by me then, so that you can run the script from System-> Preferences-> Startup Applications without problems at the start of the system.
The main thing that the sh-script does is to pause before the launch of the Python one, so that all system messages have time to blink off and the system has time to go online.I hope that this will be a useful thing for wave users :)
C & C very welcome!PS: To display messages used icons from a set of MacUltimate Leopard.
PPS: The script was written recently, I didn’t have time to debug it, as it is provided :)
In addition, despite all my efforts, I did not find the official position of Google in relation to such automatic recipients of information.