dnsjit.lib.parseconf(3)
π dnsjit.lib.parseconf β Parse simple config files π
okay so bestie, this is dnsjit.lib.parseconf(3), a page from the Library Functions Manual, and it's literally the cutest little config parser you've ever met. no cap.
β¨ NAME β¨
dnsjit.lib.parseconf β Parse simple config files π
πΈ SYNOPSIS πΈ
local conf = require("dnsjit.lib.parseconf").new()
conf:func("config_name", function(k,...)
print(k,...)
end)
conf:file(file)
print(conf:val("another_config_name"))
π¦ DESCRIPTION π¦
So this module parses simple config files, and they're based on the config syntax of DSC, drool and the parseconf helper library. iykyk π
The rules, bestie, are honestly so simple:
- Every config begins with a name, then comes the options, and then it ends with a
;. that's the whole vibe. - You can put multiple configs on the same line if you want. go off. π₯
- The valid option types are: number, float, string, and quoted string. that's it, that's the list.
- Wanna add a comment? just prefix it with
#and the parser will simply not perceive it. main character energy only. β¨
π Example
# Comment
number 12345;
float 123.456;
string string string;
quoted_string "string string string";
multi config; on one line;
look at that. gorgeous. flawless. ate and left no crumbs. π
π Functions
okay now the part you actually came for, the function lineup π«Ά
Parseconf.new()β makes you a brand newParseconfobject. a whole new bestie, freshly spawned. πParseconf:log()β hands you back the Log object so you can control the logging of this instance or module. yes you get to be in charge of the logs. iconic.Parseconf:func(name, func)β sets up a function to call whenever that config name shows up. like a little "notify me when you see this" pact between you and the parser. πParseconf:file(fn)β parses the given file. feed it a whole file and let it cook. πParseconf:line(l)β parses the given line. just one line, one vibe, one moment. βParseconf:val(name)β gets you the value of a config name. the payoff. the reveal. the moment. π
π AUTHORS and CONTRIBUTORS π
The absolute legends who made this happen:
- Jerry LundstrΓΆm (DNS-OARC)
- TomΓ‘Ε‘ KΕΓΕΎek (CZ.NIC)
- Petr Ε paΔek (ISC)
Maintained by DNS-OARC π
https://www.dns-oarc.net/
π BUGS π
found an issue? got a feature request? bestie, please don't suffer in silence, use this:
https://codeberg.org/DNS-OARC/dnsjit/issues
got a question, or just need a hand? hit up:
admin@dns-oarc.net
ngl they're genuinely nice, so go ahead and ask π
and that's the whole page, bestie!! this is from dnsjit version 1.5.1, filed under dnsjit.lib.parseconf(3) in the Library Functions Manual. go forth and parse, you absolute icon πΈπ¦β¨
π¦ where this page comes from
- epel 10: dnsjit 1.5.1-2.el10_2 Β· GPL-3.0-or-later
- epel 9: dnsjit 1.5.1-2.el9 Β· GPL-3.0-or-later
- fedora 43: dnsjit 1.5.1-2.fc43 Β· GPL-3.0-or-later
- fedora 43: dnsjit 1.5.1-2.fc43 Β· GPL-3.0-or-later
- fedora 44: dnsjit 1.5.1-2.fc44 Β· GPL-3.0-or-later
- fedora 44: dnsjit 1.5.1-2.fc44 Β· GPL-3.0-or-later
- ubuntu resolute: dnsjit 1.5.1-2 Β· GPL-3.0-or-later
- ubuntu stonking: dnsjit-dev 1.5.1-6 Β· GPL-3.0-or-later
- Copyright (c) 2018-2026 OARC, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms