aboutsummaryrefslogtreecommitdiffstats
path: root/src/trim.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-05-13 05:22:44 +0200
committerMattias Andrée <maandree@operamail.com>2013-05-13 05:22:44 +0200
commit6eccd04fbb8f60fae8c6137dfc51ddfdec4a029c (patch)
treed81710ea1ae2435bea5726aa030e6c0dd682e7bb /src/trim.py
parentkeep font (diff)
downloadsplashtool-6eccd04fbb8f60fae8c6137dfc51ddfdec4a029c.tar.gz
splashtool-6eccd04fbb8f60fae8c6137dfc51ddfdec4a029c.tar.bz2
splashtool-6eccd04fbb8f60fae8c6137dfc51ddfdec4a029c.tar.xz
more trimming
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/trim.py')
-rwxr-xr-xsrc/trim.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/trim.py b/src/trim.py
index c0824da..47578d9 100755
--- a/src/trim.py
+++ b/src/trim.py
@@ -20,6 +20,7 @@
text = False
+firsttext = True
while True:
try:
@@ -40,11 +41,14 @@ while True:
if lower.startswith('text '):
text = True
- print(line)
+ if firsttext:
+ print(line)
elif lower == 'endtext':
text = False
- print(line)
- elif text or (lower.split(' ')[0] in ('timeout', 'menu', 'label', 'font')):
+ if firsttext:
+ print(line)
+ firsttext = False
+ elif (text and firsttext) or (lower.split(' ')[0] in ('timeout', 'menu', 'font')):
print(line)
except:
break