From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] data/api:master commit in: bin/
Date: Sat, 24 Aug 2019 17:58:31 +0000 (UTC) [thread overview]
Message-ID: <1566669493.62ba4e49e152f3f29e92b650eec6d06845bb1b86.mgorny@gentoo> (raw)
commit: 62ba4e49e152f3f29e92b650eec6d06845bb1b86
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 24 17:58:13 2019 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Aug 24 17:58:13 2019 +0000
URL: https://gitweb.gentoo.org/data/api.git/commit/?id=62ba4e49
Add uid-gid.txt → wiki conversion script
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
bin/uidgid2wiki.awk | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/bin/uidgid2wiki.awk b/bin/uidgid2wiki.awk
new file mode 100755
index 0000000..3c3e22f
--- /dev/null
+++ b/bin/uidgid2wiki.awk
@@ -0,0 +1,60 @@
+#!/usr/bin/awk -f
+
+BEGIN {
+ print "{|class=\"wikitable sortable\""
+ print "! Name"
+ print "! data-sort-type=\"number\" | UID"
+ print "! data-sort-type=\"number\" | GID"
+ print "! Provider"
+ print "! class=unsortable | Notes"
+}
+
+function md2wiki(str) {
+ return gensub(/\[([^\]]+)\]\(([^)]+)\)/, "[\\2 \\1]", "g", str)
+}
+
+/^[^#]/ {
+ print "|-"
+ # name
+ print "| " $1
+ # uid
+ print "| " $2
+ # gid
+ print "| " $3
+ # provider
+ switch ($4) {
+ case "baselayout":
+ print "| style=\"background: #cff;\" | baselayout (linux)"
+ break
+ case "baselayout-fbsd":
+ print "| style=\"background: #ccf;\" | baselayout (fbsd)"
+ break
+ case "acct":
+ printf "%s", "| style=\"background: #9fc;\" |"
+ if ($2 != "-") printf " %s", "[https://gitweb.gentoo.org/repo/gentoo.git/tree/acct-user/" $1 " u:" $1 "]"
+ if ($3 != "-") printf " %s", "[https://gitweb.gentoo.org/repo/gentoo.git/tree/acct-group/" $1 " g:" $1 "]"
+ print ""
+ break
+ case "requested":
+ print "| style=\"background: #ffe;\" | requested"
+ break
+ case "reserved":
+ print "| style=\"background: #fcf;\" | reserved"
+ break
+ case "user.eclass":
+ print "| style=\"background: #dca;\" | user.eclass"
+ break
+ case "historical":
+ print "| style=\"background: #fee;\" | historical"
+ break
+ default:
+ print "| " $4
+ }
+ # notes
+ $1=$2=$3=$4=""
+ print "| " md2wiki(substr($0, 5))
+}
+
+END {
+ print "|}"
+}
next reply other threads:[~2019-08-24 17:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-24 17:58 Michał Górny [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-07-25 2:24 [gentoo-commits] data/api:master commit in: bin/ Sam James
2021-11-18 11:19 Ulrich Müller
2021-11-13 20:09 Ulrich Müller
2021-11-11 10:47 Ulrich Müller
2021-02-17 15:39 Joonas Niilola
2021-02-10 11:13 Joonas Niilola
2021-02-10 11:13 Joonas Niilola
2021-02-09 17:23 Joonas Niilola
2021-02-09 7:17 Alec Warner
2021-01-24 10:12 Michał Górny
2021-01-24 10:12 Michał Górny
2019-12-08 20:59 Michał Górny
2019-09-11 8:21 Michał Górny
2019-09-11 8:02 Michał Górny
2018-08-07 7:52 Michał Górny
2015-12-26 17:42 Alex Legler
2015-08-15 22:01 Alex Legler
2015-08-15 13:14 Alex Legler
2015-08-15 13:11 Alex Legler
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=1566669493.62ba4e49e152f3f29e92b650eec6d06845bb1b86.mgorny@gentoo \
--to=mgorny@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.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