Last active
March 10, 2025 15:28
-
-
Save cabo/4e67aa40b2f489ccd8d841c530f0bb72 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
md = ARGF.read | |
map = {} | |
md.lines(chomp: true).each do |li| | |
if li =~ /^\*\[([A-Z]{2,})\]: (.*)/ | |
if old = map[$1] | |
puts "** dup #$1 #$2 #{old}" | |
end | |
map[$1] = $2 | |
end | |
end | |
miss = Hash.new(0) | |
fp = Set[*%w( | |
UTC | |
RISE TZI | |
IETF IANA IESG WG WGLC | |
MUST MAY SHOULD | |
RFC | |
PR | |
IPR | |
GET POST | |
ROM | |
BERT OSCORE SZX | |
HREF URI CRI | |
TCP | |
HTTP HTTPS | |
DTLS | |
DNS TTL OPCODE OPCODES DNSOP DPRIVE | |
CBOR | |
CC | |
SLA | |
AOB | |
TBD | |
)] | |
# pp fp | |
md.scan(/\b([A-Z]{2,})/) do |match| | |
word = match[0] | |
# p fp, word, fp === word | |
miss[word] += 1 unless map[word] || fp === word | |
end | |
puts miss.keys |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment