Convert tinydns and dnscache logs to human-readable form
"""
-import re
+import re, typing
from struct import pack
from time import strftime, gmtime
from subprocess import Popen, PIPE
% (code, ip, port, id, type, name))
-def parse_logfile(file):
+def parse_logfile(file : typing.TextIO):
+ """
+ Process a single log ``file``.
+
+ Parameters
+ ----------
+
+ file : typing.TextIO
+ An open log file, or stdin.
+
+ """
# Open pipe to tai64nlocal: we will write lines of our input (the
# raw log file) to it, and read log lines with readable timestamps
# from it.
parse_logfile(f)
-
-
if __name__ == "__main__":
main()