Skip to content

Instantly share code, notes, and snippets.

@haitike
haitike / CMTtoObsidian.py
Last active January 2, 2026 22:09
It splits a recipes.html file from CopyMeThat export into single recipes.html files with the same style. In addition it creates a Dataview metadata block at the beginning of the body. You need to run the Obsidian Importer plugin after the script.
from urllib.parse import urlparse
from bs4 import BeautifulSoup
from distutils.dir_util import copy_tree
import os
# The metadata block to be used by Obsidian Dataview
class ObsidianDataviewMetadata: