vault backup: 2025-12-05 23:52:33
All checks were successful
Deploy Quartz site to GitHub Pages / build (push) Successful in 1m25s
All checks were successful
Deploy Quartz site to GitHub Pages / build (push) Successful in 1m25s
This commit is contained in:
24
static.py
24
static.py
@@ -1,7 +1,25 @@
|
||||
from obsidian_parser import Vault
|
||||
import markdown
|
||||
|
||||
v = Vault("content")
|
||||
note = v.get_note("Biokemi/Cellulära processer/Transport över cellmembran/Anteckningar.md")
|
||||
import pprint
|
||||
pprint.pprint(note.reading_view)
|
||||
raise SystemExit(0)
|
||||
body = markdown.markdown(note.reading_view)
|
||||
html = f"""<!html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<style>
|
||||
p {{
|
||||
white-space: pre-wrap;
|
||||
}}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
{body}
|
||||
</body>
|
||||
</html>
|
||||
"""
|
||||
with open("test.html", "w") as f:
|
||||
f.write(html)
|
||||
|
||||
import webbrowser
|
||||
webbrowser.open("test.html")
|
||||
|
||||
Reference in New Issue
Block a user