Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F82481206
alertengine.wml
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Sep 11, 16:19
Size
2 KB
Mime Type
text/x-c
Expires
Fri, Sep 13, 16:19 (2 d)
Engine
blob
Format
Raw Data
Handle
20672131
Attached To
R3600 invenio-infoscience
alertengine.wml
View Options
## $Id$
## Alert engine command line interface
## This file is part of the CERN Document Server Software (CDSware).
## Copyright (C) 2002 CERN.
##
## The CDSware is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) any later version.
##
## The CDSware is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with CDSware; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
##read config variables
#include "config.wml"
#include "configbis.wml"
## start Python:
<protect>#!</protect><PYTHON>
<protect>## $Id$ </protect>
<protect>## DO NOT EDIT THIS FILE! IT WAS AUTOMATICALLY GENERATED FROM CDSware WML SOURCES.</protect>
"""Alert engine command line interface"""
## fill config variables:
pylibdir = "<LIBDIR>/python"
wmlexec = "<WML> -I<LIBDIR>/wml/cdsware"
## rest of the Python code goes below
__version__ = "$Id$"
try:
import sys
sys.path.append('%s' % pylibdir)
import getopt
from cdsware.config import version, supportemail
from cdsware.alert_engine import run_alerts
except ImportError, e:
print "Error: %s" % e
import sys
sys.exit(1)
DEBUGLEVEL = 0
def usage():
print """Usage: alertengine [OPTION]
Run the alert engine.\n
-h, --help display this help and exit
-v, --version output version information and exit\n
Report bugs to <%s>""" % supportemail
def print_version():
print """alertengine (cdsware) %s\n
Copyright (C) 2003 CERN Document Server.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.""" % version
def main():
global DEBUGLEVEL
try:
opts, args = getopt.getopt(sys.argv[1:], "hv", ["help", "version"])
except getopt.GetoptError:
usage()
sys.exit(2)
for o, a in opts:
if o in ("-h", "--help"):
usage()
sys.exit()
if o in ("-v", "--version"):
print_version()
sys.exit()
run_alerts()
if __name__ == "__main__":
main()
Event Timeline
Log In to Comment