~turminal/ocraas

55beb6b5883174b2aeb4b2ca7fe697ba244e0931 — Bor Grošelj Simić 4 years ago ed63dd3 master 0.11.0
move some things around because python packaging is weird
5 files changed, 55 insertions(+), 13 deletions(-)

M MANIFEST.in
R config.example.ini => ocraas/config.dev-example.ini
A ocraas/config.prod-example.ini
R init.sql => ocraas/init.sql
M setup.py
M MANIFEST.in => MANIFEST.in +1 -4
@@ 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

R config.example.ini => ocraas/config.dev-example.ini +0 -0
A ocraas/config.prod-example.ini => ocraas/config.prod-example.ini +43 -0
@@ 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

R init.sql => ocraas/init.sql +0 -0
M setup.py => setup.py +11 -9
@@ 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',
    ],
)