File: rdf-parser

package info (click to toggle)
swi-prolog-packages 5.0.1-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 50,688 kB
  • ctags: 25,904
  • sloc: ansic: 195,096; perl: 91,425; cpp: 7,660; sh: 3,046; makefile: 2,750; yacc: 843; awk: 14; sed: 12
file content (35 lines) | stat: -rwxr-xr-x 702 bytes parent folder | download
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
34
35
#!/bin/bash
#
# This is not the normal parser, just the front-end for the CGI interface.
# The real CGI stuff is written in Prolog in the file online.pl.  The
# request is in online.html
#
# The RDF parser itself is just a Prolog library.  See rdf2pl.{html,pdf}.

base=@BASEDIR@
tmp=/tmp/rdf-parser-$$
export ERROR_FILE=$tmp

ulimit -t 20			# seconds CPU time limit

function error()
{ cat << _EOM_
Content-type: text/plain

Sorry, an internal error occurred.  For details, see below.

_EOM_
  cat $tmp
  rm -r $tmp
  exit 0
}

cd $base > $tmp 2>&1
@PL@ -f none -F none -t halt \
	  -g "load_files(online,[silent(true)]),go" 2>$tmp

case $? in
    0)	rm -f $tmp
        exit 0 ;;
    *)  error ;;
esac