mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 10:28:27 +00:00
Add startup task to find page counts of existing files
This commit is contained in:
@ -2,8 +2,9 @@ package docspell.common
|
||||
|
||||
object DocspellSystem {
|
||||
|
||||
val user = Ident.unsafe("docspell-system")
|
||||
val taskGroup = user
|
||||
val migrationTaskTracker = Ident.unsafe("full-text-index-tracker")
|
||||
val allPreviewTaskTracker = Ident.unsafe("generate-all-previews")
|
||||
val user = Ident.unsafe("docspell-system")
|
||||
val taskGroup = user
|
||||
val migrationTaskTracker = Ident.unsafe("full-text-index-tracker")
|
||||
val allPreviewTaskTracker = Ident.unsafe("generate-all-previews")
|
||||
val allPageCountTaskTracker = Ident.unsafe("all-page-count-tracker")
|
||||
}
|
||||
|
@ -0,0 +1,24 @@
|
||||
package docspell.common
|
||||
|
||||
import io.circe.generic.semiauto._
|
||||
import io.circe.{Decoder, Encoder}
|
||||
|
||||
/** Arguments for the `MakePageCountTask` that reads the number of
|
||||
* pages for an attachment and stores it into the meta data of the
|
||||
* attachment.
|
||||
*/
|
||||
case class MakePageCountArgs(
|
||||
attachment: Ident
|
||||
)
|
||||
|
||||
object MakePageCountArgs {
|
||||
|
||||
val taskName = Ident.unsafe("make-page-count")
|
||||
|
||||
implicit val jsonEncoder: Encoder[MakePageCountArgs] =
|
||||
deriveEncoder[MakePageCountArgs]
|
||||
|
||||
implicit val jsonDecoder: Decoder[MakePageCountArgs] =
|
||||
deriveDecoder[MakePageCountArgs]
|
||||
|
||||
}
|
Reference in New Issue
Block a user