Losungen

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 opencode.net

9
Score 73.0%
Description:

There has been an issue with the character encoding of the date. It should be fixed now, but I couldn't test it myself, since the python bindings for KDE 4.4.1 are still missing in Debian.

Requires KDE > 4.3!

Plasma widget for the daily text (bible verse) selected by the Moravian Church (Herrnhuter Brüdergemeinde). Unfortunately, the widget does not contain an English translation of the bible verses due to copyright issues. Requires python script-engine.

Plasma widget für die (tägliche) Losung der Herrnhuter Brüdergemeinde an. Benötigt die python script-engine.

I started this widget as an exercise for learning the plasma API. I'm not sure if it is of any use for anybody - especially since I cannot provide an English translation of the verses - but don't hesitate to contact me, if you have any suggestions for improvement.
Last changelog:

8 years ago

0.3.3 2011-01-23
[indent]* Added texts for 2011[/indent]
0.3.2 2010-03-15
[indent]* Fixed character encoding issue with strftime (Thanks to Philipp Hahn)[/indent]
0.3.1 2009-11-09
[indent]* Added error message for the case that losungen texts are missing.[/indent]
0.3 2009-11-09
[indent]* Added texts for 2010 and adapted parser to new column ordering.
* Applied patch from Ruthard Baudach with minor modifications; replaces "/" and "#" into HTML format tags.[/indent]
0.2.1
[indent]* Fixed persistence of configuration parameters.[/indent]
0.2
[indent]* Added configuration dialog for font size and "Bible URL".
* Fixed encoding issue in the info dialog.[/indent]
0.1.1 Bugfix release.
[indent]* Fixed encoding issue.
* Fixed CSS template.[/indent]
0.1 Initial release.

3

AlmaTlust

4 years ago

Are there plans to develop a qml plasmoid for kf5?

Report

lineinthesand

2 years ago

I made a simple widget analogous to this one for plasma 5 (https://store.kde.org/p/1176348), I hope it's useful. If you have any suggestions, feel free to drop me a note.

Report

odysseus2010

4 years ago

Hello all,

I get every time the Message that the Init of the script is failed.

I think the reason is the encoding of the CSV-File.

The encoding of the CSV-File has changed from ISO8859-1 to utf-16.

My First Fix-Steps has not worked.
I have changed the lines:
self.losungsVers = data[LOSUNG_FORMAT_DICT[year]["losVers"]].decode("ISO8859-1")
self.losungsText = data[LOSUNG_FORMAT_DICT[year]["losText"]].decode("ISO8859-1")
self.lehrtextVers = data[LOSUNG_FORMAT_DICT[year]["lehrVers"]].decode("ISO8859-1")
self.lehrtext = data[LOSUNG_FORMAT_DICT[year]["lehrText"]].decode("ISO8859-1")
to
self.losungsVers = data[LOSUNG_FORMAT_DICT[year]["losVers"]].decode("utf-16")
self.losungsText = data[LOSUNG_FORMAT_DICT[year]["losText"]].decode("utf-16")
self.lehrtextVers = data[LOSUNG_FORMAT_DICT[year]["lehrVers"]].decode("utf-16")
self.lehrtext = data[LOSUNG_FORMAT_DICT[year]["lehrText"]].decode("utf-16")

Has another a working idea?

Thanks.

Report

weihenstefan

4 years ago

Hej Odysseus,

I tried it the other way round:
Open the 2015 csv-file and save it in ISO8859-1 encoding. This worked for me. You may find my converted file here:
http://www.stefanheilemann.de/transfer/losungen15.csv

Hope this helps. Be blessed,
Stefan

Report

bodiro

3 years ago

Helped me, too. Hope to use this applet in future, too.

Report

odysseus2010

4 years ago

Hello Stefan,

Thanks for the converted file.
The conversion was also my first Solution-Idea.
But then I thougth that this is a Workaroud that must done every year. The better solutios is to solve it on the root. The now wrong Import-of the CSV-File.

So I will use the workaround, but I think we should show that we can solve the Issue in a correct way before the next year starts.

Oliver

Report

AndrewPotter

5 years ago

Files can be downloaded at this page. http://www.losungen.de/download/download.php

Report

BrianHayden

6 years ago

The King James Version is public domain and copyright laws do not pertain to it. You could use it and be safe.

Report

AndrewPotter

6 years ago

I have the Losungstexte for 2013 working on my plasma desktop (KDE 4.9.5 release 3). I used the post from FeG Re: "Losungstexte for the year 2011" (Jan 1 2011) as my basis and performed the following 6 steps:

1.) Download the 2013 Texts from http://www.brueder-unitaet.de/download/Losung_2011_CSV.zip

2.) Extract the contents from the file "Losung_2013_CSV.zip"

3.) Copy the file "Losungen Free 2013.csv" to the directory ~/.kde4/share/apps/plasma/plasmoids/losungen/contents/

4.) Change the name of the newly copied file to be "losungen13.csv"

5.) Edit the file ~/.kde4/share/apps/plasma/plasmoids/losungen/contents/code/main.py

Change the block near line 33

From something like this ...
LOSUNG_FORMAT_DICT = {
"12" : {"losVers": 3, "losText": 4, "lehrVers": 5, "lehrText": 6},
"09" : {"losVers": 3, "losText": 4, "lehrVers": 5, "lehrText": 6},
"10" : {"losVers": 4, "losText": 3, "lehrVers": 6, "lehrText": 5},
"11" : {"losVers": 3, "losText": 4, "lehrVers": 5, "lehrText": 6},
}

... to this (adding a line for the year 13)
LOSUNG_FORMAT_DICT = {
"13" : {"losVers": 3, "losText": 4, "lehrVers": 5, "lehrText": 6},
"12" : {"losVers": 3, "losText": 4, "lehrVers": 5, "lehrText": 6},
"09" : {"losVers": 3, "losText": 4, "lehrVers": 5, "lehrText": 6},
"10" : {"losVers": 4, "losText": 3, "lehrVers": 6, "lehrText": 5},
"11" : {"losVers": 3, "losText": 4, "lehrVers": 5, "lehrText": 6},
}

6.) Exit and restart KDE, The Widget should now be working :)

Report

rasch

6 years ago

Thank you for posting, worked for me as well!

Report

9

mkretz

7 years ago

If you want to update the Losungen texts to 2012 you can download http://kretzfamily.de/losung_update.desktop and "execute" it. It will update the Losungen to 2012.

If the format of the texts, as provided by bruder-unitaet.de, doesn't change, then the same script will also work in the coming years.

Report

wwjd2012

7 years ago

The link to the kretzfamily page to get the updated Losungen seems no longer to exist. Is there any possibility to get the skript anymay? I miss the Losungen on my desktop ;-)

Report

9

mkretz

7 years ago

Right, sorry about that. Getting an ISP to provide Internet access for me at home has been (once again) a major problem. I hope to have kretzfamily.de back up next week.

Report

AndrewPotter

7 years ago

Thanks for the Update script. Worked right out of the box.:)

Report

DivanSantana

8 years ago

I've tried changing the URL to http://www.bibleserver.com/go.php?lang=en&bible=NIV&ref=#REF# and doesn't seem to make any difference.

Any suggestions on correct URL for english and NIV?

Report

DivanSantana

8 years ago

Also tried
http://www.bibleserver.com/go.php?lang=2&bible=NIV&ref=#REF#

Which seems correct but the widget doesn't change at all.
Is this a bug or am I doing something wrong.

Report

karx11erx

8 years ago

Hallo,

habe extra KDE für dieses Plasmoid installiert. Allerdings lässt es sich nicht vie Minianwendungen hinzufügen installieren - der Installer findet in keinem der Unterverzeichnisse des Plasmoids irgendwas, was er installieren könnte.

Im README kurz zu erklären, wie man das installiert, wäre wirklich nicht die Welt gewesen.

Wie macht man es denn nun?

Report

odysseus2010

8 years ago

Hello,

your plasma widget is great I use it since 2009.
But now I need the texts for the year 2011.
When are the new textes avalible?

regards Odysseus2010

Report

9

mkretz

8 years ago

You can download a script from http://kretzfamily.de/losung_update_2011.sh and a helper .desktop file from http://kretzfamily.de/losung_update_2011.desktop to automate the Update.

Report

FeG

8 years ago

The new texts are available here: http://www.brueder-unitaet.de/download/Losung_2011_CSV.zip. Download the zip file and extract the CSV file to

~/.kde/share/apps/plasma/plasmoids/losungen/contents/losungen11.csv

You than have to edit

~/.kde/share/apps/plasma/plasmoids/losungen/contents/code/main.py

as follows (patch)


--- main.py.old 2011-01-01 13:01:18.000000000 +0100
+++ main.py 2011-01-01 13:00:15.000000000 +0100
@@ -32,7 +32,8 @@

LOSUNG_FORMAT_DICT = {
"09" : {"losVers": 3, "losText": 4, "lehrVers": 5, "lehrText": 6},
- "10" : {"losVers": 4, "losText": 3, "lehrVers": 6, "lehrText": 5}
+ "10" : {"losVers": 4, "losText": 3, "lehrVers": 6, "lehrText": 5},
+ "11" : {"losVers": 3, "losText": 4, "lehrVers": 5, "lehrText": 6}
}

class Losung(object):


That is, in line 35 ("10" : ...) add a , (comma) at the end of the line and insert the line


"11" : {"losVers": 3, "losText": 4, "lehrVers": 5, "lehrText": 6}


below line 35.

I then had to remove and re-add the plasmoid and it worked.

Regards,
FeG

Report

C

jwchile

8 years ago

I'm sorry for the late update.

In case you didn't update the plasmoid yourself already: The new version has the new texts.

Report

odysseus2010

8 years ago

Hello,

Thanks for the Patch. It works fine.
Now I have the new losungen for the new year.

Odysseus2010

Report

weihenstefan

8 years ago

Thank you very much, update worked perfectly for me! Great plasmoid, can't live without it any more...

Report

DrM

9 years ago

nice work ! All fine !
GBY

Report

danny-ger

9 years ago

Hey, thanks for the help! To get the date (in another format) you need to change line 88 in render.py like this:
buf.write("""<p class="title">Losung vom %s</p>"""%date.strftime("%d.%m.%Y"))

Now it works like a charm ("Losung vom 10.03.2010").

Report

8 years ago

0.3.3 2011-01-23
[indent]* Added texts for 2011[/indent]
0.3.2 2010-03-15
[indent]* Fixed character encoding issue with strftime (Thanks to Philipp Hahn)[/indent]
0.3.1 2009-11-09
[indent]* Added error message for the case that losungen texts are missing.[/indent]
0.3 2009-11-09
[indent]* Added texts for 2010 and adapted parser to new column ordering.
* Applied patch from Ruthard Baudach with minor modifications; replaces "/" and "#" into HTML format tags.[/indent]
0.2.1
[indent]* Fixed persistence of configuration parameters.[/indent]
0.2
[indent]* Added configuration dialog for font size and "Bible URL".
* Fixed encoding issue in the info dialog.[/indent]
0.1.1 Bugfix release.
[indent]* Fixed encoding issue.
* Fixed CSS template.[/indent]
0.1 Initial release.

12345678910
313
product-maker Annisonne Jan 23 2012 9 excellent
product-maker mkretz Jan 02 2012 9 excellent
product-maker Hanau2010 Sep 18 2011 9 excellent
product-maker cptG Jul 25 2011 9 excellent
product-maker mmj May 31 2011 9 excellent
product-maker SlyderBY May 31 2011 9 excellent
product-maker Brutus180 Apr 25 2011 9 excellent
product-maker Infosoft Apr 04 2011 9 excellent
product-maker gendzis Feb 21 2011 9 excellent
product-maker AlexeyDanilovich Feb 19 2011 9 excellent
product-maker matejv Feb 06 2011 9 excellent
product-maker evergreenpsyche Jan 31 2011 9 excellent
product-maker mgp Jan 28 2011 9 excellent
product-maker DrNop Jan 24 2011 3 bad
product-maker juank202 Jan 23 2011 3 bad
product-maker AlmaTlust Jan 03 2011 3 bad
product-maker Base: 4 x 5.0 Ratings
bodiro
Dec 21 2015
mmj
Dec 04 2012
Annisonne
Jan 23 2012
mkretz
Jan 05 2011
AlmaTlust
Jun 11 2010
bulldog98
Mar 04 2010
DrM
Mar 02 2010
justi
Nov 10 2009
EinfachToll
Sep 02 2009
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs ocs-url or ocs-store to install things
Pling
0 Affiliates
Details
license
version
0.3.3
updated Jan 23 2011
added Aug 31 2009
downloads 24h
0
pageviews 24h 6