mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-03-27 17:35:04 +00:00
Merge pull request #2659 from eikek/fix-command-mappings-config
Move arg-mappings underneath `command` section
This commit is contained in:
commit
870bfd9cf0
@ -593,27 +593,27 @@ Docpell Update Check
|
|||||||
# To convert image files to PDF files, tesseract is used. This
|
# To convert image files to PDF files, tesseract is used. This
|
||||||
# also extracts the text in one go.
|
# also extracts the text in one go.
|
||||||
tesseract = {
|
tesseract = {
|
||||||
# Custom Language Mappings Below
|
|
||||||
# Japanese Vertical Mapping
|
|
||||||
arg-mappings = {
|
|
||||||
"tesseract_lang" = {
|
|
||||||
value = "{{lang}}"
|
|
||||||
mappings = [
|
|
||||||
{
|
|
||||||
matches = "jpn_vert"
|
|
||||||
args = [ "-l", "jpn_vert", "-c", "preserve_interword_spaces=1" ]
|
|
||||||
},
|
|
||||||
# Start Other Custom Language Mappings Here
|
|
||||||
# Default Mapping Below
|
|
||||||
{
|
|
||||||
matches = ".*"
|
|
||||||
args = [ "-l", "{{lang}}" ]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
command = {
|
command = {
|
||||||
program = "tesseract"
|
program = "tesseract"
|
||||||
|
# Custom Language Mappings Below
|
||||||
|
# Japanese Vertical Mapping
|
||||||
|
arg-mappings = {
|
||||||
|
"tesseract_lang" = {
|
||||||
|
value = "{{lang}}"
|
||||||
|
mappings = [
|
||||||
|
{
|
||||||
|
matches = "jpn_vert"
|
||||||
|
args = [ "-l", "jpn_vert", "-c", "preserve_interword_spaces=1" ]
|
||||||
|
},
|
||||||
|
# Start Other Custom Language Mappings Here
|
||||||
|
# Default Mapping Below
|
||||||
|
{
|
||||||
|
matches = ".*"
|
||||||
|
args = [ "-l", "{{lang}}" ]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
# Default arguments for all processing go below.
|
# Default arguments for all processing go below.
|
||||||
args = [
|
args = [
|
||||||
"{{infile}}",
|
"{{infile}}",
|
||||||
@ -667,29 +667,29 @@ Docpell Update Check
|
|||||||
# (where ocr is not necessary). In this case, the pdf will be
|
# (where ocr is not necessary). In this case, the pdf will be
|
||||||
# converted to PDF/A.
|
# converted to PDF/A.
|
||||||
ocrmypdf = {
|
ocrmypdf = {
|
||||||
# Custom argument mappings for this program.
|
|
||||||
arg-mappings = {
|
|
||||||
"ocr_lang" = {
|
|
||||||
value = "{{lang}}"
|
|
||||||
# Custom Language Mappings Below
|
|
||||||
# Japanese Vertical Mapping
|
|
||||||
mappings = [
|
|
||||||
{
|
|
||||||
matches = "jpn_vert"
|
|
||||||
args = [ "-l", "jpn_vert", "--pdf-renderer", "sandwich", "--tesseract-pagesegmode", "5" ]
|
|
||||||
},
|
|
||||||
# Start Other Custom Language Mappings Here
|
|
||||||
# Default Mapping Below
|
|
||||||
{
|
|
||||||
matches = ".*"
|
|
||||||
args = [ "-l", "{{lang}}" ]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
enabled = true
|
enabled = true
|
||||||
command = {
|
command = {
|
||||||
program = "ocrmypdf"
|
program = "ocrmypdf"
|
||||||
|
# Custom argument mappings for this program.
|
||||||
|
arg-mappings = {
|
||||||
|
"ocr_lang" = {
|
||||||
|
value = "{{lang}}"
|
||||||
|
# Custom Language Mappings Below
|
||||||
|
# Japanese Vertical Mapping
|
||||||
|
mappings = [
|
||||||
|
{
|
||||||
|
matches = "jpn_vert"
|
||||||
|
args = [ "-l", "jpn_vert", "--pdf-renderer", "sandwich", "--tesseract-pagesegmode", "5" ]
|
||||||
|
},
|
||||||
|
# Start Other Custom Language Mappings Here
|
||||||
|
# Default Mapping Below
|
||||||
|
{
|
||||||
|
matches = ".*"
|
||||||
|
args = [ "-l", "{{lang}}" ]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
# Default arguments for all processing go below.
|
# Default arguments for all processing go below.
|
||||||
args = [
|
args = [
|
||||||
"{{ocr_lang}}",
|
"{{ocr_lang}}",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user