summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.sample1
-rwxr-xr-xw3watch8
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:
#
diff --git a/w3watch b/w3watch
index ba8f975..6abc305 100755
--- a/w3watch
+++ b/w3watch
@@ -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