-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTransApp.wsgi
More file actions
executable file
·33 lines (28 loc) · 1.33 KB
/
TransApp.wsgi
File metadata and controls
executable file
·33 lines (28 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env python
#-*- coding:utf-8 -*-
###############################################################
# CLAM: Computational Linguistics Application Mediator
# -- WSGI script for launching CLAM (from within a webserver) --
# by Maarten van Gompel (proycon)
# http://proycon.github.io/clam
#
# Copy and adapt this script for your particular service!
#
# Licensed under GPLv3
#
###############################################################
import sys
import os
hostname = os.uname()[1]
if hostname == 'ticclops.uvt.nl' or hostname == 'black.uvt.nl':
WEBSERVICEDIR = '/opensonar/TransApp/' #this is the directory that contains your service configuration file
elif hostname in ('applejack','applejack.science.ru.nl'):
os.environ['CLAMOPENER_KEYFILE'] = '/scratch2/www/webservices-lst/live/etc/.clamopener'
os.environ['CLAM_SECRETKEYFILE'] = '/scratch2/www/webservices-lst/live/etc/.clamsecretkey'
os.environ['CLAM_DIGESTOPAQUEFILE'] = '/scratch2/www/webservices-lst/live/etc/.clamopaque'
WEBSERVICEDIR = '/scratch2/www/webservices-lst/live/repo/transcriptor/'
sys.path.append(WEBSERVICEDIR)
os.environ['PYTHONPATH'] = WEBSERVICEDIR
import TransApp_apache #** import your configuration module here! **
import clam.clamservice
application = clam.clamservice.run_wsgi(TransApp_apache) #** pass your module to CLAM **