Removed XML output from version module.

Instead of directly supporting the version module, XML and HTML output will
instead always output a version string somewhere to indicate with what
version of gitinspector the output was generated.
This commit is contained in:
Adam Waldenberg 2013-03-11 00:12:35 +01:00
parent 3e8d6434e8
commit 267a00dae4
2 changed files with 2 additions and 12 deletions

View File

@ -104,9 +104,7 @@ if __name__ == "__main__":
elif o in("-r", "--responsibilities"):
__run__.responsibilities = True
elif o in("--version"):
format.output_header()
format.call_output_function(version.output_html, version.output_text, version.output_xml)
format.output_footer()
version.output()
sys.exit(0)
elif o in("--grading"):
__run__.include_metrics = True

View File

@ -28,13 +28,5 @@ from __future__ import print_function
__version__ = "0.1.0"
def output_html(string, _):
print("HTML output not yet supported.")
def output_text():
def output():
print("gitinspector {0}\n".format(__version__) + __doc__)
def output_xml():
license_text = "\t\t" + __doc__.replace("\n", "\n\t\t")
print("\t<version>" + __version__ + "</version>\n" +
"\t<license-text>\n" + license_text + "\n\t</license-text>")