mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-03-28 01:35:06 +00:00
Adopt website examples
This commit is contained in:
parent
212c10e20a
commit
11aa8e5392
@ -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 {
|
||||
@ -52,7 +53,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"
|
||||
),
|
||||
@ -60,7 +62,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"
|
||||
)
|
||||
@ -76,7 +79,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
|
||||
|
Loading…
x
Reference in New Issue
Block a user