mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
plumb urls and html to web browsers
This commit is contained in:
parent
7e4a17cf33
commit
3040f28913
1 changed files with 9 additions and 10 deletions
19
plumb/basic
19
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue