aboutsummaryrefslogtreecommitdiff
path: root/sources/db
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2014-05-13 15:43:13 +0200
committerJochen Topf <jochen@topf.org>2014-05-13 15:43:13 +0200
commit5167802ba9e30f17ea71e0783c475764fdb8ec64 (patch)
treeaac187a9c4d7e855def0b5c366725e8b5e2d4fce /sources/db
parent2bc6d4d03b91b0f019f96f37512534074f33b660 (diff)
downloadtaginfo-5167802ba9e30f17ea71e0783c475764fdb8ec64.tar
taginfo-5167802ba9e30f17ea71e0783c475764fdb8ec64.tar.gz
Use sqlite db file instead of text *.lst files for selected data.
This changes the way some data is given from one taginfo update run to the next. Instead of plain text files an sqlite database is used. Part of the update is a new version of the upstream sqlite.hpp file. After this commit the update has to be run twice to get all data updated properly.
Diffstat (limited to 'sources/db')
-rwxr-xr-xsources/db/update.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/sources/db/update.sh b/sources/db/update.sh
index 8045efc..24d430b 100755
--- a/sources/db/update.sh
+++ b/sources/db/update.sh
@@ -27,6 +27,7 @@ fi
echo "`$DATECMD` Start db..."
DATABASE=$DIR/taginfo-db.db
+SELECTION_DB=$DIR/selection.db
rm -f $DATABASE
@@ -50,18 +51,17 @@ if [ "x" = "x$TAGSTATS" ]; then
TAGSTATS="./tagstats"
fi
-if [ ! -f $DIR/interesting_tags.lst ]; then
- echo "File $DIR/interesting_tags.lst missing. Not creating combination statistics."
- echo " The next taginfo update should automatically correct this."
-fi
-
-if [ ! -f $DIR/frequent_tags.lst ]; then
- echo "File $DIR/frequent_tags.lst missing. Not creating maps for tags."
+if [ -f $SELECTION_DB ]; then
+ OPEN_SELECTION_DB="--selection-db=$SELECTION_DB"
+ echo "Reading selection database '$SELECTION_DB'"
+else
+ OPEN_SELECTION_DB=""
+ echo "Selection database '$SELECTION_DB' not found. Not creating some statistics."
echo " The next taginfo update should automatically correct this."
fi
#TAGSTATS="valgrind --leak-check=full --show-reachable=yes $TAGSTATS"
-$TAGSTATS --tags $DIR/interesting_tags.lst --map-tags $DIR/frequent_tags.lst --min-tag-combination-count=$min_tag_combination_count --relation-types $DIR/interesting_relation_types.lst --left=$left --bottom=$bottom --top=$top --right=$right --width=$width --height=$height $PLANETFILE $DATABASE
+$TAGSTATS $OPEN_SELECTION_DB --min-tag-combination-count=$min_tag_combination_count --left=$left --bottom=$bottom --top=$top --right=$right --width=$width --height=$height $PLANETFILE $DATABASE
echo "`$DATECMD` Running update_characters... "
./update_characters.rb $DIR