Last change
on this file since 38274 was 38274, checked in by davidb, 8 months ago |
Updated to work as a GS3 extension without the need for Ruby
|
-
Property svn:executable
set to
*
|
File size:
1.0 KB
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 |
|
---|
3 | if [ $# -ne 2 ] ; then
|
---|
4 | echo "Usage: $0 collect-name ttl-file" >&2
|
---|
5 | exit 1
|
---|
6 | fi
|
---|
7 |
|
---|
8 | graph_name=$1 # triplestore server setup to also add to 'default' graph automatically
|
---|
9 | file_ttl=$2
|
---|
10 |
|
---|
11 | port=${FUSEKI3_PORT:-8383}
|
---|
12 |
|
---|
13 | if [ "x$FULL_GREENSTONE_URL_PREFIX" != "x" ] ; then
|
---|
14 | graph_uri="$FULL_GREENSTONE_URL_PREFIX/collection/$graph_name"
|
---|
15 | else
|
---|
16 | graph_uri="http://localhost:$port/greenstone3/library/collection/$graph_name"
|
---|
17 | fi
|
---|
18 |
|
---|
19 |
|
---|
20 | ## The following line helps with runing a she-bang line of:
|
---|
21 | ## '#!/usr/bin/env ruby'
|
---|
22 | ## when the current script has been run from Perl under Cygwin
|
---|
23 | ##
|
---|
24 | #export PATH=/usr/bin:$PATH
|
---|
25 |
|
---|
26 | #echo s-post http://localhost:$port/fuseki3/greenstone/data "$graph_uri" "$file_ttl"
|
---|
27 | #s-post http://localhost:$port/fuseki3/greenstone/data "$graph_uri" "$file_ttl"
|
---|
28 |
|
---|
29 | echo " " curl POST: http://localhost:$port/fuseki3/greenstone/data?graph="$graph_uri" "$file_ttl"
|
---|
30 |
|
---|
31 | curl --silent -X POST \
|
---|
32 | -F "filename=@$file_ttl" \
|
---|
33 | "http://localhost:$port/fuseki3/greenstone/data?graph=$graph_uri" 1>/dev/null
|
---|
34 |
|
---|
35 | # -H 'text/turtle;charset=utf-8' \
|
---|
36 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.