Use python to build mk Converter

Posted by wollensZhang@reddit | Python | View on Reddit | 2 comments

πŸš€ Check out my URL/PDF/DOCX to Markdown Converter!

Hey fellow developers! πŸ‘‹

I'm super excited to share a tool I've been working on that I think might make your life a bit easier. You know that annoying process of converting documents to Markdown? Well, I built something to handle that!

**What does it do? πŸ€”**

- Converts web pages to Markdown with just a URL

- Transforms PDF files to Markdown (using pdfplumber)

- Converts DOCX files to clean Markdown

- Lets you preview the rendered result right there

- Comes with copy/download buttons for quick access

I built it using FastAPI for the backend (it's crazy fast! ⚑) and kept the frontend super clean and simple. You literally just paste a URL or upload a file, hit convert, and boom! πŸ’₯ You've got your Markdown.

**Why I made this:**

I got tired of manually converting docs for my documentation work, and thought others might find this useful too. Plus, I wanted to learn more about FastAPI and document processing in Python.

**Tech stack:**

- FastAPI (because who doesn't love async Python? 🐍)

- pdfplumber for PDF parsing

- python-docx for Word docs

- marked.js for the preview

- Basic HTML/CSS/JS for the frontend

The code is open source, and I'd love to get your feedback or contributions! Check out the screenshots in the README to see it in action.

**Try it out:**

  1. Clone the repo

  2. Install dependencies

  3. Run with uvicorn

  4. Convert all the things! πŸŽ‰

What do you think? Would love to hear your thoughts or suggestions for improvements! And if anyone wants to contribute, PRs are more than welcome! 🀝

py-2-md