nodes/home.paperless: introduce
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
aaf937a89f
commit
22c98a4206
12 changed files with 370 additions and 5 deletions
53
bundles/paperless-ng/metadata.py
Normal file
53
bundles/paperless-ng/metadata.py
Normal file
|
@ -0,0 +1,53 @@
|
|||
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': {},
|
||||
},
|
||||
},
|
||||
'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,
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue