uri_urn(n)

πŸ“¦
version 2.0 Β· 2 versions
, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

πŸ’– uri_urn β€” URI utilities, URN scheme πŸ’–

okay bestie, so this is uri_urn(n), living in the Tcl Uniform Resource Identifier Management fam, and it's literally the URN-scheme corner of the Tcllib universe. let's get into it πŸ¦‹


✨ SYNOPSIS ✨

package require Tcl 8.5 9

package require uri::urn ?1.0.4?

uri::urn::quote url

uri::urn::unquote url

yes bestie, that ?1.0.4? is optional-version notation, it's giving "you may pin me but you don't have to" πŸ’…


🌸 DESCRIPTION 🌸

so this package is a lil two-command queen. it provides two commands that quote and unquote the disallowed characters for a url that's using the urn scheme.

and it does more than that, no cap:

  • it registers the scheme with the package uri, and
  • it provides internal helpers which will be automatically used by the commands uri::split and uri::join of package uri to handle urls using the urn scheme.

so you don't even have to call the helpers yourself β€” they just show up when they're needed, main character energy fr 🫢


πŸ‘‘ COMMANDS πŸ‘‘

  • uri::urn::quote url β€” this one quotes the characters that the urn scheme disallows (per RFC 2141 sec2.2) inside the url, and hands you back the modified url as its result. glow-up for your url, basically ✨
  • uri::urn::unquote url β€” this is the reverse of ::uri::urn::quote. you feed it a urn url, it removes the quoting from all the disallowed characters, and returns the modified urls as its result. yes it says "urls", we don't make the rules, we just report them 😭

πŸ› BUGS, IDEAS, FEEDBACK πŸ›

ngl, this document and the package it describes will undoubtedly contain bugs and other problems. like, they said it themselves. so if you find one, please report it in the category uri of the Tcllib Trackers at http://core.tcl.tk/tcllib/reportlist. πŸ’€

also please report any ideas for enhancements you may have for either the package and/or the documentation. they want the ideas, bestie, give them the ideas 🫢

if you're proposing code changes, please provide unified diffs, i.e. the output of diff -u. this is not optional, this is the vibe.

and note further: attachments are strongly preferred over inlined patches. how do you attach? go to the Edit form of the ticket immediately after its creation, then use the left-most button in the secondary navigation bar. iykyk πŸŽ€


πŸ”‘ KEYWORDS πŸ”‘

rfc 2141, uri, url, urn


🌈 CATEGORY 🌈

Networking


and that's the whole page, bestie!! this lil icon is from tcllib, version 1.0.4, and it's uri_urn(n) β€” obsessed with her, honestly. go forth and quote your urns πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from