summaryrefslogtreecommitdiff
path: root/extras/pretty_text.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2012-01-16 16:21:38 -0600
committerBryan Bishop <kanzure@gmail.com>2012-01-16 16:21:38 -0600
commit8dc5ba8315a9b275b12668ca039cabe6f9c6824a (patch)
treef3817e2dd30f1836b6c32bf56ac7e934e4dcded4 /extras/pretty_text.py
parent40c2ce0bec2cc31425069ae6134fb3078f07b17a (diff)
pretty_text - print out texts from command line
hg-commit-id: 918000556f93
Diffstat (limited to 'extras/pretty_text.py')
-rw-r--r--extras/pretty_text.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/extras/pretty_text.py b/extras/pretty_text.py
new file mode 100644
index 00000000..6d0cb61d
--- /dev/null
+++ b/extras/pretty_text.py
@@ -0,0 +1,19 @@
+#!/usr/bin/python
+#author: Bryan Bishop <kanzure@gmail.com>
+#date: 2012-01-16
+from optparse import OptionParser
+from analyze_texts import text_pretty_printer_at
+
+def main():
+ usage = "usage: %prog address label"
+ parser = OptionParser(usage)
+ (options, args) = parser.parse_args()
+ if len(args) != 2:
+ parser.error("we need both an address and a label")
+ address = int(args[0], 16)
+ label = args[1]
+
+ text_pretty_printer_at(address, label)
+
+if __name__ == "__main__":
+ main()