fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Added small test code to dcparser.
[wolnelektury.git]
/
lib
/
dcparser
/
dcparser.py
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)
+
+if __name__ == '__main__':
+ import sys
+
+ info = parse(sys.argv[1])
+ for attribute, _ in BookInfo.mapping.values():
+ print '%s: %r' % (attribute, getattr(info, attribute, None))
+