1 --- a/mwlib/rl/rlwriter.py Mon Nov 17 10:55:17 2008 +0100
2 +++ b/mwlib/rl/rlwriter.py Tue Nov 18 14:38:24 2008 +0100
3 @@ -250,8 +250,8 @@
4
5 if status_callback:
6 status_callback(status=_('layouting'), progress=0)
7 - #if self.debug:
8 - # debughelper.showParseTree(sys.stdout, bookParseTree)
9 + if self.debug:
10 + debughelper.showParseTree(sys.stdout, bookParseTree)
11
12 advtree.buildAdvancedTree(bookParseTree)
13 tc = TreeCleaner(bookParseTree, save_reports=self.debug)
14 @@ -263,7 +263,7 @@
15 self.articlecount = 0
16
17 if self.debug:
18 - debughelper.showParseTree(sys.stdout, bookParseTree)
19 + #debughelper.showParseTree(sys.stdout, bookParseTree)
20 print "*"*30
21 print "TREECLEANER REPORTS:"
22 print "\n".join([repr(r) for r in tc.getReports()])
23 @@ -1075,7 +1075,7 @@
24 except:
25 log.warning('img data can not be loaded - img corrupt: %r' % obj.target)
26 return []
27 -
28 +
29 (_w,_h) = img.size
30 del img
31 if _h == 0 or _w == 0:
32 @@ -1088,7 +1088,7 @@
33 w = aspectRatio / h
34 elif w==0 and h==0:
35 w, h = _w, _h
36 -
37 +
38 (width, height) = sizeImage( w, h)
39 if self.colwidth:
40 if width > self.colwidth:
41 @@ -1118,7 +1118,7 @@
42 else:
43 linkstart = ''
44 linkend = ''
45 - if is_inline:
46 + if is_inline:
47 txt = '%(linkstart)s<img src="%(src)s" width="%(width)fin" height="%(height)fin" valign="%(align)s"/>%(linkend)s' % {
48 'src': unicode(imgPath, 'utf-8'),
49 'width': width/100,