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