diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2009-06-16 12:31:41 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2009-06-16 12:31:41 +0200 |
commit | 8ec5e93d309f6a25789881db3f414d16dd017cd9 (patch) | |
tree | 6381564f954bfaa973c5853da7a199970ddee35c | |
parent | 55e5a8b0212c4c07fdb2fd1b82e23d2ec8f0989b (diff) | |
download | w3watch-8ec5e93d309f6a25789881db3f414d16dd017cd9.tar.gz w3watch-8ec5e93d309f6a25789881db3f414d16dd017cd9.tar.xz |
be able to work on bare HTML source
-rw-r--r-- | config.sample | 1 | ||||
-rwxr-xr-x | w3watch | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/config.sample b/config.sample index a6b631a..d6e8f5a 100644 --- a/config.sample +++ b/config.sample @@ -4,6 +4,7 @@ # * Every line contains one URL # * An optional filter can be defined by separating any command # from the url using whitspaces +# * Prepend an @ to the URL to work on bare HTML source # # Example: # @@ -63,7 +63,13 @@ while read line; do url="${data[0]}" filter="${data[@]:1}" - dump=$(lynx -dump "$url") + if echo "$url}" | grep -q '^@'; then + url="$(echo "${url}" | cut -c 1 --complement -)" + dump=$(lynx -source "$url") + else + dump=$(lynx -dump "$url") + fi + if [ $? -ne 0 ]; then rm -f "${LOCKFILE}" exit 1 |