blob: d846d87b66753fe7618a49448993cf4e41c9246f (
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
|
#!/bin/bash
#
# Download all links from a Semantic Scuttle instance.
#
# Configuration
source config || exit 1
# Other parameters
BASEDIR=/var/sites/links
SCUTTLEDIR=`basename $( find ${BASEDIR} -maxdepth 1 -iname "SemanticScuttle-*" | head -n 1 )`
CONFIGFILE=${BASEDIR}/${SCUTTLEDIR}/data/config.php
# Load functions
source lib/httracker/functions || exit 1
dbuser=`httracker_scuttle_config dbuser`
dbpass=`httracker_scuttle_config dbpass`
dbname=`httracker_scuttle_config dbname`
dbhost=`httracker_scuttle_config dbhost`
# Grab URLs from db
URLS=`mktemp -p ${TMP}`
chown links.links ${URLS}
chmod 600 ${URLS}
httracker_sqlquery "select bAddress from sc_bookmarks;" > ${URLS}
# Prepare and download
httracker_target_single
httracker_get_single
# Cleanup
rm -rf $TMP
|