Compare commits

...

2 Commits

Author SHA1 Message Date
quenousimporte 93f02d8247 fix drop cleanup 2024-04-10 17:57:34 +02:00
quenousimporte a03e5fc26c drop file name cleanup 2024-04-10 17:51:44 +02:00
1 changed files with 1 additions and 4 deletions

View File

@ -12,9 +12,6 @@ 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)
@ -36,7 +33,7 @@ for i in range(messages, messages-N, -1):
From = From.decode(encoding)
print(subject)
filepath = clean(subject) + '.md'
filepath = subject + '.md'
filepath = os.path.join('notes', filepath)
if msg.is_multipart():