Skip to content

Convert documents to Markdown format through a simple API service.

Notifications You must be signed in to change notification settings

felipefontoura/doc2md

Repository files navigation

Doc2MD

Docker Pulls Docker Image Size

Convert documents to Markdown format through a simple API service.

🚀 Quick Start

Using Docker (Recommended)

docker run -d -p 5000:5000 felipefontoura/doc2md

API Usage

Convert a document to Markdown:

curl -X POST \
  -H "Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" \
  --data-binary "@your_document.xlsx" \
  http://localhost:5000/convert

✨ Features

  • Convert multiples files to Markdown (PDF, PowerPoint, Word, Excel, Images, Audio, HTML, CSV, JSON, XML and ZIP).
  • Simple REST API interface
  • Docker support
  • Easy deployment with Docker Stack

🛠️ Installation

Using Docker Hub

  1. Pull the image:
docker pull felipefontoura/doc2md
  1. Run the container:
docker run -d -p 5000:5000 felipefontoura/doc2md

💻 Usage

API Endpoints

Convert Document

curl -X POST \
 -H "Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" \
 --data-binary "@your_document.xlsx" \
 http://localhost:5000/convert

📦 Deployment

Docker Stack Deployment

Deploy using Docker Stack:

docker stack deploy --prune --resolve-image always -c stack.yml doc2md

Example doc2md.yml:

version: "3.7"
services:
  doc2md:
    image: felipefontoura/doc2md:latest
    environment:
      - OPENAI_API_KEY=sk-xxx
      - LLM_MODEL=gpt-4o
    ports:
      - "5000:5000"
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure

🔧 Development

  1. Clone the repository
  2. Build the Docker image locally
  3. Run tests
  4. Submit pull requests

📝 License

MIT License


Made with ❤️ by Felipe Fontoura

About

Convert documents to Markdown format through a simple API service.

Resources

Stars

Watchers

Forks

Packages

No packages published