bundlewrap/bundles/paperless-ng/metadata.py
Franziska Kunsmann a3300cde98
Some checks failed
kunsi/bundlewrap/pipeline/head There was a failure building this commit
bundles/paperless: ensure we're doing backups of the actual data, too
2022-01-05 07:50:22 +01:00

58 lines
1.3 KiB
Python

defaults = {
'apt': {
'packages': {
# for paperless itself
'fonts-liberation': {},
'gnupg': {},
'imagemagick': {},
'libmagic-dev': {},
'libpq-dev': {},
'mime-support': {},
'optipng': {},
'python3-wheel': {},
# for OCRmyPDF
'ghostscript': {},
'icc-profiles-free': {},
'liblept5': {},
'libxml2': {},
'pngquant': {},
'qpdf': {},
'tesseract-ocr': {},
'unpaper': {},
'zlib1g': {},
},
},
'backups': {
'paths': {
'/mnt/paperless',
},
},
'postgresql': {
'roles': {
'paperless': {
'password': repo.vault.password_for(f'{node.name} postgresql paperless'),
},
},
'databases': {
'paperless': {
'owner': 'paperless',
},
},
},
}
@metadata_reactor.provides(
'apt/packages',
)
def paperless_tesseract_languages(metadata):
packages = {}
for lang in metadata.get('paperless/ocr_languages', {'deu', 'eng'}):
packages[f'tesseract-ocr-{lang}'] = {}
return {
'apt': {
'packages': packages,
},
}