@@ 1,7 1,4 @@
-include .flake8.conf
-include .isort.cfg
-include .mypy.ini
-include init.sql
+include ocraas/init.sql
include ocraas/templates/*
include ocraas/static/*
include README.md
@@ 0,0 1,43 @@
+[main]
+static_dir = ./ocraas/static/
+template_dir = ./ocraas/templates/
+
+# use :memory: for no permanency
+db_path = sqlite.db
+admin_user = user
+admin_pass = pass
+
+# set where files will be stored
+# make sure this folder exists before running OCRaaS
+storage_root = ./storage/
+
+
+[dev]
+debug = 1
+
+
+[tesseract]
+# comma separated list of languages and scripts enabled on this server
+# see 'LANGUAGES AND SCRIPTS' section of `man tesseract` for possibilities
+# make sure these are all installed on your system
+langs = eng
+
+# additional flags
+flags =
+
+# uncomment this to override default location of tesseract trained data
+# data_dir = /path/to/tessdata
+
+
+[filetype]
+# assign a number in range 0-2 to each filetype
+# 0 -> disable this filetype
+# 1 -> enable this filetype
+# 2 -> enable this filetype
+
+# allow PNGs and JPEGs
+PNG = 1
+JPEG = 1
+
+# PDF processing is disabled by default for security reasons
+PDF = 0
@@ 8,6 8,10 @@ from setuptools import setup
ver = subprocess.run(['git', 'describe', '--tags'],
stdout=subprocess.PIPE).stdout.decode().strip()
+if not ver:
+ with open('ver', 'r') as f:
+ ver = f.read().strip()
+
setup(
name='ocraas',
packages=[
@@ 23,21 27,19 @@ setup(
'bottle-sqlite',
],
license='AGPL-3',
+ include_package_data=True,
package_data={
- '': [
- 'config.example.ini',
- '.isort.cfg',
- '.flake8.conf',
- '.mypy.ini',
+ 'ocraas': [
+ 'templates/*',
+ 'static/*',
+ 'config.dev-example.ini',
+ 'config.prod-example.ini',
'init.sql',
- 'README.md',
- 'ocraas/templates/*',
- 'ocraas/static/*',
],
},
scripts=[
'ocraas-initdb',
- 'readpdf',
'ocraas-run',
+ 'readpdf',
],
)