summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
cae8dca)
Signed-off-by: Sergey Satskiy <sergey.satskiy@gmail.com>
Signed-off-by: Olivier Matz <zer0@droids-corp.org>
# and display those directly.
# and display those directly.
-import sys, re, htmlentitydefs, getopt
+import sys, re, htmlentitydefs, getopt, StringIO
# minimum line size, we add a zero-sized breakable space every
# LINESIZE characters
# minimum line size, we add a zero-sized breakable space every
# LINESIZE characters
parse_input(input_file, output_file,
exclude_headers, show_hunk_infos)
parse_input(input_file, output_file,
exclude_headers, show_hunk_infos)
+def parse_from_memory(txt, exclude_headers, show_hunk_infos):
+ " Parses diff from memory and returns a string with html "
+ stream = StringIO.StringIO(txt)
+ parse_input(stream, stream, exclude_headers, show_hunk_infos)
+ return stream.buf
if __name__ == "__main__":
main()
if __name__ == "__main__":
main()