
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
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.
10 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.
10 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.
AlmaTlust
5 years ago
Report
lineinthesand
3 years ago
Report
odysseus2010
6 years ago
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
6 years ago
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
5 years ago
Report
odysseus2010
6 years ago
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
7 years ago
Report
BrianHayden
7 years ago
Report
AndrewPotter
8 years ago
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
8 years ago
Report
mkretz
9 years ago
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
8 years ago
Report
mkretz
8 years ago
Report
AndrewPotter
9 years ago
Report
DivanSantana
9 years ago
Any suggestions on correct URL for english and NIV?
Report
DivanSantana
9 years ago
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
9 years ago
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
10 years ago
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
mkretz
10 years ago
Report
FeG
10 years ago
~/.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
jwchile
10 years ago
In case you didn't update the plasmoid yourself already: The new version has the new texts.
Report
odysseus2010
10 years ago
Thanks for the Patch. It works fine.
Now I have the new losungen for the new year.
Odysseus2010
Report
weihenstefan
10 years ago
Report
DrM
10 years ago
GBY
Report
danny-ger
10 years ago
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