diff -r e315df384eef -r 272ec25b6f12 py/gadict_srs_anki.py --- a/py/gadict_srs_anki.py Fri Jul 21 23:19:15 2023 +0300 +++ b/py/gadict_srs_anki.py Fri Jul 21 23:23:31 2023 +0300 @@ -32,6 +32,8 @@ # -freq:var:TAG=FILE or -freq:freq:TAG=FILE ARG_FREQ_RE = re.compile("-freq:(freq|var):([^=]+)=(.+)") ARG_DELFILE_RE = re.compile("-delfile=(.+)") +# -grp:GLOB +ARG_GRP_RE = re.compile("-grp:(.+)") look_for_files = False for idx in range(1, len(sys.argv)): @@ -66,6 +68,13 @@ wlist = parser.parse() FREQ_SOURCES.append((tag, set(wlist))) continue + m = ARG_GRP_RE.match(arg) + if m: + patt = m.group(1) + parser = gadict_freq.WordformGroupParser(patt) + for (tag, wset) in parser.parse().items(): + FREQ_SOURCES.append((tag, wset)) + continue m = ARG_DELFILE_RE.match(arg) if m: FDELNAME = m.group(1)