ref: 2e63d6807ab914e87d0e3e9b8b33ac4f8541d016
parent: aa47ae8c1f3c051ad64135ab1cf1cfdbe6328f36
author: halfwit <halfwit@hlfw.ca>
date: Thu Aug 22 20:55:03 PDT 2024
update readme
--- a/README.md
+++ b/README.md
@@ -1,18 +1,12 @@
-
## Overview
-
Plumb is a drop-in replacement for plan9's [plumb](https://9fans.github.io/plan9port/man/man1/plumb.html) utility.
-
Notably different from it, are how it handles the `type` attribute of the plumb messages.
They will be set to a proper mimetype, instead of the simple `type is text` that the traditional plumber utilized.
-
This is considerably more powerful, as you no longer need to attempt to infer the content based on URIs, extensions, or directory structure.
## Rules
-
Your plumber rules will have to be updated to reflect this more granular message:
-
## In this example, plan9front's plumber is being used; but similar rule changes would apply for plan9 regular.
type is image/png
@@ -44,13 +38,11 @@
plumb to postscript
plumb start 9 page $file
-
-In practice, setting a rule for most common mimetypes will serve you well. (For example, my last implementation of plumber used a relatively small amount of mimes, after a few years' worth of plumbing in this manner.
+In practice, setting a rule for most common mimetypes will serve you well. (For example, my last implementation of plumber used a relatively small amount of mimes, after a few years' worth of plumbing in this manner.
See https://github.com/halfwit/Plumber/tree/master/cfg/plumber)
## About application/octet-stream mimetype
If the remote mimetype is `application/octet-stream`, which is a fallback when it cannot infer the mimetype this client will attempt to find a content-type field in any remote URL, finally setting the type to `text`.
-Reference for mimetype: https://mimesniff.spec.whatwg.org/
-
-Reasonably robust list of mimetypes: https://www.freeformatter.com/mime-types-list.html
+- reference for mimetype: https://mimesniff.spec.whatwg.org/
+- reasonably robust list of mimetypes: https://www.freeformatter.com/mime-types-list.html