diff --git a/webservice/picclservice/picclservice.py b/webservice/picclservice/picclservice.py index 775b34f..2f39dc9 100644 --- a/webservice/picclservice/picclservice.py +++ b/webservice/picclservice/picclservice.py @@ -404,6 +404,9 @@ BooleanParameter('parser','Dependency Parser',"Dependency parser (for Dutch only!)", default=False), BooleanParameter('chunker','Chunker / Shallow-parser Parser',"Chunker / Shallow parser (for Dutch only!)", default=False), ]), + ('Debug', [ + BooleanParameter('debug',"Enable extra debug output (make sure to delete the project after you are done!)", default=False), + ]), #('Focus Word Selection', [ # IntegerParameter('minlength','Minimum Word Length','Integer between zero and one hundred',default=5,minvalue=0, maxvalue=100), #old ticcl -x # IntegerParameter('maxlength','Maximum Word Length','Integer between zero and one hundred',default=100,minvalue=0, maxvalue=100), #old ticcl -y diff --git a/webservice/picclservice/picclservice_wrapper.py b/webservice/picclservice/picclservice_wrapper.py index 7ba111f..03c96b1 100755 --- a/webservice/picclservice/picclservice_wrapper.py +++ b/webservice/picclservice/picclservice_wrapper.py @@ -48,6 +48,7 @@ print("System default encoding: ", sys.getdefaultencoding(), file=sys.stderr) + #If you make use of CUSTOM_FORMATS, you need to import your service configuration file here and set clam.common.data.CUSTOM_FORMATS #Moreover, you can import any other settings from your service configuration file as well: @@ -56,6 +57,10 @@ #Obtain all data from the CLAM system (passed in $DATAFILE (clam.xml)), always pass CUSTOM_FORMATS as second argument if you make use of it! clamdata = clam.common.data.getclamdata(datafile) +if 'debug' in clamdata and clamdata['debug']: + print("Locale information: ", file=sys.stderr) + os.system("locale >&2", file=sys.stderr) + #You now have access to all data. A few properties at your disposition now are: # clamdata.system_id , clamdata.project, clamdata.user, clamdata.status , clamdata.parameters, clamdata.inputformats, clamdata.outputformats , clamdata.input , clamdata.output @@ -65,7 +70,7 @@ def fail(prefix=None): if prefix: nextflowout(prefix) if os.path.exists('work'): - if not os.environ.get('PICCLDEBUG',False): + if 'debug' not in clamdata or not clamdata['debug']: shutil.rmtree('work') sys.exit(1)