Moved cueconvert path to begining.

Removed whitespace.
Added main().
This commit is contained in:
Svend Sorensen
2005-01-31 01:36:45 +00:00
parent 17a49ba8b7
commit afb3a422a5

View File

@@ -1,13 +1,15 @@
#!/usr/bin/env python #!/usr/bin/env python
# cueconvert.cgi - use HTML form to drive cueconvert # cueconvert.cgi - use HTML form to drive cueconvert
# ./cueconvert should be the cueconvert binary, or a link to it
import os import os
import cgi import cgi
# error reporting # error reporting
#import cgitb; cgitb.enable() #import cgitb; cgitb.enable()
# cueconvert path
CUECONVERT = "./cueconvert"
def print_form(iformat, oformat, text, errors): def print_form(iformat, oformat, text, errors):
# input format radio buttons # input format radio buttons
# one "" and one "checked" # one "" and one "checked"
@@ -66,7 +68,7 @@ def convert(iformat, oformat, text):
returns converted text, and any error messages""" returns converted text, and any error messages"""
command = "./cueconvert" command = CUECONVERT
# append flags to command # append flags to command
if iformat == "cue": if iformat == "cue":
@@ -89,7 +91,7 @@ def convert(iformat, oformat, text):
return text, errors return text, errors
if __name__ == '__main__': def main():
iformat = "cue" # input format iformat = "cue" # input format
oformat = "toc" # output format oformat = "toc" # output format
text = "" # input file content text = "" # input file content
@@ -106,3 +108,6 @@ if __name__ == '__main__':
iformat, oformat = oformat, iformat iformat, oformat = oformat, iformat
print_form(iformat, oformat, text, errors) print_form(iformat, oformat, text, errors)
if __name__ == '__main__':
main()