Plan 9 from Bell Labs’s /usr/web/sources/contrib/anothy/lib/plumbing.9vx

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


# to update: cp /usr/a/lib/plumbing.9vx /mnt/plumb/rules

editor = acme

include basic

# Allow "Local" hack, for use with global /n.
type is text
data matches 'Local (.*)'
plumb to none
plumb start rc -c $1

# "web" looks for my fifo trick, or falls back to lynx2txt.
type is text
data matches '(https?|ftp)://[a-zA-Z0-9_@\-]+([.:][a-zA-Z0-9_@\-]+)*/?[a-zA-Z0-9_?.,%#~&/\-+=]+([:.][a-zA-Z0-9_?,%#~&/\-+=]+)*'
plumb start web $0

# MRs open Bugzilla via web.
type is text
data matches 'MR:([0-9]+)'
plumb to web
plumb start web http://bugzilla.wherever.com/show_bug.cgi?id=$1

# RT tickets open RT via web.
type is text
data matches 'RT:([0-9]+)'
plumb to web
plumb start web http://rt.strand1.com/Ticket/Display.html?id=$1

# RFC's from one of the more reliable repositories.
type is text
data matches 'RFC:([0-9]+)'
plumb to web
plumb start web http://ietf.org/rfc/rfc$1.txt

#Lookup books by ISBN (from acme-sac)
type is text
data matches 'ISBN:([0-9]+)[ \-]?([0-9]+)[ \-]?([0-9]+)[ \-]?([0-9X]+)([ \-]?([0-9]+))?'
plumb to web
plumb start web http://lookupbyisbn.com//search.aspx?page=1&key=$1$2$3$4$6

# Life, in stick figures, with better dialogue.
type is text
data matches 'xkcd:([0-9]+)'
plumb to web
plumb start web http://xkcd.com/$1/

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].