shithub: riscv

Download patch

ref: 5dae7fcc68a3cfca3f2bef5a07702659a0b0eb62
parent: 48d2f14f803354951c09e1ff04aeab4bed16bf38
author: cinap_lenrek <[email protected]>
date: Sat Dec 21 13:04:50 EST 2013

add plumbing rules for page bookmarks and audio playback

--- a/sys/lib/plumb/basic
+++ b/sys/lib/plumb/basic
@@ -33,6 +33,14 @@
 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_\-./]+'
@@ -40,6 +48,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