27 lines
420 B
Awk
Executable File
27 lines
420 B
Awk
Executable File
#!/bin/awk -f
|
|
|
|
# Provides message parameters and numbers.
|
|
# Use: cat src/requests/*.cr | ./bin/get-messages.awk
|
|
|
|
BEGIN {
|
|
OFS="\t"
|
|
should_print = 0
|
|
}
|
|
|
|
/def initialize/ {
|
|
should_print = 0
|
|
print ""
|
|
}
|
|
|
|
# Print line only when we should:
|
|
# - when in a message class
|
|
# - when the line isn't empty
|
|
should_print == 1 && /[0-9a-zA-Z]/ {
|
|
print
|
|
}
|
|
|
|
/IPC::JSON.message/ || /IPC::CBOR.message/ {
|
|
print $3, $2
|
|
should_print = 1
|
|
}
|