Browse Source

Add positionerd.sh

master
Matteo Cypriani 2 years ago
parent
commit
8ef6344d7e
2 changed files with 85 additions and 0 deletions
  1. 42
    0
      2012-numerica/positionerd.sh
  2. 43
    0
      2013-canmet/positionerd.sh

+ 42
- 0
2012-numerica/positionerd.sh View File

@@ -0,0 +1,42 @@
1
+#!/bin/sh
2
+#
3
+# Quick and dirty helper script to call OwlPS Positioner and generate results.
4
+# To be adapted to your own needs.
5
+
6
+#set -x
7
+
8
+if [ $# -lt 2 ] ; then
9
+	echo "Usage:"
10
+	echo "  $0 <FILE> <SIMILARITY> [ARGUMENTS]"
11
+	echo "<FILE> is an aggregation file."
12
+	echo "<SIMILARITY> is a similarity algorithm name."
13
+	echo "<FILE> and <SIMILARITY> may not contain spaces."
14
+	echo "[ARGUMENTS] is a list of additional arguments passed to OwlPS Positioner."
15
+	exit 1
16
+fi
17
+
18
+FILE=$1
19
+shift
20
+SIMILARITY=$1
21
+shift
22
+BASE=`basename $FILE .agg`_$SIMILARITY
23
+OUT=$BASE.pos
24
+#STDOUT=$BASE.out
25
+#STDERR=$BASE.err
26
+LOG=$BASE.log
27
+
28
+#POSITIONER="$HOME/owlps/owlps-positioner/owlps-positionerd"
29
+POSITIONER=/usr/local/bin/owlps-positionerd
30
+
31
+if [ ! -x $POSITIONER ] ; then
32
+	echo "$POSITIONER does not exist or is not executable!"
33
+	exit 1
34
+fi
35
+
36
+OWLPS_VERSION=$($POSITIONER -V 2>/dev/null | sed -rn 's/^Version: (.*)./\1/p')
37
+
38
+touch owlps_$OWLPS_VERSION
39
+$POSITIONER -v \
40
+	--positioning.ss-similarity=$SIMILARITY \
41
+	--input.csv-file=$FILE \
42
+	--output.csv-file=$OUT $@ >$LOG 2>&1

+ 43
- 0
2013-canmet/positionerd.sh View File

@@ -0,0 +1,43 @@
1
+#!/bin/sh
2
+#
3
+# Quick and dirty helper script to call OwlPS Positioner and generate results.
4
+# To be adapted to your own needs.
5
+
6
+#set -x
7
+
8
+if [ $# -lt 3 ] ; then
9
+	echo "Usage:"
10
+	echo "  $0 <FILE> <SIMILARITY> <STEP> [ARGUMENTS]"
11
+	echo "<FILE> is an aggregation file."
12
+	echo "<SIMILARITY> is a similarity algorithm name."
13
+	echo "<STEP> is the distance between two generated reference points."
14
+	echo "<FILE> and <SIMILARITY> may not contain spaces."
15
+	echo "[ARGUMENTS] is a list of additional arguments passed to OwlPS Positioner."
16
+	exit 1
17
+fi
18
+
19
+FILE=$1
20
+shift
21
+SIMILARITY=$1
22
+shift
23
+STEP=$1
24
+shift
25
+BASE=`basename $FILE .agg`_$SIMILARITY_$STEP
26
+OUT=$BASE.pos
27
+LOG=$BASE.log
28
+
29
+POSITIONER=$(which owlps-positionerd)
30
+
31
+if [ ! -x "$POSITIONER" ] ; then
32
+	echo "$POSITIONER does not exist or is not executable!"
33
+	exit 1
34
+fi
35
+
36
+OWLPS_VERSION=$($POSITIONER -V 2>/dev/null | sed -rn 's/^Version: (.*)./\1/p')
37
+
38
+touch owlps_$OWLPS_VERSION
39
+$POSITIONER -v \
40
+	--positioning.ss-similarity=$SIMILARITY \
41
+	--positioning.generated-line-step=$STEP \
42
+	--input.csv-file=$FILE \
43
+	--output.csv-file=$OUT $@ >$LOG 2>&1

Loading…
Cancel
Save