make print-messages
This commit is contained in:
parent
3e807ad63e
commit
641d89dd43
2 changed files with 29 additions and 0 deletions
26
bin/get-messages.awk
Executable file
26
bin/get-messages.awk
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/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
|
||||
}
|
3
makefile
3
makefile
|
@ -18,3 +18,6 @@ run-authd: setup
|
|||
|
||||
add-user:
|
||||
./bin/authc user add $(NAME) $(EMAIL) $(PHONE) -k $(PASSWORD_FILE)
|
||||
|
||||
print-messages:
|
||||
cat src/requests/*.cr | ./bin/get-messages.awk
|
||||
|
|
Loading…
Add table
Reference in a new issue