Photo of the Day

Plasma 4 Widgets

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

6
Score 82%
Description:

A plasmoid that displays photo of the day from various websites.

Last changelog:

8 years ago

Version 2.1.1
- Fixed earthshots engine.
- German translation updated ( thanks to Daniel Schemala )
Version 2.1
- Slide show
- www.bonjourmadame.fr provider by Yann Nave(yannux)
- French translation by Yann Nave(yannux)
- German translation by Daniel Schemala

Version 2.0
- Too many changes :) Requires KDE 4.4

Version 1.2
- Added Wikipedia data engine. Thanks to t3ddy. Only Latin languages are supported due to problems with nonlatin characters in KUrl :(
- Parsing of National Geographic page is modified to match new design of the web page
- Added possibility for translations.

Version 1.1
- Added smooth transition between photos. They smoothly fade in and fade out and adjust their sizes.
- Added info dialog for data engines
- Added two new data engines: Steve`s digicams and Astronomy Picture of the day

Version 1.0 beta
- Full rework of applet painting
- Now applet uses data engines to receive photos. Applet - data engine communication is through standart Plasma API function, so I think it is possible a data engine to be written in any supported by Plasma language. (If someone is interested, please send me a e-mail or write a comment)
- Error messages are drawn as part of image and disappear in 10 seconds.
- Customizable check for new photo interval.

Version 0.6
- Add smooth transition between photos

Lot of code has been rewritten so please let me know if you detect regressions or bugs.

Version 0.5.2
-Fix all(I hope) compilation problems with KDE 4.2

Version 0.5.1
-Fix compilation on KDE 4.2

Version 0.5
- Added fully configurable photo`s frame, shadow and rounded corners (thanks to Frame plasmoid team)
-Tooltips with information about photo (location, photograph and description)

Version 0.2

-Fixed network detection problems
-Check if photo changed on every one hour
-In case of failure try to load previously saved photo

HardinComp

6 years ago

It looks like either Bonjour Madame or Tumbler itself changed how the pages are coded and now rather than getting the day's BM image it's showing a Facebook icon. I'm trying to track down the proper url for the daily image and if I can come up with a solution I'll see if I can generate the needed change.

Report

Skool182

6 years ago

I've made a little patch for BonjourMadame provider.
Copy/pastle into a BonjourMadame.patch on the potd dir, and use patch < BonjourMadame.patch
It's possible that it will ask you the file to patch, just enter "providers/BonjourMadame.cpp"
and run make / make install on the build directory.
Quote:
--- providers/BonjourMadame.cpp 2012-10-15 20:10:40.219368710 +0200
+++ providers/BonjourMadame.cpp 2012-10-15 20:12:51.243372722 +0200
@@ -103,7 +103,7 @@

void BonjourMadame::parseMainPage(QByteArray source)
{
- int photoTagStart = source.indexOf("<div class=\"photo\">") + (int)strlen("<div class=\"photo\">");
+ int photoTagStart = source.indexOf("<div class=\"photo-panel\">") + (int)strlen("<div class=\"photo-panel\">");
int imgStart = source.indexOf("<img src=\"", photoTagStart) + (int)strlen("<img src=\"");
int imgEnd = source.indexOf("\"", imgStart);

@@ -128,7 +128,7 @@
m_OldUrl = newUrl;

// get photographer
- int photographerStart = source.indexOf("<div class=\"caption\">") + (int)strlen("<div class=\"caption\">");
+ int photographerStart = source.indexOf("<div class=\"copy\">") + (int)strlen("<div class=\"copy\">");
int photographerEnd = source.indexOf("</div>", photographerStart);

QString photographer = QString::fromUtf8(source.mid(photographerStart, photographerEnd - photographerStart).trimmed());

Report

HardinComp

6 years ago

I had to to a rebuild since I had dumped the build folder and when I redid the steps I noticed something in the terminal when I try to apply the patch. Here's the entire output in the terminal:

$ patch < BonjourMadame.patch
can't find file to patch at input line 4
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|
|--- providers/BonjourMadame.cpp 2012-10-15 20:10:40.219368710 +0200
|+++ providers/BonjourMadame.cpp 2012-10-15 20:12:51.243372722 +0200
--------------------------
File to patch: providers/BonjourMadame.cpp
patching file providers/BonjourMadame.cpp
patch: **** malformed patch at line 6: void BonjourMadame::parseMainPage(QByteArray source)

$

Report

Skool182

6 years ago

Did you use a fresh copy of potd archive ?
I know that my patch file is not clean, but I'm not remembering how to make proprely a patch file.

I will search the correct method to do that.

Report

HardinComp

6 years ago

It wasn't a fresh extraction of the tarball but the only change to it was to disable the Wikimedia Commons info since that engine's been broken for quite a while. (See above comments about it.)

Report

Skool182

6 years ago

I've just tested this and it worked for me :
- download and untar the archive
- download the patch : http://skool.blasters.fr/BonjourMadame.patch
- goto the v2.1.1 directory
- apply patch with "patch -p1 < /path/to/BonjourMadame.patch"
- apply the Readme.txt procedure to compile and install

Maybe in your case, KDE use the old version of the build. Maybe try a "make uninstall" for removing the old version.

Report

Skool182

6 years ago

damn autorefresh...

Report

Skool182

6 years ago

I've just tested this and it worked for me :
- download and untar the archive
- download the patch : http://skool.blasters.fr/BonjourMadame.patch
- goto the v2.1.1 directory
- apply patch with "patch -p1 < /path/to/BonjourMadame.patch"
- apply the Readme.txt procedure to compile and install

Maybe in your case, KDE use the old version of the build. Maybe try a "make uninstall" for removing the old version.

Report

HardinComp

6 years ago

Never mind. An idiot unplugged my laptop and when I finally got back on I am able to see the BM image. Thankee!

Report

HardinComp

6 years ago

There actually wasn't an older build directory to use. I needed to recreate it to try applying the patch. But it still didn't work, plus I forgot to remove the Wikimedia engine as it's still dead.

Report

HardinComp

6 years ago

I applied the patch then went through the install steps again in the Readme.txt but I still get the Facebook icon instead of the BM image.

Report

oOSplashOo

6 years ago

Thanks for bonjourmadame!!! Great addon^^. Beside could you add the possibility to navigate throught pictures of the same source?

Report

C

taskstruct

6 years ago

Hello,

Yes. I am implementing this functionality. I hope it will be ready in a month :)

Report

aseigo

7 years ago

there is a Picture of the Day DataEngine in kdeplasma-addons. it would be great to see your PotD engines added to it, and then your widget could also use that DataEngine. we could move the DataEngine into kde-workspace so it would be available on all Plasma Desktop/Netbook/Tablet systems.

if you're interested in collaborating along these lines, email me! :) aseigo at kde.org

Report

HardinComp

7 years ago

I recently built this from the source code to use on LMDE with KDE bolted onto the top, and I've noticed that whenever the plasmoid tries to display the pic from Wikimedia Commons it keeps the plasmoid from changing off the Bonjour Madame picture. Is there an easy way to fix this or disable using the Wikimidia Commons pictures? My laptop is often in an area where I really don't want the BM image showing up for so long.

Report

C

taskstruct

7 years ago

Hello,

you can remove any of image providers by editing providers/CMakeList.txt There is a section for every provider. Just remove/comment it and rebuild.

Report

HardinComp

7 years ago

Cool, I'll do that. Although I'd rather see it fixed because WikiMedia has some nice daily images.

Report

HardinComp

7 years ago

On second thought never mind the fix request. It seems WikiMedia's site isn't updating for each new day so unless they fix their side this side probably can't be fixed too easily.

Report

MisterSir

7 years ago

None of the photos seem to scale smoothly--they all look horribly jagged. Comparing it to the Flickr photo widget, the difference is harsh.

I don't know how Qt works, but I wonder if there's a bug in this code in potd.cpp:

// Respect the smooth-scaling setting
p->setRenderHint(QPainter::SmoothPixmapTransform, m_smoothScaling);
// draw our pixmap into the computed rectangle
Qt::TransformationMode trMode = m_smoothScaling ? Qt::SmoothTransformation : Qt::FastTransformation;

// get photo
QPixmap pm;
if ( false == m_bAnimating )
{
pm = m_pPhoto->scaled( drawingRect.size().toSize(), Qt::KeepAspectRatio, trMode );
}
else
{
QPixmap from = m_pOldPhoto->scaled( drawingRect.size().toSize(), Qt::IgnoreAspectRatio, Qt::FastTransformation );
QPixmap to = m_pPhoto->scaled( drawingRect.size().toSize(), Qt::IgnoreAspectRatio, Qt::FastTransformation );

pm = Plasma::PaintUtils::transition( from, to, m_transtionOpacity );
}

p->drawPixmap(drawingRect.toRect(), pm);
p->restore();

p->setRenderHint(QPainter::SmoothPixmapTransform, true);

Report

yannux

8 years ago

:)

Warning : it's for kde 4.5.1

Report

yannux

8 years ago

Hey happy to see it released !

Do you know how to make plasmoid package ?

Report

C

taskstruct

8 years ago

Thanks for Debian package :)

Report

linuxlex

8 years ago

Veri good!!

Report

C

taskstruct

8 years ago

Phobeus, thanks for the packages :)

I`ve updated German translation of source archive. Many thanks to Daniel Schemala, who made translation :)

Report

Phobeus

8 years ago

Packages for F13 64bit-can be found at: http://floriansievert.de/linux/fedora/13/phobos/repoview/kde-plasma-potd.html
32bit will follow after the official release of F13.

Report

8 years ago

Version 2.1.1
- Fixed earthshots engine.
- German translation updated ( thanks to Daniel Schemala )
Version 2.1
- Slide show
- www.bonjourmadame.fr provider by Yann Nave(yannux)
- French translation by Yann Nave(yannux)
- German translation by Daniel Schemala

Version 2.0
- Too many changes :) Requires KDE 4.4

Version 1.2
- Added Wikipedia data engine. Thanks to t3ddy. Only Latin languages are supported due to problems with nonlatin characters in KUrl :(
- Parsing of National Geographic page is modified to match new design of the web page
- Added possibility for translations.

Version 1.1
- Added smooth transition between photos. They smoothly fade in and fade out and adjust their sizes.
- Added info dialog for data engines
- Added two new data engines: Steve`s digicams and Astronomy Picture of the day

Version 1.0 beta
- Full rework of applet painting
- Now applet uses data engines to receive photos. Applet - data engine communication is through standart Plasma API function, so I think it is possible a data engine to be written in any supported by Plasma language. (If someone is interested, please send me a e-mail or write a comment)
- Error messages are drawn as part of image and disappear in 10 seconds.
- Customizable check for new photo interval.

Version 0.6
- Add smooth transition between photos

Lot of code has been rewritten so please let me know if you detect regressions or bugs.

Version 0.5.2
-Fix all(I hope) compilation problems with KDE 4.2

Version 0.5.1
-Fix compilation on KDE 4.2

Version 0.5
- Added fully configurable photo`s frame, shadow and rounded corners (thanks to Frame plasmoid team)
-Tooltips with information about photo (location, photograph and description)

Version 0.2

-Fixed network detection problems
-Check if photo changed on every one hour
-In case of failure try to load previously saved photo

File (click to download) Version Description Downloads Date Filesize DL OCS-Install
Pling
Details
license
version
2.1
updated Dec 04 2010
added May 11 2009
downloads today
0
page views today 2
page views total 4611