summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2012-09-16 22:59:20 +0200
committerFlorian Bruhin <git@the-compiler.org>2012-09-16 22:59:20 +0200
commit75d317be8544e7cdaa8340f4e64379ade460bae7 (patch)
tree053edb42ae63b6e7df35745f69b083aa402396ea
parenta88d31b326f5fe2e21685d8dddb223066c71fa67 (diff)
downloadxojgrep-75d317be8544e7cdaa8340f4e64379ade460bae7.tar.gz
xojgrep-75d317be8544e7cdaa8340f4e64379ade460bae7.zip
Start enumeration at 1
-rw-r--r--xojgrep.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/xojgrep.py b/xojgrep.py
index c264e45..776933f 100644
--- a/xojgrep.py
+++ b/xojgrep.py
@@ -84,7 +84,7 @@ class XOJFile:
def getcontent(self):
content = []
# TODO check if that works with a xournal file without texts
- for (pn, page) in enumerate(self.tree.xpath('/xournal/page')):
+ for (pn, page) in enumerate(self.tree.xpath('/xournal/page'), 1):
pagecontent = []
texts = page.xpath('//text')
for text in texts:
@@ -122,7 +122,7 @@ class TXTFile:
def getcontent(self):
content = []
- for (ln, line) in enumerate(self.txtfile):
+ for (ln, line) in enumerate(self.txtfile, 1):
content.append((ln, [line]))
return content