mirror of https://github.com/balkian/gists
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.2 KiB
Bash
54 lines
1.2 KiB
Bash
9 years ago
|
#!/bin/bash
|
||
|
if [ $# -lt 1 ]
|
||
|
then
|
||
9 years ago
|
echo "Usage: $0 <ONTO> <FORMAT> <VERSION> <DIR> <NS>"
|
||
|
echo "Example: $0 onto owl latest /tmp/Onto http://example.com/ontologies owl"
|
||
|
exit
|
||
9 years ago
|
else
|
||
|
ONTO=$1
|
||
|
fi
|
||
|
if [ $# -lt 2 ]
|
||
|
then
|
||
9 years ago
|
FORMAT=owl
|
||
9 years ago
|
else
|
||
9 years ago
|
FORMAT=$2
|
||
9 years ago
|
fi
|
||
|
if [ $# -lt 3 ]
|
||
|
then
|
||
9 years ago
|
VERSION=latest
|
||
9 years ago
|
else
|
||
9 years ago
|
VERSION=$3
|
||
9 years ago
|
fi
|
||
|
if [ $# -lt 4 ]
|
||
9 years ago
|
then
|
||
|
DIR=~/Doctorado/Ontologies/$ONTO
|
||
|
else
|
||
|
DIR=$4
|
||
|
fi
|
||
|
if [ $# -lt 5 ]
|
||
9 years ago
|
then
|
||
|
NS=http://www.gsi.dit.upm.es/ontologies/$ONTO/ns#
|
||
|
else
|
||
9 years ago
|
NS=$5
|
||
9 years ago
|
fi
|
||
|
|
||
|
SPECPATH=~/Doctorado/tools/specgen6
|
||
|
|
||
|
echo "Generating docs for $ONTO from: $DIR"
|
||
|
echo "Namespace: $NS"
|
||
|
|
||
|
cp -r $DIR/spec $DIR/spec_backup
|
||
|
rm -rf $VERSION/
|
||
|
mkdir $DIR/spec/$VERSION
|
||
9 years ago
|
python2 $SPECPATH/specgen6.py --indir=$DIR --ns=$NS --prefix=$ONTO --ontofile=$ONTO.$FORMAT --outdir=$DIR/spec/$VERSION --templatedir=$DIR --outfile=index.html
|
||
9 years ago
|
cd $DIR/spec
|
||
9 years ago
|
cp ../$ONTO.$FORMAT $VERSION/
|
||
|
ln -s $ONTO.$FORMAT $VERSION/ns
|
||
|
cp -R ../img $VERSION/
|
||
|
cp ../style.css $VERSION/
|
||
|
rm index.html img style.css ns $ONTO.$FORMAT
|
||
9 years ago
|
ln -s $VERSION/index.html .
|
||
9 years ago
|
ln -s $VERSION/$ONTO.$FORMAT $ONTO.$FORMAT
|
||
|
ln -s $VERSION/$ONTO.$FORMAT ns
|
||
|
ln -s $VERSION/img img
|
||
|
ln -s $VERSION/style.css style.css
|