diff options
Diffstat (limited to 'script/extract.py')
-rwxr-xr-x | script/extract.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/script/extract.py b/script/extract.py index 526db92..cc8f03e 100755 --- a/script/extract.py +++ b/script/extract.py @@ -376,6 +376,15 @@ def move_mail(f, mid, from_, to): return 1 +def remove_mail(f, subdir, mid): + if subdir: + f = f.get_folder(subdir) + + f[mid].add_flag('T') + + return 1 + + def parse_arguments(): ap = ArgumentParser(allow_abbrev=False) ap.add_argument('maildir_path', type=Path) @@ -415,6 +424,11 @@ def parse_arguments(): sp_move.add_argument('to') sp_move.set_defaults(run=move_mail) + sp_remove = sp.add_parser('remove') + sp_remove.add_argument('subdir') + sp_remove.add_argument('mid', metavar='message') + sp_remove.set_defaults(run=remove_mail) + sp_search = sp.add_parser('search') sp_search.add_argument('pattern') sp_search.add_argument('subfolder') |