Created
September 13, 2019 23:17
-
-
Save newsch/f8695e36ffad2dc9c757b4424dbf6308 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import logging | |
def main(): | |
fname = sys.argv[1] | |
with open(fname) as f: | |
blob = f.read() | |
pairs = blob.split(',') | |
parsed = list(map(lambda a: a[a.find('(') + 1 : a.find(')')], pairs)) | |
logging.info('Parsed %s emails', len(parsed)) | |
print('; '.join(parsed) + ';') # ideal format for pasting into Outlook TO/CC/BCC fields | |
if __name__ == '__main__': | |
logging.basicConfig(level=logging.INFO) | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment