diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2020-02-03 12:33:49 +0000 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2020-02-03 12:33:49 +0000 |
| commit | 8b8f517a1bedf3a9536d1d8bba3ba9ce301d6e13 (patch) | |
| tree | be3dbd6b8671d24f367eaa987cac4d37258e56ad | |
| parent | Merge branch 'master' into feature/html-document (diff) | |
| download | paper2remarkable-8b8f517a1bedf3a9536d1d8bba3ba9ce301d6e13.tar.gz paper2remarkable-8b8f517a1bedf3a9536d1d8bba3ba9ce301d6e13.zip | |
Minor changes to css and adding debugging code
| -rw-r--r-- | paper2remarkable/providers/html.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/paper2remarkable/providers/html.py b/paper2remarkable/providers/html.py index 03121a5..5a35b07 100644 --- a/paper2remarkable/providers/html.py +++ b/paper2remarkable/providers/html.py @@ -33,11 +33,12 @@ CSS = """ @page { size: 702px 936px; margin: 1in; } a { color: black; } img { display: block; margin: 0 auto; text-align: center; max-width: 70%; max-height: 300px; } -p { font-size: 10pt; font-family: 'EB Garamond'; hyphens: auto; text-align: justify; } +p, li { font-size: 10pt; font-family: 'EB Garamond'; hyphens: auto; text-align: justify; } h1,h2,h3 { font-family: 'Noto Serif'; } h1 { font-size: 26px; } h2 { font-size: 18px; } h3 { font-size: 14px; } +blockquote { font-style: italic; } """ @@ -108,6 +109,10 @@ class HTML(Provider): ' src="/', ' src="{base}/'.format(base=base_url) ) + if self.debug: + with open("./paper.html", "w") as fp: + fp.write(html_article) + font_config = weasyprint.fonts.FontConfiguration() html = weasyprint.HTML(string=html_article, url_fetcher=my_fetcher) css = weasyprint.CSS(string=CSS, font_config=font_config) |
