mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Merge pull request #2380 from eikek/custom-processing-data
Custom processing data
This commit is contained in:
@ -16,7 +16,7 @@ Since Docspell is free software, the tools must also be free.
|
||||
# Considered Options
|
||||
|
||||
* [Apache POI](https://poi.apache.org) together with
|
||||
[this](https://search.maven.org/artifact/fr.opensagres.xdocreport/org.apache.poi.xwpf.converter.pdf/1.0.6/jar)
|
||||
[this](https://central.sonatype.com/artifact/fr.opensagres.xdocreport/org.apache.poi.xwpf.converter.pdf/1.0.6)
|
||||
library
|
||||
* [pandoc](https://pandoc.org/) external command
|
||||
* [abiword](https://www.abisource.com/) external command
|
||||
|
@ -7,6 +7,7 @@ import docspell.addons.out.NewItem.{Meta => ItemMeta}
|
||||
import docspell.common._
|
||||
import docspell.common.Timestamp
|
||||
import docspell.common.bc.{AttachmentAction, BackendCommand, ItemAction}
|
||||
import io.circe.Json
|
||||
import io.circe.syntax._
|
||||
|
||||
object AddonOutputExample extends Helper {
|
||||
@ -53,7 +54,8 @@ object AddonOutputExample extends Helper {
|
||||
metadata = FileMeta(
|
||||
language = Some(Language.English),
|
||||
skipDuplicate = Some(true),
|
||||
attachmentsOnly = Some(false)
|
||||
attachmentsOnly = Some(false),
|
||||
customData = None
|
||||
),
|
||||
file = "new-file1.docx"
|
||||
),
|
||||
@ -61,7 +63,8 @@ object AddonOutputExample extends Helper {
|
||||
metadata = FileMeta(
|
||||
language = Some(Language.German),
|
||||
skipDuplicate = Some(true),
|
||||
attachmentsOnly = Some(false)
|
||||
attachmentsOnly = Some(false),
|
||||
customData = None
|
||||
),
|
||||
file = "new-file2.pdf"
|
||||
)
|
||||
@ -77,7 +80,8 @@ object AddonOutputExample extends Helper {
|
||||
source = "the-addon-x".some,
|
||||
skipDuplicate = true.some,
|
||||
tags = List("tag1", "tag2").some,
|
||||
attachmentsOnly = None
|
||||
attachmentsOnly = None,
|
||||
customData = Some(Json.obj("my-id" -> Json.fromInt(42)))
|
||||
).some,
|
||||
files = List("a-file.pdf", "another.jpg")
|
||||
)
|
||||
|
@ -2,6 +2,7 @@ package docspell.website
|
||||
|
||||
import cats.syntax.option._
|
||||
import docspell.common.{Language, ProcessItemArgs}
|
||||
import io.circe.Json
|
||||
import io.circe.syntax._
|
||||
|
||||
object ItemArgsExample extends Helper {
|
||||
@ -18,7 +19,8 @@ object ItemArgsExample extends Helper {
|
||||
fileFilter = None,
|
||||
tags = List("given-tag-1").some,
|
||||
reprocess = false,
|
||||
attachmentsOnly = None
|
||||
attachmentsOnly = None,
|
||||
customData = Some(Json.obj("my-id" -> Json.fromInt(42)))
|
||||
)
|
||||
|
||||
val exampleJson = example.asJson.spaces2
|
||||
|
@ -5,6 +5,7 @@ import docspell.common.MetaProposal.Candidate
|
||||
import docspell.common._
|
||||
import docspell.joex.process.ItemData
|
||||
import docspell.store.records.{RAttachment, RAttachmentMeta, RItem}
|
||||
import io.circe.Json
|
||||
import io.circe.syntax._
|
||||
|
||||
object ItemDataExample extends Helper {
|
||||
@ -67,7 +68,8 @@ object ItemDataExample extends Helper {
|
||||
givenMeta = givenProposals,
|
||||
tags = List("tag-1"),
|
||||
classifyProposals = MetaProposalList.empty,
|
||||
classifyTags = List("invoice")
|
||||
classifyTags = List("invoice"),
|
||||
customData = Some(Json.obj("my-id" -> Json.fromInt(42)))
|
||||
)
|
||||
|
||||
val exampleJson = example.asJson.spaces2
|
||||
|
Reference in New Issue
Block a user