Skip to content

πŸ–¨οΈ Automated scanner document processor with AI-powered naming and Nextcloud integration. Receives scans via FTP, extracts text using Vision AI, generates intelligent filenames with Ollama AI, and uploads to your cloud storage.

Notifications You must be signed in to change notification settings

SystemVll/Montscan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

image

Montscan: Automated scanner document processor with Vision AI, AI naming, and Nextcloud upload! ✨


✨ Features

  • πŸ“‘ FTP Server - Receives documents from network scanners
  • πŸ‘οΈ Vision AI Processing - Analyzes scanned documents using Ollama vision models
  • πŸ€– AI-Powered Naming - Generates descriptive filenames in French using Ollama
  • ☁️ WebDAV Integration - Automatically uploads processed documents via WebDAV (supports Nextcloud, ownCloud, and other WebDAV servers)
  • 🎨 Colorful CLI - Beautiful startup banner with configuration overview
  • 🐳 Docker Support - Easy deployment with Docker Compose

πŸ“‹ Table of Contents


πŸ”§ Prerequisites

  • Go 1.24+
  • Poppler (pdftoppm) or ImageMagick - For PDF to image conversion
  • Ollama - Installation guide with a vision model (e.g., llava, llama3.2-vision)
  • WebDAV server (optional) - For cloud storage integration (supports Nextcloud, ownCloud, and other WebDAV-compatible servers)

πŸ“¦ Installation

Local Installation

  1. Clone the repository

    git clone https://github.com/SystemVll/Montscan.git
    cd Montscan
  2. Build the application

    go build -o montscan .
  3. Install Poppler or ImageMagick

    • Windows: Download from GitHub Releases
    • Linux: sudo apt-get install poppler-utils
    • macOS: brew install poppler
  4. Set up Ollama with a vision model

    # Install Ollama from https://ollama.ai/
    ollama pull llava
    # or any other vision-capable model

βš™οΈ Configuration Options

Variable Description Default
FTP_HOST FTP server host address 0.0.0.0
FTP_PORT FTP server port 21
FTP_USERNAME FTP authentication username scanner
FTP_PASSWORD FTP authentication password scanner123
FTP_UPLOAD_DIR Local directory for uploaded files ./scans
WEBDAV_URL WebDAV server URL -
WEBDAV_USERNAME WebDAV username -
WEBDAV_PASSWORD WebDAV password -
WEBDAV_UPLOAD_PATH Upload path on WebDAV server /Documents/Scanned
OLLAMA_HOST Ollama service URL http://localhost:11434
OLLAMA_MODEL Ollama vision model to use llava

πŸš€ Usage

Running Locally

# Set environment variables (optional, defaults are provided)
export FTP_USERNAME=your-username
export FTP_PASSWORD=your-password
export WEBDAV_URL=https://your-webdav-server.com
export WEBDAV_USERNAME=your-webdav-user
export WEBDAV_PASSWORD=your-webdav-password

# Run the application
./montscan

You should see a colorful startup banner:

══════════════════════════════════════════════════════════════════════
β•‘  πŸ–¨οΈ  MONTSCAN - Scanner Document Processing System  πŸ“„  β•‘
══════════════════════════════════════════════════════════════════════

πŸ“‘ FTP Server Configuration:
   β”œβ”€ Host: 0.0.0.0
   β”œβ”€ Port: 21
   β”œβ”€ Username: your-username
   └─ Upload Directory: /path/to/scans

☁️  WebDAV Integration:
   └─ URL: https://your-webdav-server.com

πŸ€– AI Processing (Ollama):
   β”œβ”€ Host: http://localhost:11434
   └─ Model: llava

πŸ“„ PDF Processing:
   └─ Tool: pdftoppm

──────────────────────────────────────────────────────────────────────
βœ… All systems initialized - Ready to process documents!
──────────────────────────────────────────────────────────────────────

πŸš€ Server is now running! Press Ctrl+C to stop.

Using with a Network Scanner

  1. Configure your network scanner to send scans via FTP
  2. Set the FTP server address to your Montscan instance
  3. Use the credentials from your environment variables
  4. Scan a document - it will be automatically processed!

🐳 Docker Deployment

Using Docker Compose

  1. Update environment variables in docker-compose.yml

  2. Build and start the container

    docker-compose up -d
  3. View logs

    docker-compose logs -f
  4. Stop the container

    docker-compose down

Using Docker directly

# Build the image
docker build -t montscan .

# Run the container
docker run -d \
  -p 21:21 \
  -p 21000-21010:21000-21010 \
  -v ./scans:/app/scans \
  -e FTP_USERNAME=scanner \
  -e FTP_PASSWORD=scanner123 \
  -e WEBDAV_URL=https://your-webdav-server.com \
  -e WEBDAV_USERNAME=your-webdav-user \
  -e WEBDAV_PASSWORD=your-webdav-password \
  -e OLLAMA_HOST=http://host.docker.internal:11434 \
  --name montscan \
  montscan

πŸ” Troubleshooting

Common Issues

FTP Connection Refused

  • Solution: Check that the FTP port (default 21) is not blocked by firewall
  • On Windows, you may need to allow the application through the firewall

AI Naming Fails

  • Solution: Verify Ollama is running and a vision model is downloaded
  • Test with: ollama list and ensure you have a vision-capable model (e.g., llava, llama3.2-vision)

WebDAV Upload Fails

  • Solution: Check WebDAV credentials and URL
  • Ensure the upload path exists on your WebDAV server
  • For Nextcloud: Verify WebDAV is enabled on your Nextcloud instance
  • For other WebDAV servers: Ensure the URL points directly to the WebDAV endpoint

Poppler/ImageMagick Not Found

  • Solution: Install Poppler or ImageMagick and ensure it's in your system PATH
  • Windows: Add Poppler's bin folder to PATH environment variable

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments


πŸ“§ Contact

For questions or support, please open an issue on GitHub.


Made with ❀️ for automated document management

About

πŸ–¨οΈ Automated scanner document processor with AI-powered naming and Nextcloud integration. Receives scans via FTP, extracts text using Vision AI, generates intelligent filenames with Ollama AI, and uploads to your cloud storage.

Topics

Resources

Stars

Watchers

Forks