mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Integrate OCRmyPDF args into ansible config
This commit is contained in:
		| @@ -11,12 +11,13 @@ paperlessng_virtualenv: "{{ paperlessng_directory }}/.venv" | ||||
| paperlessng_ocr_languages: | ||||
|   - eng | ||||
| paperlessng_time_zone: Europe/Berlin | ||||
| paperlessng_ocrmypdf_args: --optimize 1 | ||||
| # TODO Does optimze==1 really work with jbig2enc? | ||||
| # https://ocrmypdf.readthedocs.io/en/latest/jbig2.html#lossy-mode-jbig2 | ||||
| # Documentation states -O1 only applies lossless transformations | ||||
| # https://ocrmypdf.readthedocs.io/en/latest/optimizer.html#lossless-optimizations | ||||
| # see https://ocrmypdf.readthedocs.io/en/latest/api.html#ocrmypdf.ocr | ||||
| paperlessng_ocrmypdf_args: | ||||
|   - "deskew": true | ||||
|   - "clean": true | ||||
|   - "optimize": 1 | ||||
| paperlessng_use_jbig2enc: true | ||||
| paperlessng_big2enc_lossy: false | ||||
|  | ||||
| paperlessng_superuser_name: paperlessng | ||||
| paperlessng_superuser_email: paperlessng@example.com | ||||
|   | ||||
| @@ -183,10 +183,8 @@ | ||||
|       line: "PAPERLESS_FILENAME_FORMAT={{ paperlessng_filename_format }}" | ||||
|     - regexp: "^#?PAPERLESS_OCR_LANGUAGE=" | ||||
|       line: "PAPERLESS_OCR_LANGUAGE={{ paperlessng_ocr_languages | join('+') }}" | ||||
|     # - regexp: "^#PAPERLESS_OCR_USER_ARG=" | ||||
|     #   # TODO JSON dict required in conf | ||||
|     #   # https://paperless-ng.readthedocs.io/en/latest/configuration.html#ocr-settings | ||||
|     #   line: "PAPERLESS_OCR_USER_ARG=\"{{ paperlessng_ocrmypdf_args }}{{ ' --jbig2-lossy' if  paperlessng_use_jbig2enc else '' }}\"" | ||||
|     - regexp: "^#PAPERLESS_OCR_USER_ARG=" | ||||
|       line: "PAPERLESS_OCR_USER_ARG={{ paperlessng_ocrmypdf_args | combine({'jbig2_lossy': true} if paperlessng_big2enc_lossy else {}) }}" | ||||
|     - regexp: "^#?PAPERLESS_TIME_ZONE=" | ||||
|       line: "PAPERLESS_TIME_ZONE={{ paperlessng_time_zone }}" | ||||
|   no_log: yes | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Fabian Koller
					Fabian Koller