轻量级Markdown转换器,支持MD转HTML/PDF/Word,内置FastAPI可视化界面
Project description
M2x - 🤖 A Lightweight Markdown Online Editor & Conversion Tool 👾
🌐 Switch to Chinese Version (切换到中文)
Project Description 👿
M2x is a lightweight online Markdown editor that implements basic Markdown editing functionality directly in your browser 😇. Additionally, it provides convenient APIs to quickly convert Markdown files to PDF and Word formats 🥰.
Core Features 🤗
- 😻 Online Editing: Enables online editing of your Markdown files via APIs directly in the browser
- 😼 Fast Conversion: Converts your Markdown files to PDF and Word formats, supporting both local and online service modes
Technical Implementation 👻
Frontend 👀
- HTML
- JavaScript
- CSS
- Utilizes native frontend languages to achieve fast file loading and opening
Backend 🧠
- FastAPI
- markdown2
- WeasyPrint
- Uvicorn
- python-docx
- beautifulsoup4
- Delivers fast response and efficient conversion
Getting Started? 👽️
- Clone the Repository
git clone <repository-url>
cd m2x
- Install Python Dependencies
pip install -e .
Basic Usage
Command Line Interface 😵
m2x -p yourmarkdown_file_path yourtarget_path
# Convert text from Markdown to PDF
m2x -2 yourmarkdown_file_path yourtarget_path
# Convert text from Markdown to Word
m2x --server
# Launch the online editor in browser
Data Flow Process 🌞
📄 Original Markdown File
→ 🚀 Process into HTML
→ 📊 Unify Data Format
→ 💡 Convert to Target Format
→ 🖥️ Frontend Dynamic Rendering
→ 💬 User Interaction
→ 📋 Final Output
Contribution Process 🐸
- Submit an Issue to report bugs or suggest new features
- Fork the repository and create a feature branch
- Implement features and write corresponding tests
- Submit a Pull Request with a description of the changes
- Merge after code review approval
Testing Instructions 👐
- Testing Framework: pytest
- Test Directory: Test cases are organized by module under the
tests/directory
🙏 Acknowledgments
- fastapi: Core backend framework 🚀
- markdown2: Markdown conversion tool 🔥
- weasyprint: Converts HTML to PDF 💢
- python-docx: Converts HTML content to Word 😡
- uvicorn: ASGI server for launching the application 💥
- beautifulsoup4: Extracts HTML content for conversion 🪐
📞 Contact Us
For any questions or suggestions, please feel free to contact us via Issues or email.
🚀 Thank you for using M2x! And thank you for your contributions to M2x!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_m2x-0.1.2.tar.gz.
File metadata
- Download URL: python_m2x-0.1.2.tar.gz
- Upload date:
- Size: 22.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f79103ab58d2be69e60970bc9a0b5d0b1af17f7daff3d0629f2c1e3820922f82
|
|
| MD5 |
5f44787ed0275c89eb518e88a94bacab
|
|
| BLAKE2b-256 |
1e662497bacbe995749d9f1e2da0f4208305d6875103a141472ece5992918bc4
|
File details
Details for the file python_m2x-0.1.2-py3-none-any.whl.
File metadata
- Download URL: python_m2x-0.1.2-py3-none-any.whl
- Upload date:
- Size: 22.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8aaf37adde0f0d0816f20dfc413a8cba088c84dc58a37df12594d999a5fea5b6
|
|
| MD5 |
7e58b117df40cd8086d356ffe18e2d95
|
|
| BLAKE2b-256 |
d5dabe3fcfc7bb5760078a69da4a49701830fcaa3671040d79a14ac439e9fc5a
|