PySensors now under LGPL

I’ve got an email asking why PySensors, a Python binding to libsensors, is released under the GPL. It was because it was written to use the two latest libsensors APIs (3 and 4) and the shared library for the next to last API version is GPL licensed.

The latest API was introduced in 2010 and the libraries for that are dual licensed: GPL or LGPL. So I decided supporting only the latest API version and relicensing the Python bindings to LGPL.

Removing the code for API 3 made the package much simpler. Before there was the __init__ module wich imports common stuff for both APIs and a sub module for each API version. The api3 module is gone now, and contents of common and api4 moved into the __init__ module.

Changes in package structure (red=deleted, gray=moved):

digraph changes { node [shape=box]; edge [dir=none];  "sensors"; subgraph {     rank=same;      "__init__";     "api3" [color=red];     "api4" [color=gray];     "common" [color=gray];     "cli";     "stdc"; }  "sensors" -> "__init__"; "sensors" -> "api3" [color=red]; "sensors" -> "api4" [color=gray]; "sensors" -> "common" [color=gray]; "sensors" -> "cli"; "sensors" -> "stdc";  "api4" -> "__init__" [color=gray, dir=forward]; "common" -> "__init__" [color=gray, dir=forward]; }

rtar.py version 0.4.0

More than nine years passed since I touched the source code of this tool. I still use it on a regular basis and needed/wanted LZMA compression as this has found its way into GNU tar for some time now.

After all this time only Python 2.7 is supported as older 2.x versions are obsolete or at least fading from general use. I feel sorry for the poor souls stuck on CentOS systems. ;-)

Head over to the project page for more information or downloading the tool.

Table of contents in Tinkerer blogposts

While upgrading the blog software used for this blog I wanted to fix a problem with table of contents (TOC) within blog posts. Activating a TOC with just this reStructuredText directive:

.. contents::

leads to a problem with the headline of the post on the home page. Because it will already become a local link to the entry in the TOC it won’t work as a link to the posts page anymore. Not even the link to the TOC does work if it is not on the home page because only the introduction part or teaser is displayed there because blog posts with TOC usually tend to be looong posts.

So I opened Issue #23 at the Github project and got the following snipped as workaround:

.. contents::
    :depth: 2
    :local:

This excludes the title from the TOC leaving it ”free” to use as link to the blog post itself. Thanks to Christian Jann for this solution.

So can you expect more long posts from me in the future? Well there is at least one in the drafts folder, but it still needs some polishing. So don’t hold your breath…