Merge branch 'infoZettel'
This commit is contained in:
@@ -5,11 +5,11 @@ from email import utils
|
|||||||
from email.mime.text import MIMEText
|
from email.mime.text import MIMEText
|
||||||
from email.mime.multipart import MIMEMultipart
|
from email.mime.multipart import MIMEMultipart
|
||||||
import pypandoc
|
import pypandoc
|
||||||
import json
|
|
||||||
import argparse
|
|
||||||
import yaml
|
import yaml
|
||||||
|
import argparse
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import certifi
|
import certifi
|
||||||
|
import os
|
||||||
|
|
||||||
def get_yaml(f):
|
def get_yaml(f):
|
||||||
'''Extracts the yamlHeader from a Markdown file'''
|
'''Extracts the yamlHeader from a Markdown file'''
|
||||||
@@ -47,17 +47,9 @@ receiverEmails = [
|
|||||||
"cwsvjudo@gmail.com",
|
"cwsvjudo@gmail.com",
|
||||||
"judo.cwsv@t-online.de",
|
"judo.cwsv@t-online.de",
|
||||||
]
|
]
|
||||||
config = {
|
config = None
|
||||||
'smtp' :
|
with open('./config.yaml', 'r') as file:
|
||||||
{
|
config = yaml.safe_load(file)
|
||||||
'serverAddress' : "mail.arcor.de",
|
|
||||||
'serverPort' : 465,
|
|
||||||
'login' : "cwsvjudo",
|
|
||||||
'password' : "***REMOVED***"
|
|
||||||
},
|
|
||||||
'senderEmailAddress': "cwsvjudo@arcor.de"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if __name__=="__main__":
|
if __name__=="__main__":
|
||||||
argv = argParser.parse_args()
|
argv = argParser.parse_args()
|
||||||
@@ -76,7 +68,7 @@ if __name__=="__main__":
|
|||||||
mdHeader =[]
|
mdHeader =[]
|
||||||
mdText = []
|
mdText = []
|
||||||
with open(argv.mdFilePath) as f:
|
with open(argv.mdFilePath) as f:
|
||||||
mdHeader = yaml.load(get_yaml(f))
|
mdHeader = yaml.safe_load(get_yaml(f))
|
||||||
|
|
||||||
# Create the plain-text and HTML version of your message
|
# Create the plain-text and HTML version of your message
|
||||||
text = pypandoc.convert_file(argv.mdFilePath, "markdown", extra_args=["--self-contained", "--resource-path=../aufgaben"])
|
text = pypandoc.convert_file(argv.mdFilePath, "markdown", extra_args=["--self-contained", "--resource-path=../aufgaben"])
|
||||||
|
|||||||
Reference in New Issue
Block a user