aboutsummaryrefslogtreecommitdiff
path: root/scuttler
blob: cb49918f483ae926f6586350e4bb9966feaaf9db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
#
# Download all links from a Semantic Scuttle instance.
#

# Configuration
source `dirname $0`/config || exit 1

# Functions
source `dirname $0`/lib/httracker/functions || exit 1

# Create folders
httracker_setup_folders

# Other parameters
SCUTTLE_BASE="/var/sites/links"
SCUTTLEDIR="`basename $( find ${SCUTTLE_BASE} -maxdepth 1 -iname "SemanticScuttle-*" | head -n 1 )`"
CONFIGFILE="${SCUTTLE_BASE}/${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
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