OsProject

OsProject
edit
id  scan2wiki
state  active
owner  Wolfgang Fahl
title  scan2wiki
url  https://github.com/WolfgangFahl/scan2wiki
version  0.5.1
description  Scan from cams and scanners to Document Management System and SemanticMediaWiki
date  2026-08-22
since  2021-03-21
until  


Installation

pip install scan2wiki
# alternatively if your pip is not a python3 pip
pip3 install scan2wiki 
# local install from source directory of scan2wiki 
pip install .

upgrade

pip install scan2wiki  -U
# alternatively if your pip is not a python3 pip
pip3 install scan2wiki -U


Motivation

We would like to scan results from different scanners but also get input directly from cameras or smartphones. The scanned results should then be put into a SemanticMediaWiki to be able to search and annotate the results.

Barcode scanning use case

see nicegui barcode scan and amazon lookup application

Scan Interface

Scan-interface.png

CLI Usage

scan2wiki

Semantified Document Management System webserver

scan2wiki -h
usage: scan2wiki [-h] [-a] [-d] [--debugLocalPath DEBUGLOCALPATH]
                 [--debugPort DEBUGPORT] [--debugRemotePath DEBUGREMOTEPATH]
                 [--debugServer DEBUGSERVER] [-f] [-q] [-v] [-V]
                 [--apache APACHE] [-c] [-l] [-i INPUT] [-rol] [--host HOST]
                 [--port PORT] [-s] [-rp ROOT_PATH] [-wc WEBCAMS]
                 [--web-host WEB_HOST]

Start the webserver on the default port 8334:

scan2wiki -s

Serve with webcams configured as name-url pairs:

scan2wiki -s --webcams cam1=http://cam1.example/mjpeg

cam2web

webcam emulator serving a camera via gphoto2 - e.g. an EOS as network camera

cam2web -h
usage: cam2web [-h] [-a] [-d] [--debugLocalPath DEBUGLOCALPATH]
               [--debugPort DEBUGPORT] [--debugRemotePath DEBUGREMOTEPATH]
               [--debugServer DEBUGSERVER] [-f] [-q] [-v] [-V]
               [--apache APACHE] [-c] [-l] [-i INPUT] [-rol] [--host HOST]
               [--port PORT] [-s] [--camera {gphoto2,mock}]
               [--rotate {0,90,180,270,auto}] [--fps FPS]

Serve a gphoto2 camera as MJPEG stream on the default port 8088:

cam2web -s

How to

Prerequisites

If you'd like to transfer the scanned results to a Semantic MediaWiki you might want to install one and contact the author for support.

Start the webserver

scan2wiki script

This script is an alternative to the one supplied with the python software - it automatically updates the software. You might want to first clone the software locally and modify the location in this script.

#!/bin/bash
# Start scan software
# WF 2018-12-24
# WF 2021-11-26
cd $HOME/Documents/pyworkspace/scan2wiki
git pull
scripts/run -k -s
sleep 1
tail -f /var/log/scan2wiki/scan2wiki.log