Quellcode durchsuchen

Moved cueconvert path to begining.

Removed whitespace.
Added main().
master
Svend Sorensen vor 19 Jahren
Ursprung
Commit
afb3a422a5
1 geänderte Dateien mit 9 neuen und 4 gelöschten Zeilen
  1. +9
    -4
      extras/cueconvert.cgi

+ 9
- 4
extras/cueconvert.cgi Datei anzeigen

@@ -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":
@@ -86,10 +88,10 @@ def convert(iformat, oformat, text):
errors = efile.read()
ofile.close()
efile.close()
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()

Laden…
Abbrechen
Speichern