fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
84857c8
)
Added small test code to dcparser.
author
Marek Stępniowski
<marek@stepniowski.com>
Sat, 6 Sep 2008 13:34:59 +0000
(15:34 +0200)
committer
Marek Stępniowski
<marek@stepniowski.com>
Sat, 6 Sep 2008 13:34:59 +0000
(15:34 +0200)
lib/dcparser/dcparser.py
patch
|
blob
|
history
diff --git
a/lib/dcparser/dcparser.py
b/lib/dcparser/dcparser.py
index
7d43862
..
7880090
100644
(file)
--- a/
lib/dcparser/dcparser.py
+++ b/
lib/dcparser/dcparser.py
@@
-111,3
+111,11
@@
class BookInfo(object):
def parse(file_name):
return BookInfo.from_file(file_name)
def parse(file_name):
return BookInfo.from_file(file_name)
+
+if __name__ == '__main__':
+ import sys
+
+ info = parse(sys.argv[1])
+ for attribute, _ in BookInfo.mapping.values():
+ print '%s: %r' % (attribute, getattr(info, attribute, None))
+