diff options
author | epoch <epoch@enzo.thebackupbox.net> | 2021-10-25 07:53:03 +0000 |
---|---|---|
committer | epoch <epoch@enzo.thebackupbox.net> | 2021-10-25 07:53:03 +0000 |
commit | 97be01c60eb0e8cac1a9cdd2211aa27e1c50a414 (patch) | |
tree | f1f27cc7a05bbe7f45fcf2ae1d42816c8c036aa4 /README | |
parent | 84940d9b57eb4a6ab07de6b7b3058ba3c46ac8c8 (diff) | |
download | uritools-97be01c60eb0e8cac1a9cdd2211aa27e1c50a414.tar.gz uritools-97be01c60eb0e8cac1a9cdd2211aa27e1c50a414.zip |
meh. lost steam while writing the README. code comments ftw.
Diffstat (limited to 'README')
-rw-r--r-- | README | 45 |
1 files changed, 34 insertions, 11 deletions
@@ -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*' +``` |