lundi 14 novembre 2016

Paperwork for Windows

I've finally completed the portage of Paperwork to Windows \o/

For some times, I've been wondering whether it would be possible for me to make money with Paperwork. It would give me more time to work on it, and let's be honest, more time for other weird projects :)

During this time, a recurrent request I got was a Windows version of Paperwork. This is something I was reluctant to do until recently. There were philosophical reasons (free software rocks, proprietary software su**s, etc), and more pragmatic reasons (developing on Windows is a pain i* t** a**).

But then I wondered, what if I could kill two birds with one stone ? The basic idea is making a Windows version and ask for money in exchange. Donations or payment, I don't care as long as it's worth spending time on it. Also, I had to keep in mind Paperwork is released under GPLv3.

So I've chosen a weird on unusual approach. I've decided:

  • To implement a trial period in Paperwork to give people time to try it.
  • For when it expires, to implement a cruel and usual DRM. My inspiration was the Chocolate editor. I think it's a good compromise. It let users keep using Paperwork, while making it clear the project need money to evolve. However, I haven't checked yet if the Geneva convention allows that .. maybe I should ...
  • To implement an activation key system. It's kind of crap. I guess anybody with basic cryptographic skills can break it in 30 seconds. Anyway, it isn't designed to be foolproof, quite the opposite actually.
  • To let people choose themselves the price. If they want, they can decide to pay 1€ (or 1000€ .. a man can dream, no ? :) )

As stated previously, I did my best to respect the GPLv3. As usual, the code source is still entirely available, and even the crappy DRM is opensource. I sent an email to license@fsf.org to be sure that was I was about to do is really authorized by the GPLv3. A volunteer told me that yes, GPLv3 allows explicitly the inclusion of DRM, as long as all the elements required to disable or modify it are provided. Please note that he also clearly insisted that what they say has no legal value,

I also made a nice website to sell Paperwork (well I tried to make it nice anyway), and a NSIS web-installer. For now, both are closed-source. I'm still considering opening them at some point.

The result can be found here.

As expected, portage to Windows was painful. The most complex part was porting Pyinsane. Scanner access is entirely different between GNU/Linux and Windows. I had to make a full implementation of the Pyinsane API for WIA (Windows Image Acquisition) and change a few things in the API. I switched the version to 2.x and published the module as 'pyinsane2'. I didn't find any existing implementation on Pypi, so I guess I'm the first to make one :). As with Sane, the problem is now to figure out whether I've been able to support all the scanners in world or not (unlikely :P).

I also had a lot of fun (irony) juggling with Python versions, Windows compiler versions, Gtk versions, architectures, etc. I did my best to build Python wheels for Pyinsane. I've been able to make a wheel for Python 3.4 64 bits, but I'm still unable to make a wheel for Python 3.5 32 bits (don't ask me why ...).

There are also some annoying GTK bugs specific to Windows : cmd windows popping up and disappearing immediately sometimes, Gtk.show_uri() that crashes the program or does nothing at all (meaning all GtkLinkButtons are broken), etc. But all in all, I think it remains fairly usable.

In conclusion, I only have one thing to say : If you don't use Visual Studio (and I don't), developing on Windows is an horrible and painful mess.

dimanche 24 janvier 2016

Git dumb protocol

Git supports various protocols. One of them is called the "dumb" protocol.

This dumb protocol is based on HTTP+Webdav. There is also a smart protocol, but this one is not really HTTP compliant (it starts as HTTP for an handshake, but then switches to a custom protocol).

The dumb protocol is really handy in scenarios where you can only expose a Git repository through standard HTTP+WebDav. For instance, if you have a firewall in front of your webserver. Or if you want to implement a "fake" Git repository using a standard web framework (Django for instance).

Lire la suite

mardi 1 septembre 2015

Git, MariaDB et Python3

Pour un projet perso top secret, je me suis retrouvé dans une situation où je souhaitais être capable de :

  • stocker un grand nombre de petits dépôts Git
  • les avoir en haute-disponibilité (99.9% d'uptime)
  • encaisser une forte charge en lecture sur ces dépôts
  • être capable de monter en charge verticalement mais aussi horizontalement rapidement si besoin est
  • toujours avoir un contenu apparent cohérent : Quand on fait un push sur une des machines du cluster et qu'on enchaîne sur un pull depuis une autre, il faut que le contenu du push soit systématiquement apparent
  • accéder et manipuler ces dépôts depuis un programme en Python 3.

Autrement dit, il me fallait essentiellement un moyen de répliquer des dépôts Git sur plusieurs machines efficacement.

Lire la suite

samedi 5 octobre 2013

L'obsolescence programmée

piece_of_crap.jpg

Hier soir, mon scanner m'a laché. Dans ce genre de situation, j'ai pris le réflexe d'ouvrir l'engin pour voir si je ne peux pas le réparer moi même. Pour le coup, j'ai pu constater que le fabriquant (HP) a été radin sur plusieurs points et que cette panne serait arrivée tôt ou tard.

Lire la suite

dimanche 25 août 2013

Synchronizing files and directories from GNU/Linux to Android

In the long term, I plan to port Paperwork to Android. Before that, there is one problem : how to keep a synchronized copy of all the scans on an Android devices ?

Lire la suite