Scalafix organize-imports

This commit is contained in:
Eike Kettner 2020-06-28 21:10:38 +02:00
parent 672ed445b1
commit 347a029af8
210 changed files with 886 additions and 605 deletions

View File

@ -2,6 +2,7 @@ package docspell.analysis
import cats.effect._ import cats.effect._
import cats.implicits._ import cats.implicits._
import docspell.analysis.contact.Contact import docspell.analysis.contact.Contact
import docspell.analysis.date.DateFind import docspell.analysis.date.DateFind
import docspell.analysis.nlp.StanfordNerClassifier import docspell.analysis.nlp.StanfordNerClassifier

View File

@ -1,10 +1,10 @@
package docspell.analysis.contact package docspell.analysis.contact
import fs2.Stream
import cats.implicits._ import cats.implicits._
import fs2.Stream
import docspell.common._
import docspell.analysis.split._ import docspell.analysis.split._
import docspell.common._
object Contact { object Contact {
private[this] val protocols = Set("ftp", "http", "https") private[this] val protocols = Set("ftp", "http", "https")

View File

@ -1,6 +1,7 @@
package docspell.analysis.contact package docspell.analysis.contact
import cats.data.NonEmptyList import cats.data.NonEmptyList
import docspell.common.LenientUri import docspell.common.LenientUri
case class Domain(labels: NonEmptyList[String], tld: String) { case class Domain(labels: NonEmptyList[String], tld: String) {

View File

@ -2,12 +2,13 @@ package docspell.analysis.date
import java.time.LocalDate import java.time.LocalDate
import fs2.{Pure, Stream}
import docspell.common._
import docspell.analysis.split._
import scala.util.Try import scala.util.Try
import fs2.{Pure, Stream}
import docspell.analysis.split._
import docspell.common._
object DateFind { object DateFind {
def findDates(text: String, lang: Language): Stream[Pure, NerDateLabel] = def findDates(text: String, lang: Language): Stream[Pure, NerDateLabel] =

View File

@ -3,16 +3,16 @@ package docspell.analysis.nlp
import java.net.URL import java.net.URL
import java.util.zip.GZIPInputStream import java.util.zip.GZIPInputStream
import scala.jdk.CollectionConverters._
import scala.util.Using
import docspell.common._
import edu.stanford.nlp.ie.AbstractSequenceClassifier import edu.stanford.nlp.ie.AbstractSequenceClassifier
import edu.stanford.nlp.ie.crf.CRFClassifier import edu.stanford.nlp.ie.crf.CRFClassifier
import edu.stanford.nlp.ling.{CoreAnnotations, CoreLabel} import edu.stanford.nlp.ling.{CoreAnnotations, CoreLabel}
import org.log4s.getLogger import org.log4s.getLogger
import docspell.common._
import scala.util.Using
import scala.jdk.CollectionConverters._
object StanfordNerClassifier { object StanfordNerClassifier {
private[this] val logger = getLogger private[this] val logger = getLogger

View File

@ -1,20 +1,21 @@
package docspell.backend package docspell.backend
import cats.effect.{Blocker, ConcurrentEffect, ContextShift, Resource} import scala.concurrent.ExecutionContext
import org.http4s.client.Client
import org.http4s.client.blaze.BlazeClientBuilder import cats.effect._
import docspell.backend.auth.Login import docspell.backend.auth.Login
import docspell.backend.ops._ import docspell.backend.ops._
import docspell.backend.signup.OSignup import docspell.backend.signup.OSignup
import docspell.ftsclient.FtsClient
import docspell.joexapi.client.JoexClient import docspell.joexapi.client.JoexClient
import docspell.store.Store import docspell.store.Store
import docspell.store.queue.JobQueue import docspell.store.queue.JobQueue
import docspell.store.usertask.UserTaskStore import docspell.store.usertask.UserTaskStore
import docspell.ftsclient.FtsClient
import scala.concurrent.ExecutionContext
import emil.javamail.{JavaMailEmil, Settings} import emil.javamail.{JavaMailEmil, Settings}
import org.http4s.client.Client
import org.http4s.client.blaze.BlazeClientBuilder
trait BackendApp[F[_]] { trait BackendApp[F[_]] {

View File

@ -1,6 +1,7 @@
package docspell.backend package docspell.backend
import cats.effect._ import cats.effect._
import org.mindrot.jbcrypt.BCrypt import org.mindrot.jbcrypt.BCrypt
object Common { object Common {

View File

@ -2,6 +2,7 @@ package docspell.backend
import cats.effect._ import cats.effect._
import cats.implicits._ import cats.implicits._
import docspell.common._ import docspell.common._
import docspell.store.records.RJob import docspell.store.records.RJob

View File

@ -1,6 +1,7 @@
package docspell.backend package docspell.backend
import docspell.common.Password import docspell.common.Password
import org.mindrot.jbcrypt.BCrypt import org.mindrot.jbcrypt.BCrypt
object PasswordCrypt { object PasswordCrypt {

View File

@ -1,17 +1,18 @@
package docspell.backend.auth package docspell.backend.auth
import java.time.Instant
import javax.crypto.Mac
import javax.crypto.spec.SecretKeySpec
import cats.effect._ import cats.effect._
import cats.implicits._ import cats.implicits._
import java.time.Instant
import javax.crypto.Mac
import javax.crypto.spec.SecretKeySpec
import scodec.bits.ByteVector
import docspell.backend.Common import docspell.backend.Common
import AuthToken._ import docspell.backend.auth.AuthToken._
import docspell.common._ import docspell.common._
import scodec.bits.ByteVector
case class AuthToken(millis: Long, account: AccountId, salt: String, sig: String) { case class AuthToken(millis: Long, account: AccountId, salt: String, sig: String) {
def asString = s"$millis-${b64enc(account.asString)}-$salt-$sig" def asString = s"$millis-${b64enc(account.asString)}-$salt-$sig"

View File

@ -2,14 +2,16 @@ package docspell.backend.auth
import cats.effect._ import cats.effect._
import cats.implicits._ import cats.implicits._
import Login._
import docspell.backend.auth.Login._
import docspell.common._ import docspell.common._
import docspell.store.Store import docspell.store.Store
import docspell.store.queries.QLogin import docspell.store.queries.QLogin
import docspell.store.records.RUser import docspell.store.records.RUser
import org.log4s._
import org.mindrot.jbcrypt.BCrypt import org.mindrot.jbcrypt.BCrypt
import scodec.bits.ByteVector import scodec.bits.ByteVector
import org.log4s._
trait Login[F[_]] { trait Login[F[_]] {

View File

@ -1,14 +1,15 @@
package docspell.backend.ops package docspell.backend.ops
import fs2.Stream
import cats.implicits._
import cats.effect.{Effect, Resource} import cats.effect.{Effect, Resource}
import docspell.common._ import cats.implicits._
import docspell.store.{AddResult, Store} import fs2.Stream
import docspell.store.records.{RCollective, RContact, RUser}
import OCollective._
import docspell.backend.PasswordCrypt import docspell.backend.PasswordCrypt
import docspell.backend.ops.OCollective._
import docspell.common._
import docspell.store.queries.QCollective import docspell.store.queries.QCollective
import docspell.store.records.{RCollective, RContact, RUser}
import docspell.store.{AddResult, Store}
trait OCollective[F[_]] { trait OCollective[F[_]] {

View File

@ -1,10 +1,11 @@
package docspell.backend.ops package docspell.backend.ops
import cats.implicits._
import cats.effect.{Effect, Resource} import cats.effect.{Effect, Resource}
import cats.implicits._
import docspell.common.{AccountId, Ident} import docspell.common.{AccountId, Ident}
import docspell.store.{AddResult, Store}
import docspell.store.records.{REquipment, RItem} import docspell.store.records.{REquipment, RItem}
import docspell.store.{AddResult, Store}
trait OEquipment[F[_]] { trait OEquipment[F[_]] {

View File

@ -3,14 +3,15 @@ package docspell.backend.ops
import cats.effect._ import cats.effect._
import cats.implicits._ import cats.implicits._
import fs2.Stream import fs2.Stream
import docspell.backend.JobFactory
import docspell.backend.ops.OItemSearch._
import docspell.common._ import docspell.common._
import docspell.ftsclient._ import docspell.ftsclient._
import docspell.backend.JobFactory
import docspell.store.Store import docspell.store.Store
import docspell.store.records.RJob
import docspell.store.queue.JobQueue
import docspell.store.queries.QItem import docspell.store.queries.QItem
import OItemSearch.{Batch, ListItem, ListItemWithTags, Query} import docspell.store.queue.JobQueue
import docspell.store.records.RJob
trait OFulltext[F[_]] { trait OFulltext[F[_]] {

View File

@ -1,16 +1,18 @@
package docspell.backend.ops package docspell.backend.ops
import cats.data.OptionT import cats.data.OptionT
import cats.implicits._
import cats.effect.{Effect, Resource} import cats.effect.{Effect, Resource}
import cats.implicits._
import docspell.common._
import docspell.ftsclient.FtsClient
import docspell.store.queries.{QAttachment, QItem}
import docspell.store.records._
import docspell.store.{AddResult, Store}
import doobie._ import doobie._
import doobie.implicits._ import doobie.implicits._
import org.log4s.getLogger import org.log4s.getLogger
import docspell.store.{AddResult, Store}
import docspell.store.queries.{QAttachment, QItem}
import docspell.common._
import docspell.store.records._
import docspell.ftsclient.FtsClient
trait OItem[F[_]] { trait OItem[F[_]] {

View File

@ -1,26 +1,19 @@
package docspell.backend.ops package docspell.backend.ops
import fs2.Stream
import cats.data.OptionT import cats.data.OptionT
import cats.implicits._
import cats.effect.{Effect, Resource} import cats.effect.{Effect, Resource}
import doobie.implicits._ import cats.implicits._
import fs2.Stream
import docspell.backend.ops.OItemSearch._
import docspell.common._
import docspell.store.Store import docspell.store.Store
import docspell.store.queries.{QAttachment, QItem} import docspell.store.queries.{QAttachment, QItem}
import OItemSearch.{
AttachmentArchiveData,
AttachmentData,
AttachmentSourceData,
Batch,
ItemData,
ListItem,
ListItemWithTags,
Query
}
import bitpeace.{FileMeta, RangeDef}
import docspell.common._
import docspell.store.records._ import docspell.store.records._
import bitpeace.{FileMeta, RangeDef}
import doobie.implicits._
trait OItemSearch[F[_]] { trait OItemSearch[F[_]] {
def findItem(id: Ident, collective: Ident): F[Option[ItemData]] def findItem(id: Ident, collective: Ident): F[Option[ItemData]]

View File

@ -1,8 +1,9 @@
package docspell.backend.ops package docspell.backend.ops
import cats.implicits._
import cats.effect._
import cats.data.OptionT import cats.data.OptionT
import cats.effect._
import cats.implicits._
import docspell.backend.ops.OJob.{CollectiveQueueState, JobCancelResult} import docspell.backend.ops.OJob.{CollectiveQueueState, JobCancelResult}
import docspell.common.{Ident, JobState} import docspell.common.{Ident, JobState}
import docspell.store.Store import docspell.store.Store

View File

@ -1,15 +1,16 @@
package docspell.backend.ops package docspell.backend.ops
import cats.implicits._ import scala.concurrent.ExecutionContext
import cats.effect._
import cats.data.OptionT import cats.data.OptionT
import cats.effect._
import cats.implicits._
import docspell.common.{Ident, NodeType} import docspell.common.{Ident, NodeType}
import docspell.joexapi.client.JoexClient import docspell.joexapi.client.JoexClient
import docspell.store.Store import docspell.store.Store
import docspell.store.records.RNode import docspell.store.records.RNode
import scala.concurrent.ExecutionContext
trait OJoex[F[_]] { trait OJoex[F[_]] {
def notifyAllNodes: F[Unit] def notifyAllNodes: F[Unit]

View File

@ -1,18 +1,19 @@
package docspell.backend.ops package docspell.backend.ops
import fs2.Stream import cats.data.OptionT
import cats.effect._ import cats.effect._
import cats.implicits._ import cats.implicits._
import cats.data.OptionT import fs2.Stream
import emil._
import bitpeace.{FileMeta, RangeDef}
import docspell.backend.ops.OMail._
import docspell.common._ import docspell.common._
import docspell.store._ import docspell.store._
import docspell.store.syntax.MimeTypes._
import docspell.store.records._
import docspell.store.queries.QMails import docspell.store.queries.QMails
import OMail.{ImapSettings, ItemMail, Sent, SmtpSettings} import docspell.store.records._
import docspell.store.syntax.MimeTypes._
import bitpeace.{FileMeta, RangeDef}
import emil._
trait OMail[F[_]] { trait OMail[F[_]] {

View File

@ -2,10 +2,12 @@ package docspell.backend.ops
import cats.effect.{Effect, Resource} import cats.effect.{Effect, Resource}
import cats.implicits._ import cats.implicits._
import docspell.common.syntax.all._ import docspell.common.syntax.all._
import docspell.common.{Ident, LenientUri, NodeType} import docspell.common.{Ident, LenientUri, NodeType}
import docspell.store.Store import docspell.store.Store
import docspell.store.records.RNode import docspell.store.records.RNode
import org.log4s._ import org.log4s._
trait ONode[F[_]] { trait ONode[F[_]] {

View File

@ -1,12 +1,13 @@
package docspell.backend.ops package docspell.backend.ops
import cats.implicits._
import cats.effect.{Effect, Resource} import cats.effect.{Effect, Resource}
import cats.implicits._
import docspell.backend.ops.OOrganization._
import docspell.common._ import docspell.common._
import docspell.store._ import docspell.store._
import docspell.store.records._
import OOrganization._
import docspell.store.queries.QOrganization import docspell.store.queries.QOrganization
import docspell.store.records._
trait OOrganization[F[_]] { trait OOrganization[F[_]] {
def findAllOrg(account: AccountId, query: Option[String]): F[Vector[OrgAndContacts]] def findAllOrg(account: AccountId, query: Option[String]): F[Vector[OrgAndContacts]]

View File

@ -1,10 +1,11 @@
package docspell.backend.ops package docspell.backend.ops
import cats.implicits._
import cats.effect.{Effect, Resource} import cats.effect.{Effect, Resource}
import cats.implicits._
import docspell.common.{AccountId, Ident} import docspell.common.{AccountId, Ident}
import docspell.store.{AddResult, Store}
import docspell.store.records.RSource import docspell.store.records.RSource
import docspell.store.{AddResult, Store}
trait OSource[F[_]] { trait OSource[F[_]] {

View File

@ -1,10 +1,11 @@
package docspell.backend.ops package docspell.backend.ops
import cats.implicits._
import cats.effect.{Effect, Resource} import cats.effect.{Effect, Resource}
import cats.implicits._
import docspell.common.{AccountId, Ident} import docspell.common.{AccountId, Ident}
import docspell.store.{AddResult, Store}
import docspell.store.records.{RTag, RTagItem} import docspell.store.records.{RTag, RTagItem}
import docspell.store.{AddResult, Store}
trait OTag[F[_]] { trait OTag[F[_]] {

View File

@ -1,17 +1,19 @@
package docspell.backend.ops package docspell.backend.ops
import bitpeace.MimetypeHint
import cats.Functor import cats.Functor
import cats.data.{EitherT, OptionT} import cats.data.{EitherT, OptionT}
import cats.effect._ import cats.effect._
import cats.implicits._ import cats.implicits._
import docspell.backend.{Config, JobFactory}
import fs2.Stream import fs2.Stream
import docspell.backend.{Config, JobFactory}
import docspell.common._ import docspell.common._
import docspell.common.syntax.all._ import docspell.common.syntax.all._
import docspell.store.Store import docspell.store.Store
import docspell.store.queue.JobQueue import docspell.store.queue.JobQueue
import docspell.store.records._ import docspell.store.records._
import bitpeace.MimetypeHint
import org.log4s._ import org.log4s._
trait OUpload[F[_]] { trait OUpload[F[_]] {

View File

@ -1,14 +1,15 @@
package docspell.backend.ops package docspell.backend.ops
import cats.implicits._
import cats.effect._
import cats.data.OptionT import cats.data.OptionT
import io.circe.Encoder import cats.effect._
import cats.implicits._
import fs2.Stream import fs2.Stream
import docspell.common._
import docspell.store.queue.JobQueue import docspell.store.queue.JobQueue
import docspell.store.usertask._ import docspell.store.usertask._
import docspell.common._
import io.circe.Encoder
trait OUserTask[F[_]] { trait OUserTask[F[_]] {

View File

@ -1,6 +1,7 @@
package docspell.backend.signup package docspell.backend.signup
import docspell.common.{Duration, Password} import docspell.common.{Duration, Password}
import io.circe._ import io.circe._
case class Config(mode: Config.Mode, newInvitePassword: Password, inviteTime: Duration) case class Config(mode: Config.Mode, newInvitePassword: Password, inviteTime: Duration)

View File

@ -1,13 +1,15 @@
package docspell.backend.signup package docspell.backend.signup
import cats.implicits._
import cats.effect.{Effect, Resource} import cats.effect.{Effect, Resource}
import cats.implicits._
import docspell.backend.PasswordCrypt import docspell.backend.PasswordCrypt
import docspell.backend.ops.OCollective.RegisterData import docspell.backend.ops.OCollective.RegisterData
import docspell.common.syntax.all._
import docspell.common._ import docspell.common._
import docspell.store.{AddResult, Store} import docspell.common.syntax.all._
import docspell.store.records.{RCollective, RInvitation, RUser} import docspell.store.records.{RCollective, RInvitation, RUser}
import docspell.store.{AddResult, Store}
import doobie.free.connection.ConnectionIO import doobie.free.connection.ConnectionIO
import org.log4s.getLogger import org.log4s.getLogger

View File

@ -1,9 +1,11 @@
package docspell.common package docspell.common
import java.nio.charset.Charset
import java.nio.charset.StandardCharsets
import cats.effect._ import cats.effect._
import fs2.{Chunk, Pipe, Stream} import fs2.{Chunk, Pipe, Stream}
import java.nio.charset.Charset
import java.nio.charset.StandardCharsets
import scodec.bits.ByteVector import scodec.bits.ByteVector
final case class Binary[F[_]](name: String, mime: MimeType, data: Stream[F, Byte]) { final case class Binary[F[_]](name: String, mime: MimeType, data: Stream[F, Byte]) {

View File

@ -1,11 +1,14 @@
package docspell.common package docspell.common
import cats.implicits._
import scala.concurrent.duration.{FiniteDuration, Duration => SDur}
import java.time.{Duration => JDur} import java.time.{Duration => JDur}
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
import io.circe._
import scala.concurrent.duration.{Duration => SDur, FiniteDuration}
import cats.effect.Sync import cats.effect.Sync
import cats.implicits._
import io.circe._
case class Duration(nanos: Long) { case class Duration(nanos: Long) {

View File

@ -1,14 +1,15 @@
package docspell.common package docspell.common
import java.io.IOException import java.io.IOException
import java.nio.file._
import java.nio.file.attribute.BasicFileAttributes import java.nio.file.attribute.BasicFileAttributes
import java.nio.file.{FileVisitResult, Files, Path, SimpleFileVisitor}
import java.util.concurrent.atomic.AtomicInteger import java.util.concurrent.atomic.AtomicInteger
import scala.jdk.CollectionConverters._ import scala.jdk.CollectionConverters._
import fs2.Stream
import cats.implicits._
import cats.effect._ import cats.effect._
import cats.implicits._
import fs2.Stream
object File { object File {

View File

@ -1,8 +1,9 @@
package docspell.common package docspell.common
import scodec.bits.ByteVector
import java.nio.charset.StandardCharsets import java.nio.charset.StandardCharsets
import scodec.bits.ByteVector
final class Hash(bytes: ByteVector) { final class Hash(bytes: ByteVector) {
private def digest(name: String): String = private def digest(name: String): String =

View File

@ -4,8 +4,9 @@ import java.security.SecureRandom
import java.util.UUID import java.util.UUID
import cats.Eq import cats.Eq
import cats.implicits._
import cats.effect.Sync import cats.effect.Sync
import cats.implicits._
import io.circe.{Decoder, Encoder} import io.circe.{Decoder, Encoder}
import scodec.bits.ByteVector import scodec.bits.ByteVector

View File

@ -1,8 +1,9 @@
package docspell.common package docspell.common
import io.circe.{Decoder, Encoder}
import cats.data.NonEmptyList import cats.data.NonEmptyList
import io.circe.{Decoder, Encoder}
sealed trait ItemState { self: Product => sealed trait ItemState { self: Product =>
final def name: String = final def name: String =

View File

@ -1,17 +1,19 @@
package docspell.common package docspell.common
import java.net.URL
import fs2.Stream
import cats.implicits._
import cats.data.NonEmptyList
import cats.effect.{Blocker, ContextShift, Sync}
import docspell.common.LenientUri.Path
import io.circe.{Decoder, Encoder}
import java.net.URLEncoder
import scodec.bits.ByteVector
import cats.effect.Resource
import java.net.HttpURLConnection import java.net.HttpURLConnection
import java.net.URL
import java.net.URLEncoder
import cats.data.NonEmptyList
import cats.effect.Resource
import cats.effect.{Blocker, ContextShift, Sync}
import cats.implicits._
import fs2.Stream
import docspell.common.LenientUri.Path
import io.circe.{Decoder, Encoder}
import scodec.bits.ByteVector
/** A URI. /** A URI.
* *

View File

@ -1,7 +1,9 @@
package docspell.common package docspell.common
import cats.effect.Sync import cats.effect.Sync
import docspell.common.syntax.all._ import docspell.common.syntax.all._
import org.log4s.{Logger => Log4sLogger} import org.log4s.{Logger => Log4sLogger}
trait Logger[F[_]] { trait Logger[F[_]] {

View File

@ -1,13 +1,16 @@
package docspell.common package docspell.common
import cats.implicits._ import java.time.LocalDate
import cats.data.NonEmptyList import cats.data.NonEmptyList
import docspell.common._ import cats.implicits._
import cats.kernel.Order
import docspell.common.MetaProposal.Candidate import docspell.common.MetaProposal.Candidate
import docspell.common._
import io.circe._ import io.circe._
import io.circe.generic.semiauto._ import io.circe.generic.semiauto._
import java.time.LocalDate
import cats.kernel.Order
/** A proposed meta data to an item. /** A proposed meta data to an item.
* *

View File

@ -2,7 +2,9 @@ package docspell.common
import cats.data.NonEmptyList import cats.data.NonEmptyList
import cats.kernel.Monoid import cats.kernel.Monoid
import docspell.common.MetaProposal.Candidate import docspell.common.MetaProposal.Candidate
import io.circe._ import io.circe._
import io.circe.generic.semiauto._ import io.circe.generic.semiauto._

View File

@ -1,11 +1,14 @@
package docspell.common package docspell.common
import docspell.common.syntax.all._
import io.circe.{Decoder, Encoder}
import java.nio.charset.StandardCharsets
import java.nio.charset.Charset import java.nio.charset.Charset
import java.nio.charset.StandardCharsets
import cats.data.NonEmptyList import cats.data.NonEmptyList
import docspell.common.syntax.all._
import io.circe.{Decoder, Encoder}
/** A MIME Type impl with just enough features for the use here. /** A MIME Type impl with just enough features for the use here.
*/ */
case class MimeType(primary: String, sub: String, params: Map[String, String]) { case class MimeType(primary: String, sub: String, params: Map[String, String]) {

View File

@ -1,8 +1,10 @@
package docspell.common package docspell.common
import io.circe._, io.circe.generic.semiauto._
import docspell.common.syntax.all._ import docspell.common.syntax.all._
import io.circe._
import io.circe.generic.semiauto._
/** Arguments to the notification task. /** Arguments to the notification task.
* *
* This tasks queries items with a due date and informs the user via * This tasks queries items with a due date and informs the user via

View File

@ -1,8 +1,9 @@
package docspell.common package docspell.common
import cats.effect._
import scala.concurrent.ExecutionContext import scala.concurrent.ExecutionContext
import cats.effect._
/** Captures thread pools to use in an application. /** Captures thread pools to use in an application.
*/ */
case class Pools( case class Pools(

View File

@ -1,7 +1,8 @@
package docspell.common package docspell.common
import cats.implicits._
import cats.Order import cats.Order
import cats.implicits._
import io.circe.{Decoder, Encoder} import io.circe.{Decoder, Encoder}
sealed trait Priority { self: Product => sealed trait Priority { self: Product =>

View File

@ -1,8 +1,10 @@
package docspell.common package docspell.common
import io.circe._, io.circe.generic.semiauto._ import docspell.common.ProcessItemArgs._
import docspell.common.syntax.all._ import docspell.common.syntax.all._
import ProcessItemArgs._
import io.circe._
import io.circe.generic.semiauto._
/** Arguments to the process-item task. /** Arguments to the process-item task.
* *

View File

@ -1,8 +1,10 @@
package docspell.common package docspell.common
import io.circe._, io.circe.generic.semiauto._
import docspell.common.syntax.all._ import docspell.common.syntax.all._
import io.circe._
import io.circe.generic.semiauto._
/** Arguments to the poll-mailbox task. /** Arguments to the poll-mailbox task.
* *
* This tasks queries user mailboxes and pushes found mails into * This tasks queries user mailboxes and pushes found mails into

View File

@ -5,12 +5,12 @@ import java.lang.ProcessBuilder.Redirect
import java.nio.file.Path import java.nio.file.Path
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
import cats.implicits._
import cats.effect.{Blocker, ContextShift, Sync}
import fs2.{Stream, io, text}
import scala.jdk.CollectionConverters._ import scala.jdk.CollectionConverters._
import cats.effect.{Blocker, ContextShift, Sync}
import cats.implicits._
import fs2.{Stream, io, text}
object SystemCommand { object SystemCommand {
final case class Config(program: String, args: Seq[String], timeout: Duration) { final case class Config(program: String, args: Seq[String], timeout: Duration) {

View File

@ -1,12 +1,14 @@
package docspell.common package docspell.common
import java.util.concurrent.atomic.AtomicLong
import java.util.concurrent.{Executors, ThreadFactory}
import cats.effect._
import scala.concurrent._
import java.util.concurrent.ForkJoinPool import java.util.concurrent.ForkJoinPool
import java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory import java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory
import java.util.concurrent.ForkJoinWorkerThread import java.util.concurrent.ForkJoinWorkerThread
import java.util.concurrent.atomic.AtomicLong
import java.util.concurrent.{Executors, ThreadFactory}
import scala.concurrent._
import cats.effect._
object ThreadFactories { object ThreadFactories {

View File

@ -1,12 +1,13 @@
package docspell.common package docspell.common
import java.time.LocalDateTime
import java.time.ZonedDateTime
import java.time.temporal.ChronoUnit
import java.time.{Instant, LocalDate, ZoneId} import java.time.{Instant, LocalDate, ZoneId}
import cats.effect.Sync import cats.effect.Sync
import io.circe.{Decoder, Encoder} import io.circe.{Decoder, Encoder}
import java.time.temporal.ChronoUnit
import java.time.LocalDateTime
import java.time.ZonedDateTime
case class Timestamp(value: Instant) { case class Timestamp(value: Instant) {

View File

@ -1,12 +1,13 @@
package docspell.common.config package docspell.common.config
import scala.reflect.ClassTag
import docspell.common._ import docspell.common._
import com.github.eikek.calev.CalEvent
import pureconfig._ import pureconfig._
import pureconfig.error.{CannotConvert, FailureReason} import pureconfig.error.{CannotConvert, FailureReason}
import scodec.bits.ByteVector import scodec.bits.ByteVector
import com.github.eikek.calev.CalEvent
import scala.reflect.ClassTag
object Implicits { object Implicits {
implicit val lenientUriReader: ConfigReader[LenientUri] = implicit val lenientUriReader: ConfigReader[LenientUri] =

View File

@ -2,6 +2,7 @@ package docspell.common.syntax
import cats.effect.Sync import cats.effect.Sync
import fs2.Stream import fs2.Stream
import org.log4s.Logger import org.log4s.Logger
trait LoggerSyntax { trait LoggerSyntax {

View File

@ -1,8 +1,9 @@
package docspell.common.syntax package docspell.common.syntax
import cats.effect.Sync import cats.effect.Sync
import fs2.Stream
import cats.implicits._ import cats.implicits._
import fs2.Stream
import io.circe._ import io.circe._
import io.circe.parser._ import io.circe.parser._

View File

@ -1,6 +1,7 @@
package docspell.common.syntax package docspell.common.syntax
import cats.implicits._ import cats.implicits._
import io.circe.Decoder import io.circe.Decoder
import io.circe.parser._ import io.circe.parser._

View File

@ -2,9 +2,10 @@ package docspell.convert
import java.nio.charset.StandardCharsets import java.nio.charset.StandardCharsets
import fs2._
import cats.effect._ import cats.effect._
import cats.implicits._ import cats.implicits._
import fs2._
import docspell.common._ import docspell.common._
import docspell.convert.ConversionResult.Handler import docspell.convert.ConversionResult.Handler
import docspell.convert.extern.{Tesseract, Unoconv, WkHtmlPdf} import docspell.convert.extern.{Tesseract, Unoconv, WkHtmlPdf}

View File

@ -2,6 +2,7 @@ package docspell.convert
import cats.data.Kleisli import cats.data.Kleisli
import fs2.Stream import fs2.Stream
import docspell.common.MimeType import docspell.common.MimeType
sealed trait ConversionResult[F[_]] { sealed trait ConversionResult[F[_]] {

View File

@ -1,7 +1,8 @@
package docspell.convert package docspell.convert
import scodec.bits.ByteVector
import java.nio.charset.Charset import java.nio.charset.Charset
import scodec.bits.ByteVector
@FunctionalInterface @FunctionalInterface
trait SanitizeHtml { trait SanitizeHtml {

View File

@ -2,9 +2,10 @@ package docspell.convert.extern
import java.nio.file.Path import java.nio.file.Path
import cats.implicits._
import cats.effect._ import cats.effect._
import cats.implicits._
import fs2.{Pipe, Stream} import fs2.{Pipe, Stream}
import docspell.common._ import docspell.common._
import docspell.convert.ConversionResult import docspell.convert.ConversionResult
import docspell.convert.ConversionResult.{Handler, successPdf, successPdfTxt} import docspell.convert.ConversionResult.{Handler, successPdf, successPdfTxt}

View File

@ -4,6 +4,7 @@ import java.nio.file.Path
import cats.effect._ import cats.effect._
import fs2.Stream import fs2.Stream
import docspell.common._ import docspell.common._
import docspell.convert.ConversionResult import docspell.convert.ConversionResult
import docspell.convert.ConversionResult.Handler import docspell.convert.ConversionResult.Handler

View File

@ -4,6 +4,7 @@ import java.nio.file.Path
import cats.effect._ import cats.effect._
import fs2.Stream import fs2.Stream
import docspell.common._ import docspell.common._
import docspell.convert.ConversionResult import docspell.convert.ConversionResult
import docspell.convert.ConversionResult.Handler import docspell.convert.ConversionResult.Handler

View File

@ -1,14 +1,15 @@
package docspell.convert.extern package docspell.convert.extern
import java.nio.charset.Charset
import java.nio.file.Path import java.nio.file.Path
import cats.effect._ import cats.effect._
import cats.implicits._ import cats.implicits._
import fs2.{Chunk, Stream} import fs2.{Chunk, Stream}
import docspell.common._ import docspell.common._
import docspell.convert.{ConversionResult, SanitizeHtml}
import docspell.convert.ConversionResult.Handler import docspell.convert.ConversionResult.Handler
import java.nio.charset.Charset import docspell.convert.{ConversionResult, SanitizeHtml}
object WkHtmlPdf { object WkHtmlPdf {

View File

@ -3,18 +3,20 @@ package docspell.convert.flexmark
import java.io.{InputStream, InputStreamReader} import java.io.{InputStream, InputStreamReader}
import java.nio.charset.Charset import java.nio.charset.Charset
import java.util import java.util
import scala.util.Try import scala.util.Try
import cats.effect.Sync import cats.effect.Sync
import cats.implicits._ import cats.implicits._
import fs2.Stream
import docspell.common._
import com.vladsch.flexmark.ext.gfm.strikethrough.StrikethroughExtension import com.vladsch.flexmark.ext.gfm.strikethrough.StrikethroughExtension
import com.vladsch.flexmark.ext.tables.TablesExtension import com.vladsch.flexmark.ext.tables.TablesExtension
import com.vladsch.flexmark.html.HtmlRenderer import com.vladsch.flexmark.html.HtmlRenderer
import com.vladsch.flexmark.parser.Parser import com.vladsch.flexmark.parser.Parser
import com.vladsch.flexmark.util.data.{DataKey, MutableDataSet} import com.vladsch.flexmark.util.data.{DataKey, MutableDataSet}
import fs2.Stream
import docspell.common._
object Markdown { object Markdown {

View File

@ -1,9 +1,9 @@
package docspell.extract package docspell.extract
import docspell.common.MimeType
import scala.util.Try import scala.util.Try
import docspell.common.MimeType
sealed trait ExtractResult { sealed trait ExtractResult {
def textOption: Option[String] def textOption: Option[String]

View File

@ -2,15 +2,16 @@ package docspell.extract
import cats.effect._ import cats.effect._
import cats.implicits._ import cats.implicits._
import fs2.Stream
import docspell.common._ import docspell.common._
import docspell.extract.internal.Text
import docspell.extract.ocr.{OcrType, TextExtract} import docspell.extract.ocr.{OcrType, TextExtract}
import docspell.extract.odf.{OdfExtract, OdfType} import docspell.extract.odf.{OdfExtract, OdfType}
import docspell.extract.poi.{PoiExtract, PoiType} import docspell.extract.poi.{PoiExtract, PoiType}
import docspell.extract.rtf.RtfExtract import docspell.extract.rtf.RtfExtract
import docspell.extract.internal.Text
import fs2.Stream
import docspell.files.TikaMimetype
import docspell.files.ImageSize import docspell.files.ImageSize
import docspell.files.TikaMimetype
trait Extraction[F[_]] { trait Extraction[F[_]] {

View File

@ -1,12 +1,13 @@
package docspell.extract package docspell.extract
import cats.implicits._
import cats.effect._ import cats.effect._
import cats.implicits._
import fs2.Stream import fs2.Stream
import docspell.common.{Language, Logger} import docspell.common.{Language, Logger}
import docspell.extract.internal.Text
import docspell.extract.ocr.{OcrConfig, TextExtract} import docspell.extract.ocr.{OcrConfig, TextExtract}
import docspell.extract.pdfbox.PdfboxExtract import docspell.extract.pdfbox.PdfboxExtract
import docspell.extract.internal.Text
object PdfExtract { object PdfExtract {

View File

@ -4,6 +4,7 @@ import java.nio.file.Path
import cats.effect.{Blocker, ContextShift, Sync} import cats.effect.{Blocker, ContextShift, Sync}
import fs2.Stream import fs2.Stream
import docspell.common._ import docspell.common._
object Ocr { object Ocr {

View File

@ -1,11 +1,12 @@
package docspell.extract.ocr package docspell.extract.ocr
import cats.effect.{Blocker, ContextShift, Sync} import cats.effect.{Blocker, ContextShift, Sync}
import docspell.common._
import docspell.files._
import docspell.extract.internal.Text
import fs2.Stream import fs2.Stream
import docspell.common._
import docspell.extract.internal.Text
import docspell.files._
object TextExtract { object TextExtract {
def extract[F[_]: Sync: ContextShift]( def extract[F[_]: Sync: ContextShift](

View File

@ -1,18 +1,20 @@
package docspell.extract.odf package docspell.extract.odf
import java.io.{ByteArrayInputStream, InputStream}
import scala.util.Try
import cats.effect._ import cats.effect._
import cats.implicits._ import cats.implicits._
import fs2.Stream import fs2.Stream
import java.io.{ByteArrayInputStream, InputStream}
import docspell.extract.internal.Text
import org.apache.tika.metadata.Metadata import org.apache.tika.metadata.Metadata
import org.apache.tika.parser.ParseContext import org.apache.tika.parser.ParseContext
import org.apache.tika.parser.odf.OpenDocumentParser import org.apache.tika.parser.odf.OpenDocumentParser
import org.apache.tika.sax.BodyContentHandler import org.apache.tika.sax.BodyContentHandler
import scala.util.Try
import docspell.extract.internal.Text
object OdfExtract { object OdfExtract {
def get[F[_]: Sync](data: Stream[F, Byte]): F[Either[Throwable, Text]] = def get[F[_]: Sync](data: Stream[F, Byte]): F[Either[Throwable, Text]] =

View File

@ -3,15 +3,17 @@ package docspell.extract.pdfbox
import java.io.InputStream import java.io.InputStream
import java.nio.file.Path import java.nio.file.Path
import cats.implicits._ import scala.util.{Try, Using}
import cats.effect.Sync import cats.effect.Sync
import cats.implicits._
import fs2.Stream
import docspell.extract.internal.Text
import org.apache.pdfbox.pdmodel.PDDocument import org.apache.pdfbox.pdmodel.PDDocument
import org.apache.pdfbox.text.PDFTextStripper import org.apache.pdfbox.text.PDFTextStripper
import scala.util.{Try, Using}
import fs2.Stream
import docspell.extract.internal.Text
object PdfboxExtract { object PdfboxExtract {
def get[F[_]: Sync](data: Stream[F, Byte]): F[Either[Throwable, Text]] = def get[F[_]: Sync](data: Stream[F, Byte]): F[Either[Throwable, Text]] =

View File

@ -2,9 +2,17 @@ package docspell.extract.poi
import java.io.{ByteArrayInputStream, InputStream} import java.io.{ByteArrayInputStream, InputStream}
import scala.util.Try
import cats.data.EitherT import cats.data.EitherT
import cats.implicits._
import cats.effect.Sync import cats.effect.Sync
import cats.implicits._
import fs2.Stream
import docspell.common._
import docspell.extract.internal.Text
import docspell.files.TikaMimetype
import org.apache.poi.hssf.extractor.ExcelExtractor import org.apache.poi.hssf.extractor.ExcelExtractor
import org.apache.poi.hssf.usermodel.HSSFWorkbook import org.apache.poi.hssf.usermodel.HSSFWorkbook
import org.apache.poi.hwpf.extractor.WordExtractor import org.apache.poi.hwpf.extractor.WordExtractor
@ -12,12 +20,6 @@ import org.apache.poi.xssf.extractor.XSSFExcelExtractor
import org.apache.poi.xssf.usermodel.XSSFWorkbook import org.apache.poi.xssf.usermodel.XSSFWorkbook
import org.apache.poi.xwpf.extractor.XWPFWordExtractor import org.apache.poi.xwpf.extractor.XWPFWordExtractor
import org.apache.poi.xwpf.usermodel.XWPFDocument import org.apache.poi.xwpf.usermodel.XWPFDocument
import fs2.Stream
import scala.util.Try
import docspell.common._
import docspell.files.TikaMimetype
import docspell.extract.internal.Text
object PoiExtract { object PoiExtract {

View File

@ -1,16 +1,17 @@
package docspell.extract.rtf package docspell.extract.rtf
import java.io.{ByteArrayInputStream, InputStream} import java.io.{ByteArrayInputStream, InputStream}
import cats.implicits._
import cats.effect.Sync
import docspell.common.MimeType
import docspell.extract.internal.Text
import fs2.Stream
import javax.swing.text.rtf.RTFEditorKit import javax.swing.text.rtf.RTFEditorKit
import scala.util.Try import scala.util.Try
import cats.effect.Sync
import cats.implicits._
import fs2.Stream
import docspell.common.MimeType
import docspell.extract.internal.Text
object RtfExtract { object RtfExtract {
val rtfType = MimeType.application("rtf") val rtfType = MimeType.application("rtf")

View File

@ -2,16 +2,16 @@ package docspell.files
import java.io.{ByteArrayInputStream, InputStream} import java.io.{ByteArrayInputStream, InputStream}
import java.nio.file.Path import java.nio.file.Path
import cats.implicits._
import cats.effect._
import fs2.Stream
import javax.imageio.stream.{FileImageInputStream, ImageInputStream} import javax.imageio.stream.{FileImageInputStream, ImageInputStream}
import javax.imageio.{ImageIO, ImageReader} import javax.imageio.{ImageIO, ImageReader}
import scala.jdk.CollectionConverters._ import scala.jdk.CollectionConverters._
import scala.util.{Try, Using} import scala.util.{Try, Using}
import cats.effect._
import cats.implicits._
import fs2.Stream
object ImageSize { object ImageSize {
/** Return the image size from its header without reading /** Return the image size from its header without reading

View File

@ -1,19 +1,22 @@
package docspell.files package docspell.files
import java.io.BufferedInputStream import java.io.BufferedInputStream
import java.nio.file.{Files, Path}
import java.nio.charset.Charset import java.nio.charset.Charset
import java.nio.file.{Files, Path}
import scala.jdk.CollectionConverters._ import scala.jdk.CollectionConverters._
import scala.util.Using import scala.util.Using
import cats.implicits._
import cats.effect.Sync import cats.effect.Sync
import cats.implicits._
import fs2.Stream import fs2.Stream
import docspell.common._
import org.apache.tika.config.TikaConfig import org.apache.tika.config.TikaConfig
import org.apache.tika.metadata.{HttpHeaders, Metadata, TikaMetadataKeys} import org.apache.tika.metadata.{HttpHeaders, Metadata, TikaMetadataKeys}
import org.apache.tika.mime.MediaType import org.apache.tika.mime.MediaType
import org.apache.tika.parser.txt.Icu4jEncodingDetector import org.apache.tika.parser.txt.Icu4jEncodingDetector
import docspell.common._
object TikaMimetype { object TikaMimetype {
private val tika = new TikaConfig().getDetector private val tika = new TikaConfig().getDetector

View File

@ -1,11 +1,13 @@
package docspell.files package docspell.files
import java.io.InputStream
import java.nio.file.Paths
import java.util.zip.ZipInputStream
import cats.effect._ import cats.effect._
import cats.implicits._ import cats.implicits._
import fs2.{Pipe, Stream} import fs2.{Pipe, Stream}
import java.io.InputStream
import java.util.zip.ZipInputStream
import java.nio.file.Paths
import docspell.common.Binary import docspell.common.Binary
object Zip { object Zip {

View File

@ -1,11 +1,13 @@
package docspell.ftsclient package docspell.ftsclient
import fs2.Stream
import cats.implicits._
import cats.effect._ import cats.effect._
import org.log4s.getLogger import cats.implicits._
import fs2.Stream
import docspell.common._ import docspell.common._
import org.log4s.getLogger
/** The fts client is the interface for docspell to a fulltext search /** The fts client is the interface for docspell to a fulltext search
* engine. * engine.
* *

View File

@ -1,8 +1,7 @@
package docspell.ftsclient package docspell.ftsclient
import docspell.common._ import docspell.common._
import docspell.ftsclient.FtsResult.ItemMatch
import FtsResult.ItemMatch
final case class FtsResult( final case class FtsResult(
qtime: Duration, qtime: Duration,

View File

@ -1,8 +1,9 @@
package docspell.ftssolr package docspell.ftssolr
import io.circe._
import docspell.common._ import docspell.common._
import io.circe._
final class Field(val name: String) extends AnyVal { final class Field(val name: String) extends AnyVal {
override def toString(): String = s"Field($name)" override def toString(): String = s"Field($name)"

View File

@ -1,9 +1,10 @@
package docspell.ftssolr package docspell.ftssolr
import docspell.common._
import docspell.ftsclient._
import io.circe._ import io.circe._
import io.circe.syntax._ import io.circe.syntax._
import docspell.common._
import docspell.ftsclient._
trait JsonCodec { trait JsonCodec {

View File

@ -1,8 +1,9 @@
package docspell.ftssolr package docspell.ftssolr
import docspell.ftsclient.FtsQuery
import io.circe._ import io.circe._
import io.circe.generic.semiauto._ import io.circe.generic.semiauto._
import docspell.ftsclient.FtsQuery
final case class QueryData( final case class QueryData(
query: String, query: String,

View File

@ -1,15 +1,16 @@
package docspell.ftssolr package docspell.ftssolr
import fs2.Stream
import cats.effect._ import cats.effect._
import cats.implicits._ import cats.implicits._
import org.http4s.client.Client import fs2.Stream
import org.http4s.client.middleware.Logger
import org.log4s.getLogger
import docspell.common._ import docspell.common._
import docspell.ftsclient._ import docspell.ftsclient._
import org.http4s.client.Client
import org.http4s.client.middleware.Logger
import org.log4s.getLogger
final class SolrFtsClient[F[_]: Effect]( final class SolrFtsClient[F[_]: Effect](
solrUpdate: SolrUpdate[F], solrUpdate: SolrUpdate[F],
solrSetup: SolrSetup[F], solrSetup: SolrSetup[F],

View File

@ -1,15 +1,16 @@
package docspell.ftssolr package docspell.ftssolr
import cats.effect._ import cats.effect._
import org.http4s._
import org.http4s.client.Client
import org.http4s.circe._
import org.http4s.circe.CirceEntityDecoder._
import org.http4s.client.dsl.Http4sClientDsl
import _root_.io.circe.syntax._
import docspell.ftsclient._ import docspell.ftsclient._
import JsonCodec._ import docspell.ftssolr.JsonCodec._
import _root_.io.circe.syntax._
import org.http4s._
import org.http4s.circe.CirceEntityDecoder._
import org.http4s.circe._
import org.http4s.client.Client
import org.http4s.client.dsl.Http4sClientDsl
trait SolrQuery[F[_]] { trait SolrQuery[F[_]] {

View File

@ -1,15 +1,17 @@
package docspell.ftssolr package docspell.ftssolr
import cats.effect._ import cats.effect._
import org.http4s._
import cats.implicits._ import cats.implicits._
import org.http4s.client.Client
import org.http4s.circe._ import docspell.common._
import org.http4s.client.dsl.Http4sClientDsl
import _root_.io.circe.syntax._
import _root_.io.circe._ import _root_.io.circe._
import _root_.io.circe.generic.semiauto._ import _root_.io.circe.generic.semiauto._
import docspell.common._ import _root_.io.circe.syntax._
import org.http4s._
import org.http4s.circe._
import org.http4s.client.Client
import org.http4s.client.dsl.Http4sClientDsl
trait SolrSetup[F[_]] { trait SolrSetup[F[_]] {

View File

@ -1,15 +1,16 @@
package docspell.ftssolr package docspell.ftssolr
import cats.effect._ import cats.effect._
import org.http4s._
import org.http4s.client.Client
import org.http4s.circe._
import org.http4s.client.dsl.Http4sClientDsl
import _root_.io.circe._
import _root_.io.circe.syntax._
import docspell.ftsclient._ import docspell.ftsclient._
import JsonCodec._ import docspell.ftssolr.JsonCodec._
import _root_.io.circe._
import _root_.io.circe.syntax._
import org.http4s._
import org.http4s.circe._
import org.http4s.client.Client
import org.http4s.client.dsl.Http4sClientDsl
trait SolrUpdate[F[_]] { trait SolrUpdate[F[_]] {

View File

@ -1,14 +1,14 @@
package docspell.joex package docspell.joex
import docspell.analysis.TextAnalysisConfig import docspell.analysis.TextAnalysisConfig
import docspell.backend.Config.Files
import docspell.common._ import docspell.common._
import docspell.joex.scheduler.{PeriodicSchedulerConfig, SchedulerConfig}
import docspell.store.JdbcConfig
import docspell.convert.ConvertConfig import docspell.convert.ConvertConfig
import docspell.extract.ExtractConfig import docspell.extract.ExtractConfig
import docspell.joex.hk.HouseKeepingConfig
import docspell.backend.Config.Files
import docspell.ftssolr.SolrConfig import docspell.ftssolr.SolrConfig
import docspell.joex.hk.HouseKeepingConfig
import docspell.joex.scheduler.{PeriodicSchedulerConfig, SchedulerConfig}
import docspell.store.JdbcConfig
case class Config( case class Config(
appId: Ident, appId: Ident,

View File

@ -1,9 +1,10 @@
package docspell.joex package docspell.joex
import docspell.common.config.Implicits._ import docspell.common.config.Implicits._
import docspell.joex.scheduler.CountingScheme
import pureconfig._ import pureconfig._
import pureconfig.generic.auto._ import pureconfig.generic.auto._
import docspell.joex.scheduler.CountingScheme
object ConfigFile { object ConfigFile {
import Implicits._ import Implicits._

View File

@ -1,26 +1,29 @@
package docspell.joex package docspell.joex
import cats.implicits._
import cats.effect._
import emil.javamail._
import fs2.concurrent.SignallingRef
import scala.concurrent.ExecutionContext import scala.concurrent.ExecutionContext
import org.http4s.client.Client
import org.http4s.client.blaze.BlazeClientBuilder import cats.effect._
import docspell.common._ import cats.implicits._
import fs2.concurrent.SignallingRef
import docspell.backend.ops._ import docspell.backend.ops._
import docspell.common._
import docspell.ftsclient.FtsClient
import docspell.ftssolr.SolrFtsClient
import docspell.joex.fts.{MigrationTask, ReIndexTask}
import docspell.joex.hk._ import docspell.joex.hk._
import docspell.joex.notify._ import docspell.joex.notify._
import docspell.joex.fts.{MigrationTask, ReIndexTask}
import docspell.joex.scanmailbox._
import docspell.joex.process.ItemHandler import docspell.joex.process.ItemHandler
import docspell.joex.scanmailbox._
import docspell.joex.scheduler._ import docspell.joex.scheduler._
import docspell.joexapi.client.JoexClient import docspell.joexapi.client.JoexClient
import docspell.store.Store import docspell.store.Store
import docspell.store.queue._ import docspell.store.queue._
import docspell.store.records.RJobLog import docspell.store.records.RJobLog
import docspell.ftsclient.FtsClient
import docspell.ftssolr.SolrFtsClient import emil.javamail._
import org.http4s.client.Client
import org.http4s.client.blaze.BlazeClientBuilder
final class JoexAppImpl[F[_]: ConcurrentEffect: ContextShift: Timer]( final class JoexAppImpl[F[_]: ConcurrentEffect: ContextShift: Timer](
cfg: Config, cfg: Config,

View File

@ -2,15 +2,17 @@ package docspell.joex
import cats.effect._ import cats.effect._
import cats.effect.concurrent.Ref import cats.effect.concurrent.Ref
import docspell.common.Pools
import docspell.joex.routes._
import org.http4s.server.blaze.BlazeServerBuilder
import org.http4s.implicits._
import fs2.Stream import fs2.Stream
import fs2.concurrent.SignallingRef import fs2.concurrent.SignallingRef
import docspell.common.Pools
import docspell.joex.routes._
import org.http4s.HttpApp import org.http4s.HttpApp
import org.http4s.server.middleware.Logger import org.http4s.implicits._
import org.http4s.server.Router import org.http4s.server.Router
import org.http4s.server.blaze.BlazeServerBuilder
import org.http4s.server.middleware.Logger
object JoexServer { object JoexServer {

View File

@ -1,11 +1,12 @@
package docspell.joex package docspell.joex
import cats.effect.{Blocker, ExitCode, IO, IOApp}
import cats.implicits._
import java.nio.file.{Files, Paths} import java.nio.file.{Files, Paths}
import cats.effect._
import cats.implicits._
import docspell.common.{Banner, Pools, ThreadFactories} import docspell.common.{Banner, Pools, ThreadFactories}
import org.log4s._ import org.log4s._
object Main extends IOApp { object Main extends IOApp {

View File

@ -1,9 +1,10 @@
package docspell.joex.extract package docspell.joex.extract
import java.nio.charset.Charset
import emil.BodyContent import emil.BodyContent
import emil.jsoup._ import emil.jsoup._
import scodec.bits.ByteVector import scodec.bits.ByteVector
import java.nio.charset.Charset
object JsoupSanitizer { object JsoupSanitizer {

View File

@ -1,10 +1,10 @@
package docspell.joex.fts package docspell.joex.fts
import docspell.common.Logger import docspell.common.Logger
import docspell.ftsclient.FtsClient
import docspell.joex.Config import docspell.joex.Config
import docspell.joex.scheduler.Context import docspell.joex.scheduler.Context
import docspell.store.Store import docspell.store.Store
import docspell.ftsclient.FtsClient
case class FtsContext[F[_]]( case class FtsContext[F[_]](
cfg: Config.FullTextSearch, cfg: Config.FullTextSearch,

View File

@ -1,13 +1,14 @@
package docspell.joex.fts package docspell.joex.fts
import cats.effect._
import cats.data.{Kleisli, NonEmptyList} import cats.data.{Kleisli, NonEmptyList}
import cats.{ApplicativeError, FlatMap, Semigroup} import cats.effect._
import cats.implicits._ import cats.implicits._
import cats.{ApplicativeError, FlatMap, Semigroup}
import docspell.common._ import docspell.common._
import docspell.ftsclient._ import docspell.ftsclient._
import docspell.joex.scheduler.Context
import docspell.joex.Config import docspell.joex.Config
import docspell.joex.scheduler.Context
import docspell.store.queries.{QAttachment, QItem} import docspell.store.queries.{QAttachment, QItem}
object FtsWork { object FtsWork {

View File

@ -1,14 +1,15 @@
package docspell.joex.fts package docspell.joex.fts
import cats.Traverse
import cats.data.{Kleisli, OptionT}
import cats.effect._ import cats.effect._
import cats.implicits._ import cats.implicits._
import cats.data.{Kleisli, OptionT}
import cats.Traverse
import docspell.common._ import docspell.common._
import docspell.joex.Config
import docspell.store.{AddResult, Store}
import docspell.store.records.RFtsMigration
import docspell.ftsclient._ import docspell.ftsclient._
import docspell.joex.Config
import docspell.store.records.RFtsMigration
import docspell.store.{AddResult, Store}
case class Migration[F[_]]( case class Migration[F[_]](
version: Int, version: Int,

View File

@ -2,10 +2,11 @@ package docspell.joex.fts
import cats.effect._ import cats.effect._
import cats.implicits._ import cats.implicits._
import docspell.common._ import docspell.common._
import docspell.ftsclient._
import docspell.joex.Config import docspell.joex.Config
import docspell.joex.scheduler.Task import docspell.joex.scheduler.Task
import docspell.ftsclient._
import docspell.store.records.RJob import docspell.store.records.RJob
object MigrationTask { object MigrationTask {

View File

@ -1,11 +1,12 @@
package docspell.joex.fts package docspell.joex.fts
import cats.effect._ import cats.effect._
import docspell.common._ import docspell.common._
import docspell.joex.Config
import docspell.joex.scheduler.Task
import docspell.ftsclient._ import docspell.ftsclient._
import FtsWork.syntax._ import docspell.joex.Config
import docspell.joex.fts.FtsWork.syntax._
import docspell.joex.scheduler.Task
object ReIndexTask { object ReIndexTask {
type Args = ReIndexTaskArgs type Args = ReIndexTaskArgs

View File

@ -1,7 +1,7 @@
package docspell.joex.hk package docspell.joex.hk
import cats.implicits._
import cats.effect._ import cats.effect._
import cats.implicits._
import docspell.common._ import docspell.common._
import docspell.joex.scheduler.Task import docspell.joex.scheduler.Task

View File

@ -1,7 +1,7 @@
package docspell.joex.hk package docspell.joex.hk
import cats.implicits._
import cats.effect._ import cats.effect._
import cats.implicits._
import fs2.Stream import fs2.Stream
import docspell.common._ import docspell.common._

View File

@ -1,9 +1,9 @@
package docspell.joex.hk package docspell.joex.hk
import com.github.eikek.calev.CalEvent
import docspell.common._ import docspell.common._
import docspell.joex.hk.HouseKeepingConfig._
import HouseKeepingConfig._ import com.github.eikek.calev.CalEvent
case class HouseKeepingConfig( case class HouseKeepingConfig(
schedule: CalEvent, schedule: CalEvent,

View File

@ -1,14 +1,15 @@
package docspell.joex.hk package docspell.joex.hk
import cats.implicits._
import cats.effect._ import cats.effect._
import com.github.eikek.calev._ import cats.implicits._
import docspell.common._ import docspell.common._
import docspell.joex.Config import docspell.joex.Config
import docspell.joex.scheduler.Task import docspell.joex.scheduler.Task
import docspell.store.records._ import docspell.store.records._
import com.github.eikek.calev._
object HouseKeepingTask { object HouseKeepingTask {
private val periodicId = Ident.unsafe("docspell-houskeeping") private val periodicId = Ident.unsafe("docspell-houskeeping")

View File

@ -3,15 +3,16 @@ package docspell.joex.mail
import cats.effect._ import cats.effect._
import cats.implicits._ import cats.implicits._
import fs2.{Pipe, Stream} import fs2.{Pipe, Stream}
import emil.{MimeType => _, _}
import emil.javamail.syntax._
import emil.tnef.TnefExtract
import emil.markdown._
import emil.jsoup._
import docspell.common._ import docspell.common._
import docspell.store.syntax.MimeTypes._ import docspell.store.syntax.MimeTypes._
import emil.javamail.syntax._
import emil.jsoup._
import emil.markdown._
import emil.tnef.TnefExtract
import emil.{MimeType => _, _}
object ReadMail { object ReadMail {
def readBytesP[F[_]: ConcurrentEffect: ContextShift]( def readBytesP[F[_]: ConcurrentEffect: ContextShift](

View File

@ -1,12 +1,12 @@
package docspell.joex.notify package docspell.joex.notify
import docspell.common._
import docspell.joex.notify.YamuscaConverter._
import docspell.store.queries.QItem
import yamusca.implicits._ import yamusca.implicits._
import yamusca.imports._ import yamusca.imports._
import docspell.common._
import docspell.store.queries.QItem
import docspell.joex.notify.YamuscaConverter._
/** The context for rendering the e-mail template. */ /** The context for rendering the e-mail template. */
case class MailContext( case class MailContext(
items: List[MailContext.ItemData], items: List[MailContext.ItemData],

View File

@ -1,19 +1,20 @@
package docspell.joex.notify package docspell.joex.notify
import cats.implicits._ import cats.data.OptionT
import cats.effect._ import cats.effect._
import cats.implicits._
import docspell.backend.ops.OItemSearch.Batch
import docspell.common._
import docspell.joex.mail.EmilHeader
import docspell.joex.scheduler.{Context, Task}
import docspell.store.queries.QItem
import docspell.store.records._
import emil._ import emil._
import emil.builder._ import emil.builder._
import emil.markdown._
import emil.javamail.syntax._ import emil.javamail.syntax._
import emil.markdown._
import docspell.common._
import docspell.backend.ops.OItemSearch.Batch
import docspell.store.records._
import docspell.store.queries.QItem
import docspell.joex.scheduler.{Context, Task}
import cats.data.OptionT
import docspell.joex.mail.EmilHeader
object NotifyDueItemsTask { object NotifyDueItemsTask {
val maxItems: Int = 7 val maxItems: Int = 7

View File

@ -1,9 +1,10 @@
package docspell.joex.notify package docspell.joex.notify
import yamusca.imports._
import yamusca.implicits._
import docspell.common._ import docspell.common._
import yamusca.implicits._
import yamusca.imports._
trait YamuscaConverter { trait YamuscaConverter {
implicit val uriConverter: ValueConverter[LenientUri] = implicit val uriConverter: ValueConverter[LenientUri] =

View File

@ -1,19 +1,21 @@
package docspell.joex.process package docspell.joex.process
import bitpeace.{Mimetype, MimetypeHint, RangeDef}
import cats.Functor import cats.Functor
import cats.implicits._
import cats.effect._
import cats.data.{Kleisli, OptionT} import cats.data.{Kleisli, OptionT}
import cats.effect._
import cats.implicits._
import fs2.Stream import fs2.Stream
import docspell.common._ import docspell.common._
import docspell.convert.ConversionResult.Handler
import docspell.convert.SanitizeHtml
import docspell.convert._ import docspell.convert._
import docspell.joex.extract.JsoupSanitizer
import docspell.joex.scheduler._ import docspell.joex.scheduler._
import docspell.store.records._ import docspell.store.records._
import docspell.store.syntax.MimeTypes._ import docspell.store.syntax.MimeTypes._
import docspell.convert.ConversionResult.Handler
import docspell.convert.SanitizeHtml import bitpeace.{Mimetype, MimetypeHint, RangeDef}
import docspell.joex.extract.JsoupSanitizer
/** Goes through all attachments and creates a PDF version of it where /** Goes through all attachments and creates a PDF version of it where
* supported. * supported.

View File

@ -1,15 +1,17 @@
package docspell.joex.process package docspell.joex.process
import bitpeace.FileMeta
import cats.implicits._
import cats.effect.Sync
import cats.data.OptionT import cats.data.OptionT
import cats.effect.Sync
import cats.implicits._
import fs2.Stream import fs2.Stream
import docspell.common._ import docspell.common._
import docspell.joex.scheduler.{Context, Task} import docspell.joex.scheduler.{Context, Task}
import docspell.store.queries.QItem import docspell.store.queries.QItem
import docspell.store.records.{RAttachment, RAttachmentSource, RItem} import docspell.store.records.{RAttachment, RAttachmentSource, RItem}
import bitpeace.FileMeta
/** /**
* Task that creates the item. * Task that creates the item.
*/ */

Some files were not shown because too many files have changed in this diff Show More