From 97be01c60eb0e8cac1a9cdd2211aa27e1c50a414 Mon Sep 17 00:00:00 2001 From: epoch Date: Mon, 25 Oct 2021 07:53:03 +0000 Subject: meh. lost steam while writing the README. code comments ftw. --- README | 45 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 11 deletions(-) (limited to 'README') diff --git a/README b/README index 1ea4b28..63707b6 100644 --- a/README +++ b/README @@ -1,16 +1,9 @@ -This is a handy little program to help you handle URIs that any program may want a handler for. -Just point those programs looking for a handler at uristart. +This repo has grown a lot of tools that I use on my own system. -Then write a matching pattern, and a handler pipeline. +There's a uri.h that can be included in other C programs -The matching patterns are a series of pairs of URI-piece and a string. - -Each piece has a single letter you use to select the piece. - -here's an example that uses all of the parts: -s://u:k@d:P/p?q#f - -where each piece is: +Most of the programs will take single letters to refer to parts of a URI. +each piece is: s: scheme u: username k: password (k for key) @@ -19,3 +12,33 @@ P: port p: path q: query_string f: fragment_id + +## uricut + +used for cutting portions of a URI out from the rest of it. + +to cut the domain out of all the input URIs and show one per line. +``` +urilist | uricut -d +``` + +## urimatch + +used for matching URIs +multiple arguments will print if any of the rules match. +so if you want to print only if all of the rules match, pipe urimatch into another urimatch + +to print all gemini or gopher URIs: +``` +urilist | urimatch s gemini s gopher +``` + +to print all the gemini URIs that are for the domain gemini.thebackupbox.net +``` +urilist | urimatch s gemini | urimatch d gemini.thebackupbox.net +``` + +to print all the non-http links using reverse match and globbing +``` +urilist | urimatch rs 'http*' +``` -- cgit v1.2.3