From b1450ed2b7bdb38aa6813de13e2cb1e9ccef0bef Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Mon, 12 Oct 2020 15:17:54 +0200 Subject: [PATCH] begin the headers functions --- url2markdown/header.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 url2markdown/header.py diff --git a/url2markdown/header.py b/url2markdown/header.py new file mode 100644 index 0000000..b08064d --- /dev/null +++ b/url2markdown/header.py @@ -0,0 +1,19 @@ +def _get_topics_from_cli(): + pass + + +def _build_header_dict(article): + header = {} + header['topics'] = _get_topics_from_cli() + if article.authors: + header['authors'] = article.authors + if article.keywords: + header['topics'].append(article.keywords) + if not header['topics']: + header['topics'] = ['to_categorise'] + return header + + +def build_header(header): + yaml = "" + return yaml