KClock

Karamba & Superkaramba

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
5 .0
Description:

KClock has 12 clock styles.

The KClock has the following features:
Timezones - You can have multiple clocks on your desktop, each set to a different timezone
Clock hands can be shaded (only if PIL or ImageMagick is installed, see below about auto detection).
Option to remove the second hand. KClock will automatically reduce the update frequency from superkaramba if the second hand is not show.
All clock hand images are cached, so reduce system overhead.
All clocks styles are in svg format and so can be resized to any size (see auto detection of Inkscape or librsvg below).
Extra clock styles can be added from the configuration menu. See below about adding the 'Color Clock Styles'.
Clock styles can be removed from the configuration menu.

Since this release is a bit bigger, I have had to remove the 'Color' clock styles Red, Green and Blue out into their own .gz file.

To install these clock styles, download the .gz file 'Color Clock Styles', then go to the KClock configuration menu/editor and select 'Import Style...' and select the .gz file to import.

or to do this manually you can extract the contents of the ColorClockStyles.tar.gz into the 'styles' folder in KClock.


Auto Detection for extra features
KClock will work with still work with the basic python libraries. But to get extra features and functionality working with KClock we surggest that you have some of these libraries/applications installed:

PIL (Python Image Library) - With this library KClock can draw the shading on the clock hands and rotate the clock hands with out seeing jagged edges.
Image Magick - This provides the same functionality as PIL, but is stlightly slower and more resourse instense grapthic library
PyQt - The Python QT library will provide a nicer interface to choosing the clock styles.
Inkscape - Inkscape is used to resize the png images without loss of quality from 250 by 250 pixels and higher.
librsvg - librsvg does basically the same as Inkscape, so if you do not have Inkscape installed you can install this lighter application instead.
pytz - To get the timezone working you will need to install the python library pytz. See http://pytz.sourceforge.net. If you have pyqt installed then the Configuration window can install this library for you into the KClock/libs folder.
Last changelog:

13 years ago

version 1.2a corrects a bug where kclock will not start up if you do not have some of the supported applications installed.

Version 1.2b fixes a bug where the PIL image library is always imported even if you do not have the library installed.

Version 1.2c fixes a bug where a non pyqt user tries to set a timezone.

Version 1.2d may fix a syntax error when running python 2.4.

Version 1.2e - On KClock startup if the current used style or the default 'chrome' style is removed, then the first available style will be used.

C

linuxbob

13 years ago

Ideally you should be running KClock using python version 2.5.

I have uploaded a new version 1.2d.

The KClock version 1.2d does not have the '()' in line 10 of AppLibFinder.py. I think you are getting this syntax error because their is a bug/feature in python 2.4 that does not allow an empty '()' after the class name.

Please download the new version, then install and restart SuperKaramba


Report

janas

13 years ago

I downloaded the c version but it did not work. I think that for me there is no hope.. I really wanted to have this beautiful theme...:(

Report

C

linuxbob

13 years ago

This web system does not allow me to reply to your last post...

So to fix your error...

The reason you get the error is that KClock is trying to load a non existent clock style. If this is the first time you are running KClock then it defaults to the 'Chrome' style. So you should have the folder '..../KClock/styles/Chrome'. You should also have the '.../KClock/styles' folder as well.

I have uploaded a newer version, 1.2e. This new version will try to load in the current or default style, if for some reason the style is not available it will automatically read in the first clock style avaliable in the 'styles' folder.


Bob

Report

janas

13 years ago

Thanks a lot! It's working now and I can enjoy it:) I can not configure it, because when I clik on the 'configure' there is no response, but never mind. I am happy, thanks once again. I like the red one...

Report

C

linuxbob

13 years ago

You said in your post that you downloaded the 'c' version (you may have done a typo). So if not, you need to download the current 1.2d version.


Report

janas

13 years ago

OK, my mistaka, sorry. Of course I downloaded the latest ('d') version. I run superkaramba with KClock.theme in console window. This is the result:

Clock: Python Image Library (PIL) found
KClock: ImageMagick found version 6.2.4
KClock: rsvg found version 2.16.0
KClock: PyQt is loaded
KClock: Loaded!
sys.path.insert(0, '/home/johnny/Karamba_themes/KClock_vd/')
Call to initWidget failed
Traceback (most recent call last):
File "KClock.py", line 44, in initWidget
kclockWidgets[widget] = KClockWidget(widget)
File "KClockWidget.py", line 59, in __init__
self.analogClock = AnalogClock(widget)
File "AnalogClock.py", line 50, in __init__
BaseImage.loadStyle(self, self.style, size)
File "KClockBase.py", line 53, in loadStyle
self.filename = style.getImageFile(self.name, size)
AttributeError: 'NoneType' object has no attribute 'getImageFile'
Correcting widget bug in SuperKaramba where the initWidget is not called
Call to widgetUpdated failed
Traceback (most recent call last):
File "KClock.py", line 68, in widgetUpdated
initWidget(widget)

Afer this message, it started to repeat it again and agaiin. What is wrong?

Report

janas

13 years ago

Please help. I opened the console and run the suerkaramba with KClock.theme and I got this:

Traceback (most recent call last):
File "/home/johnny/Karamba_themes/KClock/KClock.py", line 16, in ?
from AppLibFinder import AppLibFinder
File "AppLibFinder.py", line 10
class AppLibFinder():
^
SyntaxError: invalid syntax
------------------------------------------------------
What does ImportError mean?

It means that I couldn't load a python add-on KClock.py
If this is a regular theme and doesn't use python
extensions, then nothing is wrong.
------------------------------------------------------

There was no theme on the desktop. What can be the reason?

Report

sumen

13 years ago

I really like the timezones option. I have 3 of your clocks on my desktop showing the times in London, New York & Tokyo.
Thanks!!

Report

jvedi

13 years ago

When I run superkaramba from console I get this from starting KClock:

superkaramba: addThemeToList() file: /home/julian/karamba-themes/clock/KClock.theme
superkaramba: Starting theme: KClock Ver 1.2 pretty name: KClock Ver 1.2 - 1
superkaramba: /home/julian/.superkaramba/KClock.rc
superkaramba: Loading python module: KClock
sys.path.insert(0, '/home/julian/karamba-themes/clock/')
Traceback (most recent call last):
File "/home/julian/karamba-themes/clock/KClock.py", line 16, in ?
from AppLibFinder import AppLibFinder
File "/home/julian/karamba-themes/clock/AppLibFinder.py", line 10
class AppLibFinder():
^
SyntaxError: invalid syntax

How do I fix this?

Report

C

linuxbob

13 years ago

Oooh this looks odd..

the nearest I got to recreating this error is by deliberately adding an illegal character at the begining of the line. e.g. a '*'. So I then get the error result ..

sys.path.insert(0, '/home/bob/KClock/Karamba/KClock/')
Traceback (most recent call last):
File "/home/bob/KClock/Karamba/KClock/KClock.py", line 16, in <module>
from AppLibFinder import AppLibFinder
File "/home/bob/KClock/Karamba/KClock/AppLibFinder.py", line 10
*class AppLibFinder():
^
SyntaxError: invalid syntax

I do not think python would give the reserved word 'class' as a syntax error, unless your python is so old that it does not support classes or your python installlation is messed up or kclock installation files are corrupted.



So to fix this you may need to do the following:

1. Download the kclock .gz file again and re-install kclock
2. make sure that your version of Python is 2.5 or higher
3. you may need to re-install python again


Report

jvedi

13 years ago

When I run superkaramba from console I get this from starting KClock:

superkaramba: addThemeToList() file: /home/julian/karamba-themes/clock/KClock.theme
superkaramba: Starting theme: KClock Ver 1.2 pretty name: KClock Ver 1.2 - 1
superkaramba: /home/julian/.superkaramba/KClock.rc
superkaramba: Loading python module: KClock
sys.path.insert(0, '/home/julian/karamba-themes/clock/')
Traceback (most recent call last):
File "/home/julian/karamba-themes/clock/KClock.py", line 16, in ?
from AppLibFinder import AppLibFinder
File "/home/julian/karamba-themes/clock/AppLibFinder.py", line 10
class AppLibFinder():
^
SyntaxError: invalid syntax

How do I fix this?

Report

barryc

13 years ago

I installed 1.2b and it will open up multiple clocks but I can't get the time zones to work. Tried installing the PYTZ tarball but got error message when trying to install it with the "python setup.py install" command given in the readme file.

My repo (PCLinuxOS) doesn't have PYTZ in it for download so I tried to install it from the tarball -- no joy.

Report

C

linuxbob

13 years ago

To install pytz manually for kclock only you can do the following:

1. download and expand the pytz tar ball pytz-2006p.tar.gz

2. go to the new folder pytz-2006p

3. move the folder 'pytz' over to the kclock/libs folder.

4. you should now have a folder ..'kclock/libs/pytz'

5. restart kclock and/or superkaramba

Report

ffiene

13 years ago

Ahhm, i've tried to setup multiple clocks with different timezones but all clocks show the same time!

Can i do this in this way?

Report

C

linuxbob

13 years ago

Guess what .. it's a bug for non pyqt users when they try and change the timezone.

I have uploaded a fix for this in version 1.2c.

If it still does not work then please send me the console output of superkaramba when you change the timezone.

Report

ffiene

13 years ago

It is working now, but maybe also a complete restart of superkaramba has the same result.

Thx!!!!

Report

danieleg

13 years ago

I have this error:

sys.path.insert(0, '/home/daniel/SK-Themes/KClock/')
Traceback (most recent call last):
File "/home/daniel/SK-Themes/KClock/KClock.py", line 18, in <module>
appLibFinder.check(True)
File "/home/daniel/SK-Themes/KClock/AppLibFinder.py", line 16, in check
self.writeCache(filename)
File "/home/daniel/SK-Themes/KClock/AppLibFinder.py", line 75, in writeCache
self.config.set('AppLibs', 'RSVG_VERSION', str(self.RSVG_VERSION))
AttributeError: AppLibFinder instance has no attribute 'RSVG_VERSION'
------------------------------------------------------
What does ImportError mean?

It means that I couldn't load a python add-on KClock.py
If this is a regular theme and doesn't use python
extensions, then nothing is wrong.
------------------------------------------------------

Report

C

linuxbob

13 years ago

Oops , sorry for that.. I did not set up the variable RSVG_VERSION for non rsvg users...

Many thanks for reporting & spoting the bug, I have now uploaded a newer version.

thanks

Bob

Report

ffiene

13 years ago

Yes, where?

I can only download the buggy version!

Do you have uploaded Version 1.3?

BTW: Great tool!

Report

C

linuxbob

13 years ago

Hi

I have uploaded a newer version called 1.2a.

This new version has the bug fix.

The only file I changed in the version 1.2a is AppLibFinder.py

Report

bkn

13 years ago

Still the same error with 1.2a
(Kubuntu 7.04, KDE 3.5.7)
KClock 1.1 works

Report

C

linuxbob

13 years ago

I have now found the bug, I was using the PIL library when you do not have it installed. Please download version 1.2b to fix this..

Report

bkn

13 years ago

o.k., it works now.
Many thanks

Report

C

linuxbob

13 years ago

What is the error message?

If it is the same error message then you are probably still have the older 1.2 version installed. If it is a different error message then please send me the error text when you run superkaramba from the console.


Report

bkn

13 years ago

I'm using definitely the most recent version 1.2a.
The error-message is:

KClock: ImageMagick found version 6.2.4
KClock: Inkscape found version 0.45.1
KClock: rsvg found version 2.16.0
KClock: PyQt is loaded
KClock: pytz timezone library is loaded
sys.path.insert(0, '/home/bernd/computer/Downloads/karamba/66205-KClock_1.2a/')
Traceback (most recent call last):
File "KClock.py", line 35, in <module>
from KClockWidget import KClockWidget
File "KClockWidget.py", line 6, in <module>
from AnalogClock import AnalogClock
File "AnalogClock.py", line 8, in <module>
from KClockBase import BaseImage
File "KClockBase.py", line 5, in <module>
import Image, ImageEnhance
ImportError: No module named Image
Error in sys.excepthook:
Traceback (most recent call last):
File "/var/lib/python-support/python2.5/apport_python_hook.py", line 44, in apport_excepthook
binary = os.path.realpath(os.path.join(os.getcwdu(), sys.argv[0]))
AttributeError: 'module' object has no attribute 'argv'

Original exception was:
Traceback (most recent call last):
File "KClock.py", line 35, in <module>
from KClockWidget import KClockWidget
File "KClockWidget.py", line 6, in <module>
from AnalogClock import AnalogClock
File "AnalogClock.py", line 8, in <module>
from KClockBase import BaseImage
File "KClockBase.py", line 5, in <module>
import Image, ImageEnhance
ImportError: No module named Image
------------------------------------------------------
What does ImportError mean?

It means that I couldn't load a python add-on KClock.py
If this is a regular theme and doesn't use python
extensions, then nothing is wrong.
------------------------------------------------------

Report

13 years ago

version 1.2a corrects a bug where kclock will not start up if you do not have some of the supported applications installed.

Version 1.2b fixes a bug where the PIL image library is always imported even if you do not have the library installed.

Version 1.2c fixes a bug where a non pyqt user tries to set a timezone.

Version 1.2d may fix a syntax error when running python 2.4.

Version 1.2e - On KClock startup if the current used style or the default 'chrome' style is removed, then the first available style will be used.

12345678910
Be the first to comment
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
1.2e
updated Oct 03 2007
added Sep 13 2007
downloads 24h
0
mediaviews 24h 0
pageviews 24h 3