Commit Graph

211 Commits

Author SHA1 Message Date
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
eikek
924aaf720e Fix compile warnings after scala update 2024-03-03 18:43:54 +01:00
eikek
b02a5c21fa
Merge pull request #2208 from mprasil/add-slovak-language-support
Add support for Slovak language
2023-12-19 23:13:11 +01:00
eikek
81d8b6c9c1 Allow to configure a region for s3 backend
Closes: #2386
2023-11-17 21:27:13 +01:00
mergify[bot]
c4a595d788
Merge pull request #2380 from eikek/custom-processing-data
Custom processing data
2023-11-15 19:28:03 +00:00
martin f. krafft
750be99aaf Add logic to set due date from addons, based on #2362
Signed-off-by: martin f. krafft <madduck@madduck.net>
2023-11-15 10:35:03 +01:00
eikek
83ad2c5044 First sketch for custom data threaded through item processing
Refs: #2334
2023-11-13 16:45:30 +01:00
eikek
dd763e7796 Fix potential infinite loop
The code removed here was copied from another project some years back.
Now there is an improved version in fs2 that can be used.

Fixes: #2376
2023-11-12 13:04:03 +01:00
Vít Šesták
6dd30035f3 Setting item date from addons (#2345) 2023-11-07 09:06:16 +01:00
eikek
a9b0c0e086 Fix http server startup
Closes: #2358
2023-11-06 23:43:31 +01:00
Rehan Mahmood
2a39b2f6a6 Updated following dependencies as they need changes to the code to work properly:
- Scala
- fs2
- http4s
2023-10-31 14:24:00 -04:00
Miroslav Prasil
8826712259 Add support for Slovak language
Just the basic support was added following examples for other languages.
2023-08-03 14:26:19 +01:00
xshadowlegendx
7202f9f117 fixed format by sbt fix 2023-03-17 09:02:01 +07:00
xshadowlegendx
71548b93a7 add khmer lang 2023-03-16 23:51:50 +07:00
eikek
05ed96b2cc Fix querying shares without a name
Fixes: #1840
2022-11-14 12:38:07 +01:00
GooRoo
61d5585e68 Add Ukrainian language 2022-11-09 22:24:32 +01:00
eikek
c0feb13f63 Add Estonian language
Closes: #1646
2022-11-01 01:00:16 +01:00
eikek
b51b782c73 Apply formatting fixes 2022-08-07 16:31:09 +02:00
eikek
7424a9b2f9 Migrate background task to new collective id 2022-08-07 16:26:04 +02:00
eikek
ae4c49027f Refactor scala base db migrations. Add marker trait for task args 2022-08-07 16:26:04 +02:00
eikek
eabcffe71a Adopt restserver to new collective-id 2022-08-07 16:26:04 +02:00
eikek
53d92c4a26 Adopt backend to collective-id 2022-08-07 16:26:04 +02:00
eikek
77f22bb5ea Adopt store module to new collective table 2022-08-07 16:26:04 +02:00
eikek
2c9e012c96 Fix url parsing with trailing slash
Refs: #1545
2022-07-07 15:22:26 +02:00
eikek
2e5ad4960b Add a state parameter to oidc flow
Refs: #1619
2022-07-07 15:22:26 +02:00
eikek
6cef9d4f07 Improve performance of zip/unzip
Adds tests and includes some cleanup
2022-06-18 16:39:57 +02:00
eikek
04ccad2ce0 Temporary table support for holding fts results 2022-05-29 22:33:50 +02:00
eikek
5ec311c331 Add polish to processing lanugages
SOLR doesn't support polish out of the box. Plugins are required for
polish. The language has been added only with basic support. For
better results, a manual setup of solr is required.

Closes: #1345
2022-05-21 14:41:16 +02:00
eikek
9d69401fea Add Lithuanian to processing languages
SOLR doesn't support Lithuanian, maybe it can be added via plugins. A
manual setup of solr is required then. It has been added with basic
support.

Closes: #1540
2022-05-21 14:36:01 +02:00
eikek
7fdd78ad06 Experiment with addons
Addons allow to execute external programs in some context inside
docspell. Currently it is possible to run them after processing files.
Addons are provided by URLs to zip files.
2022-05-15 23:46:43 +02:00
eikek
4488291319 Download multiple files as zip 2022-04-09 15:28:51 +02:00
eikek
21e13341e3 Configure postgres fts backend 2022-03-21 11:05:03 +01:00
eikek
b84bbbd750 Upload zip files contents as independent files 2022-03-20 11:40:25 +01:00
moerfi
a6e79a32a8 Change scanRecursively to an Option field 2022-03-15 21:52:54 +01:00
moerfi
39f2f8cc1b Add a recursive mail folder scan option to ScanMailboxTask 2022-03-15 21:52:54 +01:00
eikek
3a05dc56cb Refactor scheduler into api / impl 2022-03-13 15:20:33 +01:00
eikek
c1ce0769eb Check file integrity 2022-03-12 12:58:34 +01:00
eikek
422c0905dc Add task to copy files 2022-03-12 12:58:28 +01:00
eikek
e82b00c582 Use different file stores based on config 2022-03-12 12:19:00 +01:00
eikek
9545431d59 Allow the user to set time zone
Fix timezone handling for periodic tasks
2022-03-01 23:15:59 +01:00
eikek
e483a97de7 Adopt to new loggin api 2022-02-19 21:41:38 +01:00
eikek
553b1fa249 Add a file-repository for better organizing files
Docspell now must use a new api for accessing files.

Issue: #1379
2022-02-15 22:20:06 +01:00
eikek
d6829ea69b Allow background tasks return results that are included in the event 2022-02-09 23:39:53 +01:00
eikek
42d631876d Remove obsolete code 2022-01-11 21:09:38 +01:00
eikek
c21b2cdd29 Update scalafmt to 3.0.8 2021-12-11 22:46:55 +01:00
eikek
4ffc8d1f14 Add support for more generic notification
This is a start to have different kinds of notifications. It is
possible to be notified via e-mail, matrix or gotify. It also extends
the current "periodic query" for due items by allowing notification
over different channels. A "generic periodic query" variant is added
as well.
2021-12-11 18:57:32 +01:00
eikek
501c6f2988 Updating stanford corenlp to 4.3.2; adding more languages
There are models for Spanish, that have been added now. Also the
Hungarian language has been added to the list of supported
languages (for tesseract mainly, no nlp models)
2021-11-20 14:31:39 +01:00
eikek
3e58d97f72 Add websockets and notify frontend when an item is processed 2021-11-06 21:32:30 +01:00
eikek
f38d520a1d Hooking the new pubsub impl into the application 2021-11-06 01:44:06 +01:00
eikek
4e5924d796 Refactor config loading and add config from environment
Issue: #1121
2021-10-24 23:02:39 +02:00