[feat](trx-rs): add ft8 decoder
Co-authored-by: Codex <codex@openai.com> Signed-off-by: Stanislaw Grams <stanislawgrams@gmail.com>
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
import sys
|
||||
import re
|
||||
|
||||
rx1 = re.compile(r'"([0-9a-z]+)"', re.I)
|
||||
|
||||
for line in sys.stdin:
|
||||
line = line.strip()
|
||||
m = rx1.search(line)
|
||||
if m == None:
|
||||
continue
|
||||
|
||||
line = m.group(1)
|
||||
if len(line) % 2 == 1:
|
||||
line += '0'
|
||||
b = ['0x' + line[i*2:i*2+2] for i in range(len(line)/2)]
|
||||
print '{ %s },' % (', '.join(b))
|
||||
Reference in New Issue
Block a user