Skip to main content

轻量级Markdown转换器,支持MD转HTML/PDF/Word,内置FastAPI可视化界面

Project description

M2x - 🤖 A Lightweight Markdown Online Editor & Conversion Tool 👾

Python >3.10.9


🌐 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? 👽️

  1. Clone the Repository
git clone <repository-url>
cd m2x
  1. 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 🐸

  1. Submit an Issue to report bugs or suggest new features
  2. Fork the repository and create a feature branch
  3. Implement features and write corresponding tests
  4. Submit a Pull Request with a description of the changes
  5. Merge after code review approval

Testing Instructions 👐

  • Testing Framework: pytest
  • Test Directory: Test cases are organized by module under the tests/ directory

🙏 Acknowledgments


📞 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_m2x-0.1.2.tar.gz (22.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_m2x-0.1.2-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

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

Hashes for python_m2x-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f79103ab58d2be69e60970bc9a0b5d0b1af17f7daff3d0629f2c1e3820922f82
MD5 5f44787ed0275c89eb518e88a94bacab
BLAKE2b-256 1e662497bacbe995749d9f1e2da0f4208305d6875103a141472ece5992918bc4

See more details on using hashes here.

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

Hashes for python_m2x-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8aaf37adde0f0d0816f20dfc413a8cba088c84dc58a37df12594d999a5fea5b6
MD5 7e58b117df40cd8086d356ffe18e2d95
BLAKE2b-256 d5dabe3fcfc7bb5760078a69da4a49701830fcaa3671040d79a14ac439e9fc5a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page