GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Thu Nov 27, 2014 7:24 pm

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Notification-tools
PostPosted: Thu Sep 06, 2012 8:57 am 
Offline
Familiar Face

Joined: Thu Sep 06, 2012 8:45 am
Posts: 6
Notification-tools are small tools that watch a file and then notify you when the file is modified.

I have started to make programs that runs automatic via cron, but sometime they fail and generates errors in an error log file.
Often when that happens I have moved on to new projects, so I don't see the error for a long time.
So I made these programs that can watch a file for me and the notify me if the file change.

Example:
If you run an Apache server on you computer, you can watch the error log with 'notification-tail /var/log/apache2/error_log'.
Now if the error log changes an icon will appear in the Notification Area.
By clicking the icon a window will open that let you see the last lines in the error log file.

These notification tool uses GTK+ and the gtk_status_icon function, and the inotify library for the file watching functionality.
I have tried to make them ambient, modular and general.
And the code contain a little mini framework, so making similar tool is very easy.

Since I have keeped them general you can combine them with any program or script that writes to a file.

Some information is better in visual form, that why there is a notification-view program, it will watch and display an image file.

Example:
Use a script that counts the daily visitors in the Apache access log and then append the number into a file.
Then you can use gnuplot to make a plot of the data and write an image.
Thereby giving you a daily update of your server traffic.

Or you could make a daily plot over the value in you portfolio or the number of lines in you current project.
As you see only your imagination is the limitation :-)

You can find the tools at sourceforge. http://sourceforge.net/p/notitools/code/ci/e74368594cec090596fc83952997250584524cf5/tree/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group