musicbrainz/picard — pull request #136 by zas (2013-06-28 10:56:19+00:00)
Title: Improve resources tools

Improve compile.py and add makeqrc.py script to generate picard.qrc from images/ contents.
Use the same code for setup.py build_ui option.

Examples of usage:
```sh
zas@Ifrit3 ~/src/picard/resources $ ./makeqrc.py
1 images newer than /home/zas/src/picard/resources/picard.qrc found
File /home/zas/src/picard/resources/picard.qrc written, 50 images
zas@Ifrit3 ~/src/picard/resources $ ./compile.py
compiling /home/zas/src/picard/resources/picard.qrc -> /home/zas/src/picard/picard/resources.py
```

----

```sh
zas@Ifrit3 ~/src/picard $ rm resources/picard.qrc
zas@Ifrit3 ~/src/picard $ python resources/makeqrc.py
50 images newer than /home/zas/src/picard/resources/picard.qrc found
File /home/zas/src/picard/resources/picard.qrc written, 50 images
```

----

```sh
zas@Ifrit3 ~/src/picard $ python setup.py build_ui
running build_ui
1 images newer than /home/zas/src/picard/resources/picard.qrc found
File /home/zas/src/picard/resources/picard.qrc written, 50 images
compiling /home/zas/src/picard/resources/picard.qrc -> /home/zas/src/picard/picard/resources.py
```