#!/bin/bash # # Download all links from a Semantic Scuttle instance. # # Configuration source config || exit 1 # Functions source lib/httracker/functions || exit 1 # Create folders httracker_setup_folders # Other parameters BASEDIR=/var/sites/links SCUTTLEDIR=`basename $( find ${BASEDIR} -maxdepth 1 -iname "SemanticScuttle-*" | head -n 1 )` CONFIGFILE=${BASEDIR}/${SCUTTLEDIR}/data/config.php dbuser=`httracker_scuttle_config dbuser` dbpass=`httracker_scuttle_config dbpass` dbname=`httracker_scuttle_config dbname` dbhost=`httracker_scuttle_config dbhost` # So we can run both applications in parallel URLS="$URLS_SCUTTLER" # Get URLs from database touch ${URLS} chown links.links ${URLS} chmod 600 ${URLS} httracker_sqlquery "select bAddress from sc_bookmarks;" > ${URLS} # Download in incremental mode #httracker_get_incremental # Download in mirror mode httracker_iterate # Cleanup rm -rf $URLS