diff --git a/README.md b/README.md index f466677..cb7c039 100644 --- a/README.md +++ b/README.md @@ -256,6 +256,9 @@ The following example shell command will pipe rtl_sdr to alert.txt rtl_fm -f 162425000 -s 22050 | multimon-ng -t raw -a EAS /dev/stdin | python eas_alert_parser.py ``` +#### Newspaper on mesh +a newspaper could be built by external scripts. could use Ollama to compile text via news web pages and write news.txt + ### Scheduler In the config.ini enable the module ```ini diff --git a/etc/eas_alert_parser.py b/etc/eas_alert_parser.py index 40a32e4..dd9bce5 100644 --- a/etc/eas_alert_parser.py +++ b/etc/eas_alert_parser.py @@ -9,6 +9,12 @@ buff=[] # store messages for writing seen=set() pattern = re.compile(r'ZCZC.*?NWS-') + +# alternate regex for parsing multimon-ng output +#reg = r"^.*?(NNNN|ZCZC)(?:-([A-Za-z0-9]{3})-([A-Za-z0-9]{3})-((?:-?[0-9]{6})+)\+([0-9]{4})-([0-9]{7})-(.{8})-)?.*?$" +#prog = re.compile(reg, re.MULTILINE) +#groups = prog.match(sameData).groups() + while True: try: # Handle piped input