]> git.lizzy.rs Git - plan9front.git/commitdiff
add plumbing rules for page bookmarks and audio playback
authorcinap_lenrek <cinap_lenrek@felloff.net>
Sat, 21 Dec 2013 17:04:50 +0000 (18:04 +0100)
committercinap_lenrek <cinap_lenrek@felloff.net>
Sat, 21 Dec 2013 17:04:50 +0000 (18:04 +0100)
sys/lib/plumb/basic

index 6f2462796071c9ef56fe9d955ffb1887c9d66e54..c32616ebd2c96a5752e4e92684e5b0e7b5fe22ce 100644 (file)
@@ -33,6 +33,14 @@ data matches '[a-zA-Z0-9_+.\-]+@[a-zA-Z0-9_+.\-]*'
 plumb to sendmail
 plumb start window rc -c '''echo % mail '''$0'; mail '$0
 
+# audio
+type is text
+data matches '[a-zA-Z¡-￿0-9_\-./]+'
+data matches '([a-zA-Z¡-￿0-9_\-./]+)\.(mp3|ogg|flac|m3u|pls)'
+arg isfile     $0
+plumb to audio
+plumb start window play $0
+
 # image files go to page
 type is text
 data matches '[a-zA-Z¡-￿0-9_\-./]+'
@@ -41,6 +49,15 @@ arg isfile   $0
 plumb to image
 plumb client page -wi
 
+# page bookmarks
+type is text
+data matches '(([a-zA-Z¡-￿0-9_\-./]+)\.(ps|PS|eps|EPS|pdf|PDF|dvi|DVI|doc|DOC|epub|EPUB|cb[tz]|CB[TZ]))!(.+)'
+arg isfile     $1
+data set       $file
+attr add       addr=$4
+plumb to image
+plumb start page -wij $0 $file
+
 # postscript/pdf/dvi/doc go to page but not over the a plumb port
 # the port is here for reference but is unused
 type is text