Compare commits
No commits in common. "93f02d8247bd7589386838b464bcfd3e7553e074" and "f1fc5a24c1a891029f042005678bde72e9c87879" have entirely different histories.
93f02d8247
...
f1fc5a24c1
|
@ -12,6 +12,9 @@ N = 500
|
|||
if not os.path.isdir('notes'):
|
||||
os.mkdir('notes')
|
||||
|
||||
def clean(text):
|
||||
return "".join(c if c.isalnum() else "_" for c in text)
|
||||
|
||||
imap = imaplib.IMAP4_SSL(imapserver)
|
||||
imap.login(username, password)
|
||||
|
||||
|
@ -33,7 +36,7 @@ for i in range(messages, messages-N, -1):
|
|||
From = From.decode(encoding)
|
||||
|
||||
print(subject)
|
||||
filepath = subject + '.md'
|
||||
filepath = clean(subject) + '.md'
|
||||
filepath = os.path.join('notes', filepath)
|
||||
|
||||
if msg.is_multipart():
|
||||
|
|
Loading…
Reference in New Issue