diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2014-08-17 20:27:44 -0400 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2014-08-17 20:27:44 -0400 |
| commit | cb2e7c09daefafad97618763f43c991baf8e9365 (patch) | |
| tree | 339bec874ce6b0b6efec33943b93325db63de153 /filter.py | |
| download | mutt-helpers-cb2e7c09daefafad97618763f43c991baf8e9365.tar.gz | |
Initial commit
Diffstat (limited to 'filter.py')
| -rwxr-xr-x | filter.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/filter.py b/filter.py new file mode 100755 index 0000000..59f27fe --- /dev/null +++ b/filter.py @@ -0,0 +1,17 @@ +#! /usr/bin/python2 +import os +import sys +from subprocess import PIPE, Popen + +os.environ["PARINIT"] = "85rTbgqR0d1 B=.,?!_A_a Q=_s>|+" + +for line in sys.stdin: + line = line.strip() + print line + if not line: + break +sys.stdout.flush() + +p = Popen("par", stdin=PIPE) +for line in sys.stdin: + p.stdin.write(line) |
