aboutsummaryrefslogtreecommitdiff
path: root/plumb
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-06-09 14:07:16 +0000
committerrsc <devnull@localhost>2004-06-09 14:07:16 +0000
commit3040f28913ad0465506cfb6a7153a480efff7871 (patch)
tree53adf57eaaeddd774b5f5eed2a104da33e071389 /plumb
parent7e4a17cf3302c3cb4682d2f3d96a88ca951280e8 (diff)
downloadplan9port-3040f28913ad0465506cfb6a7153a480efff7871.tar.gz
plan9port-3040f28913ad0465506cfb6a7153a480efff7871.tar.bz2
plan9port-3040f28913ad0465506cfb6a7153a480efff7871.zip
plumb urls and html to web browsers
Diffstat (limited to 'plumb')
-rw-r--r--plumb/basic19
1 files changed, 9 insertions, 10 deletions
diff --git a/plumb/basic b/plumb/basic
index 8e9ec5c2..eaea8178 100644
--- a/plumb/basic
+++ b/plumb/basic
@@ -7,10 +7,17 @@ include fileaddr
plumb to seemail
plumb to showmail
-# cheap http/gif,jpeg,ps,pdf renderer
+# urls go to web browser
type is text
data matches '(https?|ftp|file|gopher|mailto|news|nntp|telnet|wais|prospero)://[a-zA-Z0-9_@\-]+([.:][a-zA-Z0-9_@\-]+)*/?[a-zA-Z0-9_?,%#~&/\-+=]+([:.][a-zA-Z0-9_?,%#~&/\-+=]+)*\.(jpe?g|JPE?G|gif|GIF|ps|PS|pdf|PDF)'
-plumb start rc -c 'hget '$0' | page -w'
+plumb start web $0
+
+# html goes to web browser
+type is text
+data matches '[a-zA-Z¡-￿0-9_\-./]+'
+data matches '([a-zA-Z¡-￿0-9_\-./]+)\.(html|htm|HTM|HTML)'
+arg isfile $0
+plumb start web $file
# doc and rtf files go to wdoc2txt
type is text
@@ -117,11 +124,3 @@ plumb start qiv -t $data
dst is postscript
arg isfile $data
plumb start gv $data
-
-# urls to internet explorer on another machine
-type is text
-data matches '(https?|ftp|file|gopher|mailto|news|nntp|telnet|wais|prospero)://[a-zA-Z0-9_@\-]+([.:][a-zA-Z0-9_@\-]+)*/?[a-zA-Z0-9_?,%#~&/\-+=@]+([:.][@a-zA-Z0-9_?,%#~&/\-+=]+)*'
-plumb to web
-plumb start web $0
-# plumb start winstart iexplore -new $0
-