docspell/modules
eikek 8269a73a83
Extend config for external commands (#2536)
Allows to configure external commands and provide different arguments
based on runtime values, like language. It extends the current config
of a command to allow a `arg-mappings` section. An example for
ocrmypdf:

```conf
ocrmypdf = {
  enabled = true
  command = {
    program = "ocrmypdf"
### new arg-mappings
    arg-mappings = {
      "mylang" = {
        value = "{{lang}}"
        mappings = [
          {
            matches = "deu"
            args = [ "-l", "deu", "--pdf-renderer", "sandwich" ]
          },
          {
            matches = ".*"
            args = [ "-l", "{{lang}}" ]
          }
        ]
      }
    }
#### end new arg-mappings
    args = [
      ### will be replaced with corresponding args from "mylang" mapping
      "{{mylang}}", 
      "--skip-text",
      "--deskew",
      "-j", "1",
      "{{infile}}",
      "{{outfile}}"
    ]
    timeout = "5 minutes"
  }
  working-dir = ${java.io.tmpdir}"/docspell-convert"
}
```

The whole section will be first processed to replace all `{{…}}`
patterns with corresponding values. Then `arg-mappings` will be looked
at and the first match (value == matches) in its `mappings` array is
used to replace its name in the arguments to the command.
2024-03-08 21:34:42 +01:00
..
addonlib/src Fix compile warnings after scala update 2024-03-03 18:43:54 +01:00
analysis/src Fix compile warnings after scala update 2024-03-03 18:43:54 +01:00
backend/src Fix compile warnings after scala update 2024-03-03 18:43:54 +01:00
common/src Extend config for external commands (#2536) 2024-03-08 21:34:42 +01:00
config/src Updated following dependencies as they need changes to the code to work properly: 2023-10-31 14:24:00 -04:00
convert/src Extend config for external commands (#2536) 2024-03-08 21:34:42 +01:00
extract/src Extend config for external commands (#2536) 2024-03-08 21:34:42 +01:00
files/src Updated following dependencies as they need changes to the code to work properly: 2023-10-31 14:24:00 -04:00
fts-client/src/main/scala/docspell/ftsclient Fix fulltext search queries for new collective-id 2022-08-07 16:28:22 +02:00
fts-psql/src Merge pull request #2208 from mprasil/add-slovak-language-support 2023-12-19 23:13:11 +01:00
fts-solr/src/main/scala/docspell/ftssolr Fix compile warnings after scala update 2024-03-03 18:43:54 +01:00
joex/src Fix compile warnings after scala update 2024-03-03 18:43:54 +01:00
joexapi/src/main Set version to 0.42.0-SNAPSHOT 2024-01-29 22:14:54 +01:00
jsonminiq/src Remove print statement 2021-12-11 22:46:55 +01:00
logging Update scribe 2023-11-06 00:06:49 +01:00
notification Fix compile warnings after scala update 2024-03-03 18:43:54 +01:00
oidc/src Update jwt-circe 2023-11-05 23:43:17 +01:00
pubsub Fix logging in tests 2022-02-19 23:33:01 +01:00
query Fix compile warnings after scala update 2024-03-03 18:43:54 +01:00
restapi/src/main Set version to 0.42.0-SNAPSHOT 2024-01-29 22:14:54 +01:00
restserver/src Fix compile warnings after scala update 2024-03-03 18:43:54 +01:00
scheduler Fix compile warnings after scala update 2024-03-03 18:43:54 +01:00
store/src Fix compile warnings after scala update 2024-03-03 18:43:54 +01:00
totp/src Add support for more generic notification 2021-12-11 18:57:32 +01:00
webapp Merge pull request #2500 from nekrondev/master 2024-02-24 00:56:13 +01:00