profile-image

fpuelz

Friedrich Pülz Bremen, Germany

KrossWordPuzzle

Board Oct 31 2011
Score 83%
83 Likes
17 Dislikes

Eye

Plasma 4 Widgets Sep 08 2010
Score 63%
63 Likes
37 Dislikes
PublicTransport

Plasma 4 Widgets 813 comments

Score 92%
92 Likes
8 Dislikes
Jan 17 2013
qt-script in Gentoo seems to only contain the QtScript module ("The ECMAScript module for the Qt toolkit"). This is also needed of course.

But it seems that you need the package qtscriptgenerator in Gentoo. In openSuse the bindings are in the package qt4-qtscript with description "Qt bindings generator for Qt Script", ie. it is different from qt-script in Gentoo. - Jan 17 2013
You need the Qt bindings for QtScript. On openSuse the package is called qt4-qtscript.

You can get a tarball in a one-liner (see HINTS_FOR_PACKAGE_MAINTAINERS file):
> git archive --format=tar --remote=git://anongit.kde.org/publictransport unstable-0.11-beta | gzip > publictransport_unstable-0.11-beta.tar.gz

It's just too big to upload it here.

Git should be easy to integrate into automated build processes, eg. openBuildService can download sources from git repositories as far as I know. - Jan 17 2013
Great :) Fixed in git HEAD. - Dec 06 2012
Could be.. It links to pthread for TimetableMate but not for the data engine. Can you try to modify a line in publictransport/engine/CMakeLists.txt?
Change line 131 from

set( LIBS ${LIBS} ${PROTOBUF_LIBRARY} )

to

set( LIBS ${LIBS} ${PROTOBUF_LIBRARY} pthread )

If that works I'll fix it. Not sure why it works for me, though.
- Dec 06 2012
Pedantic warnings are turned on on your machine and are treated as errors, eg. with -pedantic-errors compiler flag. You should try to disable that flag to compile.
Or update to the current development version, I've just fixed the warnings in GIT. - Dec 05 2012
..what "city" do you mean? The transportation network gets chosen as "Service Provider" in the applet. A "City:" field is currently only used for cz_idnes, are you using this? - Dec 04 2012
There is a bug in 0.11alpha, that did not allow to build GTFS support without GTFS-realtime, which needs protocol buffers. Make sure you really have all build dependencies installed, ie. libprotobuf, protobuf-devel. It is an optional dependency, but that did not work correctly because of the bug. You can also use the development version (updated install script), in that version the bug is fixed. But for GTFS-realtime you still need procotol buffers. - Dec 04 2012
When I try to build from a fresh git clone, it works. Probably you are missing needed headers for Google protocol buffer? The file your build is complaining about gets generated using protobuf. - Dec 04 2012
What is the error message?
If all build deps are installed, cmake succeeds, but make fails? It may help to cleanup the build directory after changing eg. BUILD_PROVIDER_TYPE_GTFS. - Dec 04 2012
That provider is working again in 0.11 alpha with more supported features and it also shows the delays (reads HAFAS XML instead of HTML now). - Dec 04 2012
Hi, sorry for not posting updating here.. But there's hope :)
Actually there has been a very silent 0.10 release in git. But it's not very usable, because most provider scripts in that version do not work any longer (changed HTML layouts..). I'm quite busy finishing the next version, which will have much better, faster and more stable support for HAFAS providers like de_db, along with a new QtScript API. It will no longer depend on HTML scraping, but uses XML sources (and even very small binary sources for journeys with more details).
I'll try to find enough time to release 0.11 soon :) - Oct 12 2012
I can easily make it possible for scripts to store values, maybe in another script object "storage". It will only loose it's stored data, when the accessor gets deleted, ie. when no more connections using it are open. But it's also possible to store that "storage" to disk.. Maybe I'll add both. But storage on disk should then have a lifetime.

QScript is really great.. Works like a charm :) I'll remove some other hacks I did to not crash scripts in Kross. For example the helper.matchTime() function will return a JavaScript Date object instead of an array with hour and minute values as integers. And I'll replace DepartureHour and DepartureMinute with DepartureTime (this is actually a relict of the times, where there were only XML files with regexps..). There will also be a DepartureDateTime to simply store a Date object.
Scripts can then write:
result.addData({ Target: 'target', DepartureDateTime: new Date(), VehicleType: 'bus' });

The "timetableData" script object can then be removed.

Another great new thing is that scripts will be able to publish data to visualizations before everything is parsed. Currently I let the first 10 departures be published automatically and then the rest.

Because everything is so easy with QScript I'll maybe add it to version 0.10... At least with script objects with a stable API, so that scripts don't need to be updated again to work with 0.11. - Nov 08 2011
Unfortunately Kross with KJS as JavaScript interpreter tends to crash sometimes. Especially the string returned by the new network.download() function produces crashes when it gets used in the script sometimes.. and without error message. Some conversion between QString and the KJS string objects are somehow wrong, I think.

But there is another possibility: Using QtScript. There is even the possibility to import Kross into QtScript, so you can execute eg. Python from within QtScript. And it should be faster than KJS. There could also be debugging in TimetableMate.
This will not make it into 0.10 but 0.11, too many changes are needed and I want to release 0.10 very soon now.
0.11 will also offer support for GTFS, will get an interesting release, I think :) - Nov 07 2011
Yes, that's better. I had something like that in mind for some time now. And now I have a working "prototype" :)

Currently it uses a new script function "getTimetable" if no template departure URL is given in the XML file. Scripts also got a new object named "network", which has a "download" function to synchronously download a document (and convert it to unicode). To not block the data engine (and plasma) while waiting for a network request to be executed, the script gets executed in a thread. That means, that KIO can't be used (not thread safe), so it uses QNetworkManager for downloading and lets the thread wait to finish the request using a QEventLoop.

With this some thing like this can be written in scripts:

function getTimetable( city, stop, dateTime, dataType, maxCount ) {
var url = "http://reiseauskunft.bahn.de/bin/bhftafel.exe/dn?rt=1" +
"&input=" + stop + "!" +
"&boardType=" + (dataType == "arrivals" ? "arr" : "dep") +
"&date=" + helper.formatDateTime(dateTime.toString(), "dd.MM.yy") +
"&time=" + helper.formatDateTime(dateTime.toString(), "hh:mm") +
"&maxJourneys=" + maxCount +
"&disableEquivs=no&start=yes&productsFilter=111111111";
var data = network.download( url );
parseTimetable( data );
}

This function works for de_db and calls the normal "parseTimetable" function with the downloaded data. It makes the scripts much more flexible, anything can be downloaded from the script.

Now I need to finish the new thread class for the scripts, add support again for journeys/stop suggestions and have scripts use this new method. Then I can remove some of the workaround functions :) - Nov 07 2011
Hm.. right TimetableMate only works with JavaScript.. Thanks for trying it out with Python :) I'll disable my JS parser if JS isn't used. I won't write another parser for Python or Ruby, so there will be a bit less support from TimetableMate. But I'll try to not let the JS parser get into the way of Python/Ruby devs.

"version" is for the version of the accessor, while "fileVersion" is for the version of the accessor's XML file structure. If you update your accessor, you can update the version in "accessor->general" and give a changelog entry in "accessor->changelog". I know it's a bit confusing.. And there is even the <?xml tag with another "version="1.0"" attribute.
Maybe TimetableMate should better offer a combobox for the "fileVersion" attribute.

More explanations about the XML files is available in the data engines documentation here: http://publictransport.horizon-host.com/doc/engine/0.10/page_accessor_infos.html. - Oct 31 2011
Oh sorry, I forgot to add the "-s" to the list of available options (only checked if "-s" is used). This time it should work ;) - Oct 24 2011
The missing file for the runner should be generated.. Maybe it helps to clean the build directory and retry compiling?

The language files are in /trunk/l10n-kde4/<CountryCode>/messages/playground-base/. There are libpublictransporthelper.po, plasma_runner_publictransport.po, plasma_applet_publictransport.po, plasma_engine_publictransport.po, plasma_applet_flights.po, plasma_applet_graphicaltimetableline.po, timetablemate.po. They are mixed in the directory with other language files for playground, but it's always those files currently. - Oct 24 2011
Ok, another updated script. This time with "su for localization.sh" and install.sh passes the -s argument to localization.sh. - Oct 24 2011
I updated the script, please download & try again - Oct 24 2011
I think I found out what was wrong with the install script (if "su" is used).
It missed double quotes around the command to be executed as root, ie. su -c "command word2".
Should work with the next version. - Oct 24 2011
Hi, thanks for the insight, I really don't know much about packaging.

I just added a global CMakeLists.txt in git master, which works, compiles everything without having to install the library first :) Some other little changes were necessary for this. Calligra was a good example.
I also turned off the unit tests by default.

But I think I cannot do much about the localization files for now. Maybe it gets easier if PublicTransport leaves playground? - Oct 23 2011
Hm.. after compilation of the library you should be asked for your root password, for the installation. Did you enter the password before the applet compilation started?
What distribution are you using? By default the script uses sudo for the installation. Maybe it helps to use su instead. - Oct 23 2011
That's because you didn't install "libpublictransporthelper" before compiling the applet.
I'm trying to find out how to get it compiling without having the library installed. Until then, first install the library, then everything else. The install script does it automatically. - Oct 23 2011
Thanks for the info, the bug was already reported to me and is now fixed in GIT master. - Oct 22 2011
One more thing: Are trying to package everything into one package? Then it may be easier to create a separate package for the library? You could also include the engine into that library-package and make the rest dependent on that package.

So there should be at least two packages:
- One for the library (and maybe the data engine, because it's also needed by all other components)
- One or more for the rest (applets, runner, timetablemate, ...), dependend on the first package

Does this make it easier?
The library still has to be installed to compile stuff for the "second package(s)". Isn't it always like this? - Oct 21 2011
Hm.. There is an "EXPORT" CMake command which I've been trying to use. But the headers of the library aren't found if they aren't installed.
I don't know if it's possible to use the headers of the library from it's build tree somehow. If I simply include the source directory of the library the headers aren't found because they are included with the prefix <publictransporthelper/...h>. And there may be conflicting file names.

Maybe someone with more experience in CMake can help?
- I want to link "libpublictransporthelper" from other components and make the headers available as mentioned above, without installing the library. - Oct 21 2011
I have such a CMakeLists.txt here http://pastebin.com/Vp3MRd47. I've written it some time ago, it accepts options to select components to be compiled (see contents).
But the library still needs to be installed first, because it's needed for the linker for the other components. The solution would be to use the not installed binaries of the library to link the components with the library. That should work, but I need to figure out how that works. - Oct 21 2011
Great to hear, thanks :)

And I now have a fix for the ch_sbb journey function! I needed to update the parsing script for journeys, here is the updated version of ch_sbb.js: http://pastebin.com/DsyNavAV.
Please try it out, if there are any bugs let me know. You need to replace the existing ch_sbb.js with the updated version, it is in /usr/share/kde4/apps/plasma_engine_publictransport/accessorInfos/ or a similarly named directory. You can also add the new script to ~/.kde/share/apps/plasma_engine_publictransport/accessorInfos/. Files in the home directory are used instead of the global ones.

To get more information about script errors like this, you can have a look at the accessor error log file: ~/.kde/share/apps/plasma_engine_publictransport/accessors.log. The scripts will print (hopefully) meaningful error messages there with the HTML where parsing failed.
The error message of the script tells us where in the script the error happened. The HTML code can then be used to check if the script tries to find strings that are not existent in the HTML code (any longer). Sometimes only little changes like an added attribute to an HTML element will break scripts, but they try to be tolerant for changes.

In the updated script for ch_sbb I changed the code that finds the journey result table and made it more tolerant for future changes. The journey details tables also needed to be changed. And some other updates.

You can also use TimetableMate to check scripts, it may give some helpful information on errors.
- Oct 21 2011
If they would have a GTFS feed with GTFS-realtime it would be very easy now ;) (at least with the development version).

To include delay information and journey news the parsing script needs to be updated accordingly. I'll definitely have a look at it when I have some time.. because I'm living in Bremen ;)
I've written an E-Mail to BSAG (the public transport agency for Bremen) some time ago if they could offer some public API, but no answer so far. - Oct 19 2011
That packages contains an outdated version: 0.8.3, current stable version is 0.9, next version 0.10 should be released soon.
You can use the installer script (Sources download) to download/compile/install version 0.9 or 0.10rc2. - Oct 18 2011
Hi,
it is now fixed in RC2 :) Please test again.
The solution was to replace a "qobject_cast" with "qgraphicsitem_cast".
- Oct 17 2011
Thanks for the info :)
It is fixed in Git master now.

The new version does not use KWebKitPart, but uses KWebView directly. The menu bar won't update when switching to the web tab, but everything else should work. - Oct 13 2011
Support for GTFS and GTFS-realtime will be in version 0.11 (maybe called 1.0). (GTFS) Service providers can then easily be added with a simple XML file, the only requirement is a valid GTFS feed. It will import the data into an SQLite database, so it will be fast and can be used offline :) But it may use some more space on the HDD, about 25 - 300MB.
Version 0.10 will be released soon, but without GTFS support, wait for 0.11 / 1.0. - Sep 19 2011
Even l10n does not contain any translations ;)

There is only a script to download the sources from the GIT repository, it can download eg. the last stable version (0.9) or the current 0.10 RC.
The l10n-script can then download translations from KDEs SVN.

I'll make it clear in the README, that there are no sources in the tarball. It's much easier for me this way, because the tarball does not need many changes and I can not forget files or include wrong versions ;) And it's not limited to the size limit on kde-look.org. For users/packagers it should make it easier to test new versions. - Sep 18 2011
Ok.. I was wrong ;) The header I thought I need to include, was the header for the systemtray Applet, ie. the applet, where the publictransport applet should be in. So I don't need to include it.
It's much simpler: Add the following line to applet / plasma-applet-publictransport.desktop:
X-Plasma-NotificationArea=true

Or wait, until I release the next version :)

It's working quiet nice here, good idea! - Aug 15 2011
I also updated to 4.7 and it still doesn't crash here (Kubuntu natty). I can't say more without more information unfortunately. - Jul 31 2011
No, it currently doesn't use any arguments. But I will add it :)

But the essential part of the script is mainly this line to download a single tarball with everything in it:
> git archive --format=tar --remote=git://anongit.kde.org/publictransport $version | gzip > publictransport_${version}.tar.gz (eg. version="unstable-0.10-rc1")

and this line to download a tarball for a specific component:
> git archive --format=tar --prefix=plasma_applet_publictransport/ --remote=git://anongit.kde.org/publictransport unstable-0.10-rc1:applet | gzip > plasma_applet_publictransport-0.10rc1.tar.gz (prefix is the name of the root directory inside the tarball, for another component/version the "unstable-0.10-rc1:applet" must be changed, eg. "unstable-0.10-rc1:engine" for the data engine)
- Jul 28 2011
You cannot switch the language of individual plasmoids (at least not via the GUI).
If there is no up-to-date german translation for a string, english is used. Many strings have been changed and need to be updated now. The applet is currently 60% translated to german (30% fuzzy / changed). That's why it's mostly english currently.

The alarm setting (how many mins before departure) is in the stop settings dialog (click on the "change" button). And in that dialog it's a bit hidden in the details section (there's a "details" button). - Jul 28 2011
I might have found the solution. Please try this:
- Open publictransport-git-clone-dir/libpublictransporthelper/tests/CMakeLists.txt
- Search for lines like this (one for PublicTransportHelperTest, one for PublicTransportHelperGuiTest):
target_link_libraries( PublicTransportHelper(Gui)Test
${KDE4_KDECORE_LIBS} ${QT_QTTEST_LIBRARY} ${KDE4_KDEUI_LIBS} publictransporthelper
)


- Add ${KDE4_PLASMA_LIBS} so that it looks like this:
target_link_libraries( PublicTransportHelper(Gui)Test
${KDE4_KDECORE_LIBS} ${QT_QTTEST_LIBRARY} ${KDE4_KDEUI_LIBS} ${KDE4_PLASMA_LIBS} publictransporthelper
)


I didn't notice, because it compiled just fine in Kubuntu natty.

Or disable unit test compilation, by removing this line from .../libpublictransporthelper/CMakeLists.txt
add_subdirectory( tests )
The unit tests aren't needed for eg. packages of course, I'll comment out that line so that it simply works. If someone then wants to run the tests, he/she just needs to remove the comment. - Jul 26 2011
Hm.. don't know where the "render glyph"-errors come from, I've never seen them so far.
Have you enabled the "plasma_engine_publictransport" checkbox in the "kdebugdialog" app? It may help to also enable "libplasma"/"plasma-desktop" there. Maybe that gives a bit more output.

What KDE version do you use, 4.6.5?

No other idea currently. Please tell me, if someone else on Arch gets the same crash (with old settings). - Jul 23 2011
Unfortunately not.. There's another class for plasma applets in the system tray (SystemTray::Applet), should be in the kdebase-workspace-dev package I think, but it isn't. - Jul 23 2011
I can't reproduce your crash..

Did you have the applet installed with debug symbols when the crash dialog was shown?

Have you tried to run plasma-desktop from a terminal to see it's output?

I have no idea what it could be.. The filter settings are the default settings ("Default" with a filter for unknown vehicles), is that correct? - Jul 22 2011
I can't find the needed header in Kubuntu, it should be /usr/include/systemtray/ui/applet.h or something like that, but it's nowhere..
But yes, that would be another good 'feature'. Should be easy to do.. but only with that header file. When I have more time again I'll try it on openSuse or I get the sources myself. - Jul 22 2011
Right, I meant the INSTALL file.
You need to have libpublictransporthelper installed, before compiling the applet. And it needs to be the rc1 version, not beta8. This installs the missing header file. - Jul 22 2011
1. (removing the plasma_engine_publictransport directory) shouldn't be needed.

I commited a possible fix, can you try it out? It's in the git repository in HEAD

> git clone git://anongit.kde.org/publictransport
> cd publictransport

Then go into the applet directory, create a build dir, and compile/install (see README, use the correct prefix for installation). Then the possibly fixed version should be installed, ready to get tested.




- Jul 22 2011
Hm.. I installed beta8, created some filter settings. Then I installed rc1 again and started the applet (in plasmoidviewer). But it didn't crash here. Can be send me your filter settings so that I can try it out?
And also search for a line starting with "filterConfigurationList=". Actually you should also remove that line to make it not crash for now. - Jul 22 2011
KrossWordPuzzle

Board 165 comments

Score 83%
83 Likes
17 Dislikes
Oct 31 2011
I just had the same mysterious crash. After cleaning up the build directory, recompiling and installing everything it was fine :)

The answer length can be adjusted with the blue bar after the last answer character. Then just fill in the correct answer by typing it in. Just as if you would fill an existing crossword. When in edit mode you edit the correct letters (the crossword's solution), otherwise you edit what you think is correct. Only the questions get filled in the dock and where to position the answer. - Nov 02 2011
Ok, now it accepts the danish characters. They can even be inserted from the context menu ;) It draws these characters as text now, but it will look strange with eg. the Scribble theme.

Most extra characters only have accents on normal characters, which are ignored in crosswords because otherwise it would be very hard to construct crosswords (Wikipedia tells me that eg. French does not need extra characters in crosswords, ie. É,È,Ê => E).

Some east european languages will have extra characters, which are needed in crosswords. Russian has a completely different character set. Hm.. and hebrew is even written right-to-left, but KrossWordPuzzle currently only supports left-to-right. So there's some more localization work to support all these languages. But at least for danish it's fine now :) - Nov 02 2011
The problem with allowing special characters is that only letters A-Z are themed and that not every special character makes sense in a crossword, eg. "" should be replaced with a simple "A". In german crosswords special characters are always substituted, eg. "Ä" => "AE" or "ß" => "SS".
But if the "æøå" characters are needed and used in danish crosswords I can allow them and add them to the theme files (three more characters isn't that much). If you know any other characters that might be needed for some other language let me know :)

What error message do you get when you try to download puzzles?
.puz-files should be shown in the file dialogs and the filter combobox should show "AcrossLite puzzle (*.puz)" (or something similar). I guess that the MimeTypes weren't recognized when you tried it. After a restart or after calling "kbuildsycoca4" it should work if everything is installed correctly. Maybe that also caused problems with the download.

And yes, when I have some time I'll change the layout of the game window again. I liked and copied the "tab-menu" idea from palapeli, which also switched back to having a default menu (but without possibility to hide the menu). I think I'll go for something like in dolphin. - Nov 02 2011
I updated the tarball to the current SVN version, there were some compilation fixes. Please test again.
A tarball with some translations is available here: http://publictransport.horizon-host.com/data/krosswordpuzzle-0.15.6.3-l10n.tar.gz (the link is now also in the description above).
Thanks - Oct 31 2011
Score 48%
48 Likes
52 Dislikes
Jan 30 2013
KDevelop

Developer Tools

Score 84%
84 Likes
16 Dislikes
Apr 20 2010
Scribus

Office

Score 86%
86 Likes
14 Dislikes
Aug 23 2009
Leo-like-icons-v8.5

Icon Themes

by III
Score 74%
74 Likes
26 Dislikes
Jan 26 2011
Oxygen Refit Black

Icon Themes

Score 77%
77 Likes
23 Dislikes
Jan 26 2011
Beslimed

Plasma 4 Widgets

Score 72%
72 Likes
28 Dislikes
Jan 25 2011
onet

Plasma 4 Widgets

Score 53%
53 Likes
47 Dislikes
Jan 25 2011