Index ¦ Archives ¦ RSS > Tag: en

Wrapped images in Word (LibreOffice RTF export)

Estimated read time: 1 minutes

I’ve got a report which turned out to be two separate issues. One is a regression from Go-OO 3.2.x, this post is about this part. The other part is about the improvement of both the import/export RTF filter, the bug has some detail on that part as well.

So the problem was that wrapped images (when the image is a frame and not a character) had some extremely small height. I did not notice this bug in LO as an LO-specific extension hides that value, but in Word you can see it:

http://vmiklos.hu/pic/fdo32613-before.png

The fix is to use the height of the containing frame instead of the height of the picture itself, then it’ll look fine:

http://vmiklos.hu/pic/fdo32613-after.png

HP vs. Hungary

Estimated read time: 1 minutes

/pic/hp-hungary.t.png

Yesterday I bought a HP LaserJet Pro P1566 printer. The device itself is nice, supported by foo2zjs, though of course that support is unofficial. I was curious what do they offer a "Linux support" on their website, since the case of the printer mentions Linux support. And I had to use the above picture to select my country.

  1. It’s Magyarország, not Magyarorság.

  2. The map of the country isn’t even close to reality, what are they smoking? ;)


LibreOffice vs. F13

Estimated read time: 1 minutes

http://vmiklos.hu/pic/lof13.png

About four days ago it has been asked on #libreoffice if it’s possible to bind functions to F13..F16 in Calc. The short answer is no, but it turned out it’s pretty trivial to allow that (and of course not only in Calc).

Cedric’s great post is helpful here to find the relevant code. It also truned out that VCL already supports those keys, so only the user interface has to be improvied to export that feature.

The patch is here.


systemctl now supports auto-paging

Estimated read time: 1 minutes

If you use systemd, you know systemctl. That’s the command that controls systemd: you can use it to start, stop or list (and so on) services. Now in case you use list, there is a lot of output, probably it won’t fit your screen. git already invented auto-paging, which means it’ll feed its output to a pager if the output is more than a screen, for example when using git log. With my recent commit this now the case with systemctl as well. :)


bitlbee-skype now supports groups

Estimated read time: 1 minutes

I released bitlbee-skype 0.9.0 today. The last feature that triggered the relase born in git during the last two days: now it reads and writes Skype group info. This means if you have a Skype group "work", then you can just /j &work to see work contacts only, and /invite also works in that channel as expected.

More in the BitlBee wiki and in the NEWS file.


CSP

Estimated read time: 1 minutes

CSP, as in Constraint satisfaction problem. A while back I wrote a custom sudoku solver in Erlang, and now I hit something similar. Of course, since then I learned that there are nice CSP engines, so this time I did not try to write my own. :)

First, I checked out python-constraint, and then I sticked with it, as it fulfilled my needs.

So, the problem. Here is a Christmas tree:

/pic/csp.t.png

The tree has 4 chains, each one contains 7 items. A few ones already has a number. The exercise: number the empty items with numbers between 1 and 7 so that:

  • Each chain contains the numbers 1..7 exactly once.

  • All the horizontal and diagonal lines cannot contain the same number twice.

A possible solution is here. If you get less or more than one solution, you did something wrong. :) (I’m not pasting here the output of the script to leave some exercise for the readers. ;) )

Note
As an experiment this time I draw the image using TikZ. Based on these ideas I converted the source to PNG using tikz2png.

Systemd: kernel, bluetooth, bitlbee

Estimated read time: 1 minutes

  • Finally I can run systemd on my desktop, and not in a virtual machine only, since there is a patch for the sched/cgroup issue I had. It was not a systemd bug, but systemd triggered a kernel issue, which was hidden so far.

  • I just updated our bluez package, and bus activation works fine. This means bluetoothd is not started till somebody connects to it. Given that I sometimes do not log in to KDE to use kbluetooth, but just want to do something on the console, where having bluetoothd running is totally unnecessary, I consider this really nice.

  • It came up on #bitlbee that there is a Fedora bug where they ask for systemd unit files for BitlBee. So I created a patch, and the nice thing is that the second iteration now seems to be fine for Frugalware/Fedora/Debian, so we managed to build something cross-distro here. (I think I mentioned that’s the #1 feature I like in systemd.)


pcal

Estimated read time: 1 minutes

I wanted to create some calendar present for Christmas in the family with pictures and Hungarian year / month order, national holidays, etc.

After looking at a few solutions, pcal seemed to be the best choice.

There are 3 key points here:

  • The order of the year / month can be changed only in build-time. If your locale has "year month" and not "month year" order, then you need this patch.

  • You need some config for each locale, here is mine, containing the Hungarian national holidays.

  • Finally you need a script like this to put in the pictures.

The result fully localized, free software, contains my custom images and support custom marks for days using a quite flexible syntax.

(Let me know if you know some other project where you can set the year/month order runtime and the result can be still generated from a script, ie. it’s not some LibreOffice or similar template. ;) )


idl2dot

Estimated read time: 1 minutes

I needed a tiny tool to generate something classdiagram-like from CORBA IDL files. Given that I did not find such a tool, I wrote it.

You can find it here.

An example: idlscalable output.

Note
Right now it does not support typedefs, enums and exceptions. If you need such a feature, patches are welcome. :)

Systemd Podcast

Estimated read time: 2 minutes

I just found this podcast, it’s a bit dated since it happened in August and things have been improved a bit since then, but still I was happy to listen it. (The interesting part starts at 1:10:50; 17 minutes.)

I already had a short post about systemd, and I mentioned the killer feature for me is the compact distro-independent service file (initscript for sysvinit) format it uses, since even if the initscript format we use in Frugalware right now is mostly bullshit-free, it’s still more bloated than the systemd service files.

Now back to why I began writing this post. :) So there is the post about systemd, but it’s rather long, and it’s easy to miss the point. Since the previous post, I think there are a few more killer features in systemd:

  • Every service is started in a separate control group (cgroup). Do you remember the situation when you wanted to know who the hell started a given particular process? This is typically a problem if the process is running as root. Now this is no longer a problem, systemd-cgls will show you if it was started by a user or a given service, etc. (Yes, I consider this a security feature.)

  • Upstart already had this "restart if it crashed" feature, but systemd does it better: if the daemon supports socket activation, then messages sent to the socket are buffered by the kernel, and no message will be lost during the restart.

  • systemd provides this on-demand feature, which is pretty much like inetd, so hopefully we can get rid of inetd, which was a constant problem previously. (We inherited a fork of the OpenBSD inetd from Slackware, and being a fork it did not improve since years, causing a constant problem.)

Why writing this post today? Because this morning systemd appeared in -current, so you can even try it out without installing any unofficial package.

© Miklos Vajna. Built using Pelican. Theme by Giulio Fidente on github.