Browse Source

Add positionerd.sh

master
Matteo Cypriani 3 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 @@
#!/bin/sh
#
# Quick and dirty helper script to call OwlPS Positioner and generate results.
# To be adapted to your own needs.

#set -x

if [ $# -lt 2 ] ; then
echo "Usage:"
echo " $0 <FILE> <SIMILARITY> [ARGUMENTS]"
echo "<FILE> is an aggregation file."
echo "<SIMILARITY> is a similarity algorithm name."
echo "<FILE> and <SIMILARITY> may not contain spaces."
echo "[ARGUMENTS] is a list of additional arguments passed to OwlPS Positioner."
exit 1
fi

FILE=$1
shift
SIMILARITY=$1
shift
BASE=`basename $FILE .agg`_$SIMILARITY
OUT=$BASE.pos
#STDOUT=$BASE.out
#STDERR=$BASE.err
LOG=$BASE.log

#POSITIONER="$HOME/owlps/owlps-positioner/owlps-positionerd"
POSITIONER=/usr/local/bin/owlps-positionerd

if [ ! -x $POSITIONER ] ; then
echo "$POSITIONER does not exist or is not executable!"
exit 1
fi

OWLPS_VERSION=$($POSITIONER -V 2>/dev/null | sed -rn 's/^Version: (.*)./\1/p')

touch owlps_$OWLPS_VERSION
$POSITIONER -v \
--positioning.ss-similarity=$SIMILARITY \
--input.csv-file=$FILE \
--output.csv-file=$OUT $@ >$LOG 2>&1

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

@@ -0,0 +1,43 @@
#!/bin/sh
#
# Quick and dirty helper script to call OwlPS Positioner and generate results.
# To be adapted to your own needs.

#set -x

if [ $# -lt 3 ] ; then
echo "Usage:"
echo " $0 <FILE> <SIMILARITY> <STEP> [ARGUMENTS]"
echo "<FILE> is an aggregation file."
echo "<SIMILARITY> is a similarity algorithm name."
echo "<STEP> is the distance between two generated reference points."
echo "<FILE> and <SIMILARITY> may not contain spaces."
echo "[ARGUMENTS] is a list of additional arguments passed to OwlPS Positioner."
exit 1
fi

FILE=$1
shift
SIMILARITY=$1
shift
STEP=$1
shift
BASE=`basename $FILE .agg`_$SIMILARITY_$STEP
OUT=$BASE.pos
LOG=$BASE.log

POSITIONER=$(which owlps-positionerd)

if [ ! -x "$POSITIONER" ] ; then
echo "$POSITIONER does not exist or is not executable!"
exit 1
fi

OWLPS_VERSION=$($POSITIONER -V 2>/dev/null | sed -rn 's/^Version: (.*)./\1/p')

touch owlps_$OWLPS_VERSION
$POSITIONER -v \
--positioning.ss-similarity=$SIMILARITY \
--positioning.generated-line-step=$STEP \
--input.csv-file=$FILE \
--output.csv-file=$OUT $@ >$LOG 2>&1

Loading…
Cancel
Save