Ever struggled to pull Python code from Markdown files manually? Say no more! This script automagically extracts Python code blocks from .md files and saves them as standalone .py scripts.
💡 Perfect for:
✅ Developers who work with Markdown tutorials & documentation.
✅ Geeks who love automating repetitive tasks.
✅ Anyone who prefers coding over copy-pasting!
✨ Finds & Extracts Python code blocks from .md files.
✨ Saves Code as neatly formatted .py files.
✨ Custom Output directory support.
✨ Plug & Play – No extra dependencies!
You already have everything you need – just run the script!
python script.py "path/to/markdown/files"python script.py "path/to/markdown/files" -o "path/to/save/python/files"🎯 Extract code from docs/ and save it in extracted_code/
python script.py "docs" -o "extracted_code"📂 If no output folder is provided, extracted .py files will be saved in the same folder as the Markdown files.
🆓 100% Free & Open-Source – Use it, modify it, share it!
💻 Made for lazy coders who love automation. Happy coding! 🎉🚀