-
 KDE-Apps.org Applications for the KDE-Desktop 
 GTK-Apps.org Applications using the GTK Toolkit 
 GnomeFiles.org Applications for GNOME 
 MeeGo-Central.org Applications for MeeGo 
 CLI-Apps.org Command Line Applications 
 Qt-Apps.org Free Qt Applications 
 Qt-Prop.org Proprietary Qt Applications 
 Maemo-Apps.org Applications for the Maemo Plattform 
 Java-Apps.org Free Java Applications 
 eyeOS-Apps.org Free eyeOS Applications 
 Wine-Apps.org Wine Applications 
 Server-Apps.org Server Applications 
 apps.ownCloud.com ownCloud Applications 
--
-
 KDE-Look.org Artwork for the KDE-Desktop 
 GNOME-Look.org Artwork for the GNOME-Desktop 
 Xfce-Look.org Artwork for the Xfce-Desktop 
 Box-Look.org Artwork for your Windowmanager 
 E17-Stuff.org Artwork for Enlightenment 
 Beryl-Themes.org Artwork for the Beryl Windowmanager 
 Compiz-Themes.org Artwork for the Compiz Windowmanager 
 EDE-Look.org Themes for your EDE Desktop 
--
-
 Debian-Art.org Stuff for Debian 
 Gentoo-Art.org Artwork for Gentoo Linux 
 SUSE-Art.org Artwork for openSUSE 
 Ubuntu-Art.org Artwork for Ubuntu 
 Kubuntu-Art.org Artwork for Kubuntu 
 LinuxMint-Art.org Artwork for Linux Mint 
 Arch-Stuff.org Art And Stuff for Arch Linux 
 Frugalware-Art.org Themes for Frugalware 
 Fedora-Art.org Artwork for Fedora Linux 
 Mandriva-Art.org Artwork for Mandriva Linux 
--
-
 KDE-Files.org Files for KDE Applications 
 OpenTemplate.org Documents for OpenOffice.org
 GIMPStuff.org Files for GIMP
 InkscapeStuff.org Files for Inkscape
 ScribusStuff.org Files for Scribus
 BlenderStuff.org Textures and Objects for Blender
 VLC-Addons.org Themes and Extensions for VLC
--
-
 KDE-Help.org Support for your KDE Desktop 
 GNOME-Help.org Support for your GNOME Desktop 
 Xfce-Help.org Support for your Xfce Desktop 
--
openDesktop.orgopenDesktop.org:   Applications   Artwork   Linux Distributions   Documents    LinuxDaily.com    Linux42.org    OpenSkillz.com   
 
Apps
News
Groups
Knowledge
Events
Forum
People
Jobs
Register
Login


Sponsoring


-
- Content .- Fans (1) .- Knowledge Base  . 

Airdate

   0.24  

Plasmoid Script

Score 59%
Airdate
zoom


Minimum required   KDE 4.x
Downloads:  149
Submitted:  Sep 21 2011
Updated:  Oct 10 2011

Description:

A plasmoid, which is written in python, that displays when TV shows air the next time and when they aired previously.

You need the following packages to run it:
python-beautifulsoup
python-kde4
python-qt4

Install the plasmoid by calling
plasmapkg -i airdate.zip
in the folder where you placed airdate.zip

(update the plasmoid to a newer version with plasmapkg -u airdate.zip)

You can also change the source code and whatever you like by unpacking it...

Once you installed the plasmoid you can simply add it to our desktop.
Add a ty series by pressing the edit button (button on the very right), typing the showname into the editbox and finally pressing the "+" button.




Changelog:

Oct/05/2011:
* fixed a bug that occured if the locale settings wasn't en_US (thanks to SWaN for the import locale solution)
* added the requested weekday
* changed all the stuff that anthon38 suggested, thanks!
* noticed a small bug, when adding a series that is already in the list

Oct/10/2011:
* bug fixes
* new feature: day offset




LicenseGPL
(airdate-plasmoid 0.24)
Send to a friend
Subscribe
Other  Apps  from melongex
Report inappropriate content



-

 Try avoiding BeautifulSoup

 
 by einar77 on: Sep 23 2011
 
Score 50%

BeautifulSoup's parsing is somewhat slow. I'd suggest you try lxml as an alternative (html module) which is likely faster.


Reply to this

-

 Re: Try avoiding BeautifulSoup

 
 by melongex on: Sep 23 2011
 
Score 50%

didn't know that, thanks for the suggestion


Reply to this

-
.

 Fetches the images, but not the data

 
 by SWaN on: Sep 23 2011
 
Score 50%

I get this error instead:
Quote:
File "/home/xxx/.kde4/share/apps/plasma/plasmoids/airdate-plasmoid/contents/code/main.py", line 272, in fetchedInfo
self.ntime = time.strptime(datestring,"%b %d %Y")
File "/usr/lib/python2.7/_strptime.py", line 454, in _strptime_time
return _strptime(data_string, format)[0]
File "/usr/lib/python2.7/_strptime.py", line 325, in _strptime
(data_string, format))
ValueError: time data 'Sep 29 2011' does not match format '%b %d %Y'

My system's locale is it_IT, can this affect the parsing of the date?

Nice and useful app, btw ;)


Reply to this

-

 Re: Fetches the images, but not the data

 
 by melongex on: Sep 23 2011
 
Score 50%

I guess that the output of the website that I am parsing depends on your local settings.
I'll patch this as soon as possible, thanks for your comment! (could take a week as I am not at home right now)


Reply to this

-

 Re: Re: Fetches the images, but not the data

 
 by melongex on: Sep 23 2011
 
Score 50%

no, you were right, it is because %b uses your locale's month name... I'll fix it soon


Reply to this

-

 Re: Fetches the images, but not the data

 
 by sconosciuto on: Sep 23 2011
 
Score 50%

Same problem here.
However 'time.strptime("Sep 10 2011","%b %d %Y")' in the python console gives no errors.
I'm using KDE 4.6.5, locales it_IT


Reply to this

-

 Re: Fetches the images, but not the data

 
 by sconosciuto on: Sep 23 2011
 
Score 50%

Same problem here.
However 'time.strptime("Sep 10 2011","%b %d %Y")' in the python console gives no errors.
I'm using KDE 4.6.5, locales it_IT


Reply to this

-

 Re: Re: Fetches the images, but not the data

 
 by sconosciuto on: Sep 23 2011
 
Score 50%

Sorry for the (double) useless post. When I wrote it there was no answer, even if it was sent an hour earlier.
Thanks anyway.


Reply to this

-

 Re: Re: Fetches the images, but not the data

 
 by SWaN on: Sep 23 2011
 
Score 50%

Python failing parsing the %b was my first thought indeed, but you're right. I tried your code as well, and works in python console both with version 2.7.2 and 3.2.2.
locale.getdefaultlocale() gives ('it_IT', 'UTF-8'). KDE version is 4.7.1.


Reply to this

-

 Re: Re: Re: Fetches the images, but not the data

 
 by sconosciuto on: Sep 23 2011
 
Score 50%

Yes, locale is the problem. I don't know why in python console works.
I tried to fix it:
http://pastebin.com/0kT2BL7F
See lines: 264, 270 and 279 (I noticed that what is called day actually is the month)


Reply to this

-

 Re: Re: Re: Re: Fetches the images, but not the da

 
 by SWaN on: Sep 23 2011
 
Score 50%

It works this way, thank you.
So, maybe the problem resides in Qt or KDE Python bindings. Just guessing...


Reply to this

-

 Re: Re: Re: Re: Fetches the images, but not the da

 
 by SWaN on: Sep 24 2011
 
Score 50%

A somewhat cleaner and portable solution:
import locale
locale.setlocale(6, 'en_US')


Reply to this

-

 Re: Re: Re: Re: Fetches the images, but not the da

 
 by SWaN on: Sep 24 2011
 
Score 50%

BTW, it would be great if you could add the week day to the date string. It would help keeping a weekly "plan"!


Reply to this

-

 Long list issue

 
 by sconosciuto on: Sep 24 2011
 
Score 50%

I don't know if it's a KDE issue or not, but when the list is too long and a scrollbar appears, if you put a plasmoid below airdate-plasmoid you'll see the rest of the list over this one.
I couldn't reproduce the same behavior with other plasmoids, like opendesktop_activities.


Reply to this

-

 Re: Long list issue

 
 by SWaN on: Sep 29 2011
 
Score 50%

I can't reproduce your issue, sorry. I'm running KDE 4.7.1.


Reply to this

-

 Re: Long list issue

 
 by melongex on: Oct 5 2011
 
Score 50%

I also noticed that this occurs sometime, but I do not know how to fix this issue as it does not appear if I simply use plasmoidviewer. I believe that this either a bug in plasma or a driver issue. what kind of graphicscard do you use? I'm using a ati 4850 with the r600 open source driver


Reply to this

-
.

 nice

 
 by anthon38 on: Oct 5 2011
 
Score 50%

Hi,
Thank you for your plasmoid, it's very useful. I have some comments about it though, I hope you don't mind ;)

-I think you included the wrong main.py in the package, as it doesn't contains the import locale fix.
-You should put your plasmoid in the category "plasmoid script" instead of "plasmoid binary", so that it can be downloaded directly with KGHNS, instead of having to be installed manually.
-To fix the visual glitch mentioned in the comments, you can use setFlag(QGraphicsItem.ItemClipsChildrenToShape) on the scrollwidget.
-Instead of shipping your own icons with the plasmoid, you can use those shipped with KDE, since the plasmoid requires Plasma to run anyway, right? ;)
So instead of this:
icon23 = QIcon()
icon23.addPixmap(QPixmap(self.applet.package().filePath("ui","add.png")), QIcon.Normal, QIcon.Off)
self.addButton.setIcon(icon23)
You can do this:
self.addButton.setIcon(KIcon("list-add"))
-Using the "list-remove" icon would be more consistent than the "edit-delete" icon.
-Same goes for "view-refresh" instead of "edit-redo".

I think that's all, thanks again!


Reply to this

-

 Re: nice

 
 by melongex on: Oct 5 2011
 
Score 50%

thank you very much for your comment. I changed the stuff and uploaded the new version.


Reply to this

-

 Re: Re: nice

 
 by melongex on: Oct 5 2011
 
Score 50%

btw, you may have noticed that this is my first plasmoid and I am not very familiar with qt either, so I am really happy for all comments and suggestions I can get.
thanks again


Reply to this

-

 Re: Re: nice

 
 by sconosciuto on: Oct 5 2011
 
Score 50%

Thank you both!

Anyway I suggested to fix the plasmoid without changing locale because in this way the user will see the date in his language.


Reply to this

-

 Re: Re: Re: nice

 
 by melongex on: Oct 6 2011
 
Score 50%

I see your point and changed that part.


Reply to this

Add commentBack






-
-
Do you like or dislike Ubuntu Unity?
 Yes, unity is alien technology!
 It is less confusing than Gnome 3 default, shell.
 Granny thinks it is much more usable than Gnome 2
 Canonical is embarrasing itself with this split project
 Gnome 3 default shell is much better
 I dislike Unity, Gnome 3 default shell is alien technology!
 None of the above, I like the 2Gb for free and Apple alike behavior. Will post a comment instead

resultmore
 
 
 Who we are
Contact
More about us
Frequently Asked Questions
Register
Twitter
Blog
Explore
Apps
Jobs
Knowledge
Events
People
Updates on identi.ca
Updates on Twitter
Facebook App
Content RSS   
Events RSS   

Participate
Groups
Forum
Add App
Public API
About KDE-Apps.org
Legal Notice
Spreadshirt Shop
CafePress Shop
Advertising
Sponsor us
Report Abuse
 

Copyright 2003-2014 KDE-Apps.org Team  
All rights reserved. KDE-Apps.org is not liable for any content or goods on this site.
All contributors are responsible for the lawfulness of their uploads.
KDE and K Desktop Environment are trademarks of KDE e.V.