From: leahneukirchen <leahneukirchen@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: Anyway to handle "mailto:" from inside mblaze ?
Date: Thu, 15 Oct 2020 15:35:17 +0200 [thread overview]
Message-ID: <20201015133517.9MSxBXP-LRPzffzBEvrCaWXEuCIfsVKhbwIMZLfoBb8@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-fa6558a0-26e0-48f6-803f-f5a8af34f6a8-mblaze-189@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 979 bytes --]
New comment by leahneukirchen on mblaze repository
https://github.com/leahneukirchen/mblaze/issues/189#issuecomment-709328953
Comment:
Another try:
```
IFS='
'
mcom $(
awk -v url="$1" '
function decode(s) {
hexdigits = "0123456789abcdef"
for (i = 1; i < length(s); i++) {
if (substr(s, i, 3) ~ /%[0-9a-fA-F][0-9a-fA-F]/) {
c = sprintf("%c", (index(hexdigits, tolower(substr(s, i+1, 1)))-1) * 16 + \
index(hexdigits, tolower(substr(s, i+2, 1)))-1)
s = substr(s, 1, i-1) c substr(s, i+3)
i += 2
}
}
return s
}
BEGIN {
url = decode(url)
sub(/^mailto:/, "", url)
split(url, parts, "?")
to = parts[1]
split(parts[2], fields, "&")
args[1] = to
for (i in fields) {
split(fields[i], kv, "=")
if (kv[1] != "r") {
args[length(args)+1] = "-" kv[1]
args[length(args)+1] = kv[2]
}
}
for (i in args) {
print decode(args[i])
}
}
'
)
```
next prev parent reply other threads:[~2020-10-15 13:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-15 9:43 [ISSUE] " Eluminae
2020-10-15 10:09 ` leahneukirchen
2020-10-15 11:59 ` Eluminae
2020-10-15 12:01 ` Eluminae
2020-10-15 12:32 ` leahneukirchen
2020-10-15 13:35 ` leahneukirchen [this message]
2020-10-15 13:45 ` Eluminae
2020-10-15 13:46 ` Eluminae
2020-10-15 14:04 ` leahneukirchen
2020-10-15 15:13 ` [ISSUE] [CLOSED] " leahneukirchen
2021-03-21 21:01 ` Eluminae
2021-04-07 13:35 ` leahneukirchen
2021-04-07 14:54 ` Eluminae
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201015133517.9MSxBXP-LRPzffzBEvrCaWXEuCIfsVKhbwIMZLfoBb8@z \
--to=leahneukirchen@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).