We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d9340d7 + 1f5ec3b commit 8aa6077Copy full SHA for 8aa6077
src/pdf.py
@@ -67,6 +67,15 @@ def transform_book_content(path_file):
67
68
soup = BeautifulSoup(html, "html.parser")
69
70
+ for node in soup.select('img[src^="images/https://"]'):
71
+ print('Fix image link "%s"' % node["src"])
72
+ node['src'] = node["src"][7:]
73
+ node['data-dark-src'] = node["data-dark-src"][7:]
74
+
75
+ for page in soup.select('[id="test-page.md"], [id="kotlin-brand-assets.md-kotlin-night-brand-assets"]'):
76
+ print("Drop %s" % page['id'])
77
+ page.find_parent('section').decompose()
78
79
result_file = get_tmp_filename(path_file)
80
81
with open(result_file, "w", encoding='utf-8') as output:
0 commit comments