This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # print_dir_structure.py — drop-in, CLI-free variant | |
| # | |
| # Prints a tree-like view of the current working directory, honouring the | |
| # ignore lists below, copies the result to the clipboard (if pyperclip is | |
| # installed), and shows an approximate OpenAI-token count. | |
| # | |
| # Edit the CONFIGURATION section only; the rest is self-contained. | |
| from __future__ import annotations |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """ | |
| gpt2md — Make LLM-ish Markdown safe for Obsidian/Quarto (KaTeX/MathJax) | |
| PURPOSE | |
| Convert ChatGPT/Codex-style Markdown-with-math into a strict, portable | |
| Markdown+LaTeX subset that renders cleanly in Obsidian and Quarto (via | |
| KaTeX/MathJax). The script normalizes delimiters, fixes common LaTeX | |
| pitfalls, and refuses to touch code/links/previous math. |