Skip to content

Instantly share code, notes, and snippets.

@alyssajoy
alyssajoy / CMTtoObsidian.py
Last active January 2, 2026 22:09 — forked from haitike/CMTtoObsidian.py
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. Edited to run on Windows 11 in January 2026.
from urllib.parse import urlparse
from bs4 import BeautifulSoup
from pathvalidate import sanitize_filename
from shutil import copytree
import os
# The metadata block to be used by Obsidian Dataview