wmlscope: enabled image size checks

The undersized() function is supposed to warn if an image has a size below 60 x 60 pixels. I didn't manage to find any documentation about why it was commented out.
I also replaced the error message printed if the PIL library is missing with one more verbose and updated.
This commit is contained in:
Elvish_Hunter 2015-08-07 00:04:29 +02:00
parent 4d675c377f
commit 63863d9f2f

View file

@ -197,7 +197,10 @@ class CrossRefLister(CrossRef):
except IOError:
print("%s: PIL internal error" % filename, file=sys.stderr)
except ImportError:
print("Install Python Imaging Library to enable size check.", file=sys.stderr)
print("""Please install the Python Pillow Library to enable image size check.
You can download it from https://pypi.python.org/pypi/Pillow
On Debian and Ubuntu you can also type in a Terminal
sudo apt-get install python-pil""", file=sys.stderr)
def duplicates(self, exportonly):
"Dump duplicate unit IDs."
duplicate_latch = False
@ -481,7 +484,7 @@ Usage: wmlscope [options] dirpath
if definitions:
xref.deflist(predicate)
if unresolved:
#xref.undersized()
xref.undersized()
xref.unresdump()
xref.duplicates(exportonly=True)
except KeyboardInterrupt: