Skip to main content

Convert files from various sources (SharePoint, S3, Azure Blob, etc.) to Markdown and upload to destinations (Google Drive, SharePoint, etc.).

Project description

Ws-Mark-Flow AI Converter

Convert files from various sources (SharePoint, S3, Azure Blob, etc.) to Markdown and upload to destinations (Google Drive, SharePoint, etc.).

Features

  • Multi-source support: SharePoint, S3, Azure Blob Storage (extensible)
  • Multi-destination support: Google Drive, SharePoint, S3 (extensible)
  • File conversion: PDF, DOCX, PPTX, XLSX, CSV, images, and more → Markdown
  • Incremental conversion: Only converts files not already in destination
  • Job persistence: MongoDB-backed job storage for resumable pipelines
  • REST API: FastAPI-based API for job management
  • Progress tracking: Real-time conversion progress and statistics

Architecture

┌─────────────┐     ┌──────────────┐     ┌───────────────┐
│   Source    │────▶│  Converter   │────▶│  Destination  │
│ (SharePoint)│     │ (MarkItDown) │     │(Google Drive) │
└─────────────┘     └──────────────┘     └───────────────┘
                           │
                    ┌──────▼──────┐
                    │   MongoDB   │
                    │ (Job Store) │
                    └─────────────┘

Installation

# Install dependencies
uv pip install -r requirements.txt

# Copy environment file
cp .env.example .env
# Edit .env with your MongoDB URI

# Run with auto-reload
uvicorn src.main:app --reload --port 8000

API Documentation

Supported Integrations

Sources

  • SharePoint (sharepoint): Microsoft Graph API
  • More coming: S3, Azure Blob, Local filesystem

Destinations

  • Google Drive (google_drive): Google Drive API v3
  • More coming: SharePoint, S3, Azure Blob

Supported File Types

Converted using Microsoft MarkItDown, Docling or LLM-based analysis for complex PDFs & images.

  • Documents: PDF, DOCX, DOC, RTF, TXT
  • Presentations: PPTX, PPT
  • Spreadsheets: XLSX, XLS, CSV
  • Web: HTML, XML, JSON, YAML
  • Images: PNG, JPG, GIF, BMP, TIFF (OCR)

Configuration

Main Environment Variables

Variable Default Description
AUTH_USERNAME admin Basic auth username
AUTH_PASSWORD yourpassword Basic auth password
MONGODB_URI mongodb://localhost:27017 MongoDB connection string
MONGODB_DATABASE converter Database name
TEMP_DIR ./.data/converter Temporary file storage

Development

🔖 requirements

  • install uv venv package management
py -m pip install --upgrade uv
# create venv
uv venv
# activate venv
#win: .venv/Scripts/activate
#linux: source .venv/bin/activate
  • project requirements update
uv pip install --upgrade -r requirements.txt
  • build tools
uv pip install --upgrade setuptools build twine 

🪛 build

  • clean dist and build package
if (Test-Path ./dist) {rm ./dist -r -force}; `
python -m build && twine check dist/*
  • linux/mac
[ -d ./dist ] && rm -rf ./dist
python -m build && twine check dist/*

📦 test / 🧪 debugger

Install the package in editable project location

uv pip install -U -e .
uv pip show ws-mark-flow

code quality tools

# .\src\robot
uv pip install -U scanreq prospector[with_everything]
## unused requirements
scanreq -r requirements.txt -p ./src
## style/linting
prospector ./src -t pylint -t pydocstyle
## code quality/complexity
prospector ./src -t vulture -t mccabe -t mypy 
## security
prospector ./src -t dodgy -t bandit
## package
prospector ./src -t pyroma

✈️ publish

  • pypi

    twine upload --verbose dist/* 
    

Docker

  • Build the Docker image (override version at build time if needed)
docker build -t ws-mark-flow ./app

# Copy environment file
cp .env.example ./app/.env
# Edit .env 

docker run -p 80:80 --env-file ./app/.env ws-mark-flow
# use host.docker.internal for MongoDB connection from container to host
docker run --add-host=host.docker.internal:host-gateway -p 80:80 --env-file ./app/.env ws-mark-flow

License

MIT

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

ws_mark_flow-0.0.8.tar.gz (99.2 kB view details)

Uploaded Source

Built Distribution

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

ws_mark_flow-0.0.8-py3-none-any.whl (116.0 kB view details)

Uploaded Python 3

File details

Details for the file ws_mark_flow-0.0.8.tar.gz.

File metadata

  • Download URL: ws_mark_flow-0.0.8.tar.gz
  • Upload date:
  • Size: 99.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for ws_mark_flow-0.0.8.tar.gz
Algorithm Hash digest
SHA256 e27cd9e4fd21dcf388c8f24e06820496e8704df39173c1786111ad14a6d97cca
MD5 b27d9198a3312e75c7af7db167df6ee7
BLAKE2b-256 98dd9d6c0daabc47f4a669c9a38a3aa33ecf00e425aafa35284320a9c7ef1608

See more details on using hashes here.

File details

Details for the file ws_mark_flow-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: ws_mark_flow-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 116.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for ws_mark_flow-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 8770220773eec2c0e0f39ad68ef653a691b6237d6033dc077ae7872123e24409
MD5 f7552e2297ce5daed896b8d11dcbe6e7
BLAKE2b-256 b569fc45a7e96a67f25232d57380a5df4a53c2fc9b3f318b3d328c0c469630f9

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