%title readImap dvlg :dvlg:dev:readImap:kendrit:puralek: %date 2020-10-25 23:52 = tasks | pro:readImap = * [X] finish read-imap in spellbook #b4a148e7 * [X] parse email msgs #0e629167 * [X] import writing into kitaab #ea0f2f4d = done = download emails using `email` and `imaplib` in python save to out file using `email.generator.Generator(fp)` can read file through emails through `email.parser.Parser(fp)` = parsing = `for part in msg.walk():` ` r = str(part.get_payload(decode=True))` = todo = - avoid bytes and empty parts - differentiate between links and passages/comments - read tags from identified link blocks - average links per day - most common tag