Last week I have been in Barcelona at the KDevelop / Kate sprint with all the other nice people working on those projects. As always, it was very cool to meet everyone again and spend a week together improving software. A big thanks to the organizers and sponsors, too!
Since most of the time I work on a fairly encapuslated subsystem (Python support for KDevelop) and only a smaller part of my contributions goes towards the KDevelop / Kate core repositories, I don't have any world-changing news to announce -- unlike for kate and KDevelop, no Qt5 / KF5 porting is happening yet in Python support. It doesn't make much sense to start porting until all the interfaces have stabilized.
Still, quite some interesting things have piled up in the last few months, and especially during the sprint.
In the following, I want to give a quick summary of those.
Sunday, January 26, 2014
Tuesday, October 29, 2013
kdev-python update: version 1.5.2 released
I'm happy to announce the availability of a second stabilization update for the 1.5 series of kdev-python, the Python language support plugin for the KDevelop development environment. See the 1.5 announcement for more information.
Changes in this release (relative to 1.5.1):
There will be a larger update containing various cool new features in a few weeks, so stay tuned!
kdev-python version 1.5.2
http://download.kde.org/stable/kdevelop/kdev-python/1.5.2/src/kdev-python-v1.5.2.tar.xz.mirrorlist
SHA256:84ae7015623a3848b1c1ce8e8f958c32778e9ba0afafa3ea3b3dd70687e1fe40
The kdev-python 1.5 series is compatible with KDevelop 4.5 (kdevplatform 1.5) and is suitable for working with Python 2.x source code.
If you're only interested in using (as opposed to packaging or developing) kdev-python, you should consider installing kdev-python from your distribution's package manager instead of downloading the source code.
http://download.kde.org/stable/kdevelop/kdev-python/1.5.2/src/kdev-python-v1.5.2.tar.xz.mirrorlist
SHA256:84ae7015623a3848b1c1ce8e8f958c32778e9ba0afafa3ea3b3dd70687e1fe40
The kdev-python 1.5 series is compatible with KDevelop 4.5 (kdevplatform 1.5) and is suitable for working with Python 2.x source code.
If you're only interested in using (as opposed to packaging or developing) kdev-python, you should consider installing kdev-python from your distribution's package manager instead of downloading the source code.
![]() |
| kdev-python running in KDevelop master |
- Fix a bug which led to the PEP8 checker running on non-python files in some cases
- Properly support unicode docstrings (thanks to Alexandr Zamaraev)
- Fix a crash in code completion which happened in some rare cases
- Fix a crash which could happen when a list comprehension was used as the default value for a function parameter
There will be a larger update containing various cool new features in a few weeks, so stay tuned!
Labels:
kdev-python,
planetkde,
planetpython,
release,
stable
Monday, October 28, 2013
kte-collaborative 0.2: First stable release of the collaborative text editing project
I'm pleased to announce the first stable release of kte-collaborative, which provides collaborative text editing in kate through kde-telepathy, and an update to the libqinfinity library.
There have not been many noteworthy user-visible changes since the last beta release, so please to refer to the 0.2 beta announcement for more information. As always, please report any bugs you find to bugs.kde.org!
libqinfinity version 0.5.2:
http://download.kde.org/stable/libqinfinity/0.5.2/src/libqinfinity-v0.5.2.tar.xz.mirrorlist
SHA256: 739f99afb7fd464e4b541e2980e07911c8f30924f9871f14294dc3148137825a
kte-collaborative version 0.2.0 (aka 0.2):
http://download.kde.org/stable/kte-collaborative/0.2.0/src/kte-collaborative-v0.2.0.tar.xz.mirrorlist
SHA256: 06c8cfb16b93a8fe3c5e2267ba3f71110526966267f73fed20a902c3f7982a55
kte-collaborative 0.2 depends on kde-telepathy 0.7 beta or later, and works with libinfinity 0.5.x.
http://download.kde.org/stable/libqinfinity/0.5.2/src/libqinfinity-v0.5.2.tar.xz.mirrorlist
SHA256: 739f99afb7fd464e4b541e2980e07911c8f30924f9871f14294dc3148137825a
kte-collaborative version 0.2.0 (aka 0.2):
http://download.kde.org/stable/kte-collaborative/0.2.0/src/kte-collaborative-v0.2.0.tar.xz.mirrorlist
SHA256: 06c8cfb16b93a8fe3c5e2267ba3f71110526966267f73fed20a902c3f7982a55
kte-collaborative 0.2 depends on kde-telepathy 0.7 beta or later, and works with libinfinity 0.5.x.
![]() |
| kte-collaborative 0.2, with dolphin listing some files from gobby.0x539.de and editing a file in kate. |
Labels:
collaborative,
kde-telepathy,
ktexteditor,
planetkde
Wednesday, October 23, 2013
Advanced code completion filtering in kate / KDevelop
I have implemented two new ways to filter the code completion popup in kate: filtering the list using an abbreviation, and filtering the list using text not occuring at the word's beginning. This can probably best be demonstrated by lots of pictures:
This feature is not specific to kdev-python, it works in all kate-based apps. It is available in kate's master branch, and will be available in KDE SC >= 4.12.
If you have more suggestions or cases which are not handled well, I'm happy to discuss this further. Have fun hacking!
P.S. If anyone can come up with an efficient algorithm for doing what is depicted in the last image, I'd be interested. The current one is quite slow for some corner cases.
![]() |
| You can match completion items by their abbreviation. This works for both camel case and underscore notation. |
![]() |
| The abbreviation expansion engine also allows you to type parts of the words from the abbreviation, making your search more specific in a convenient way. |
If you have more suggestions or cases which are not handled well, I'm happy to discuss this further. Have fun hacking!
P.S. If anyone can come up with an efficient algorithm for doing what is depicted in the last image, I'd be interested. The current one is quite slow for some corner cases.
Sunday, October 6, 2013
Extracting text from Photoshop (PSD) images
I just needed to grab text from some Photoshop images and put it into a LaTeX document. But, how do I get that text on Linux? GIMP can't do it, nor can any other program I tried (they all rasterize the text). Fortunately the text is just saved in plain in the .psd file, so it's relatively easy to get it out of there. However it's in utf-16, so with just grep it's quite painful. Here's a little Python script which finds and decodes text from psd images (inline version below).
You use it by passing it the .psd file, and the beginning of the text you want to find, and it'll give you the rest.
Inline source code:
python psdtextextract.py myimage.psd "This is"will result in "This is a text layer." if that's the text your layer indeed contains. To find a sample of the text you can use any image viewer such as gwenview. Quite stupid, I know, but it works ;)
Inline source code:
#!/usr/bin/env python
# -*- coding:utf-8 -*-
from codecs import encode, decode
def get_next_occurence(text, buf, start):
text = encode(text, "utf-16")[2:] # cut BOM
index = buf.find(text, start)
if index == -1:
return b"", -1
end = buf.find(b'\x00\x00', index)
if end == -1:
return b"", -1
chunk = b'\x00' + buf[index:end + 2]
return chunk.replace(b'\x5C', b''), end
def get_all_occurences(text, buf):
start = 0
items = []
while start != -1:
try:
found, start = get_next_occurence(text, buf, start)
items.append(decode(found, "utf-16be").replace('\r', '\n'))
except UnicodeDecodeError as e:
continue
print(" - undecodable match skipped:", e)
return items
if __name__ == '__main__':
import sys
if len(sys.argv) > 4 or len(sys.argv) < 3:
print("Usage: psdtextextract.py file.psd pattern [display-all-matches]")
with open(sys.argv[1], 'rb') as f:
items = get_all_occurences(sys.argv[2], f.read())
if "display-all-matches" not in sys.argv:
print(items[0])
else:
for item in items:
print(item)
Tuesday, September 24, 2013
Collaborative text editing: 0.2 beta release and end of GSoC
After three months and 430 commits introducing 23165 changes (line insertions/removals; in the kte-collaborative repository, plus about 50 more commits in kde-telepathy and libqinfinity), the beta release I hereby announce marks the end of my Google Summer of Code project, which consisted of implementing collaborative text editing in KTextEditor (see previous).
For more general information about the project, make sure to also have a look at the user manual, which has some in-depth explanations on how things work.
First, the technical stuff:
For more general information about the project, make sure to also have a look at the user manual, which has some in-depth explanations on how things work.
First, the technical stuff:
libqinfinity version 0.5.1:
http://download.kde.org/stable/libqinfinity/0.5.1/src/libqinfinity-v0.5.1.tar.xz.mirrorlist
SHA256: bcfeb899921057cf4e7f393c48ca6b4f7e3ee21c64c783f692a5af48118755ad
kte-collaborative version 0.1.80 (aka 0.2 beta 1):
http://download.kde.org/unstable/kte-collaborative/0.1.80/src/kte-collaborative-v0.1.80.tar.xz.mirrorlist
SHA256: 2679611900796be86af8fc84a5f90bb76fedff715f29d4530ed5ccf982c3fe03
kte-collaborative depends on kde-telepathy 0.7 beta or later.
Now, read on for the more interesting things!http://download.kde.org/stable/libqinfinity/0.5.1/src/libqinfinity-v0.5.1.tar.xz.mirrorlist
SHA256: bcfeb899921057cf4e7f393c48ca6b4f7e3ee21c64c783f692a5af48118755ad
kte-collaborative version 0.1.80 (aka 0.2 beta 1):
http://download.kde.org/unstable/kte-collaborative/0.1.80/src/kte-collaborative-v0.1.80.tar.xz.mirrorlist
SHA256: 2679611900796be86af8fc84a5f90bb76fedff715f29d4530ed5ccf982c3fe03
kte-collaborative depends on kde-telepathy 0.7 beta or later.
Sunday, August 25, 2013
Collaborative text editing in KTextEditor and kde-telepathy: Preview release
We have decided that kte-collaborative (the "Collaborative text editing in KTextEditor via kde-telepathy" project -- see previous) is ready for a first release! This release is explicitly flagged as "preview" and might not be suitable for daily use just yet. There are still some known problems; the release is meant as an invitation to curious users to test the program and tell us about any problems they encounter.
Release tarballs:
Release tarballs:
- libqinfinity: http://download.kde.org/stable/libqinfinity/0.5.0/src/libqinfinity-v0.5.0.tar.xz.mirrorlist (sha256: dcd044b6f21a0356b4a95fedc778def4543e8b45b153c7256cce222a49394d07)
- kte-collaborative: http://download.kde.org/unstable/kte-collaborative/0.0.95/src/kte-collaborative-0.0.95.tar.xz.mirrorlist (sha256: 37026b8bcfd4469243dd694f4e62aa19601416792bdb8c184453715fe950ab71)
Labels:
collaborative,
gsoc,
ktexteditor,
planetkde,
release
Subscribe to:
Posts (Atom)




