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

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,18 +1,20 @@
package docspell.extract.odf
import java.io.{ByteArrayInputStream, InputStream}
import scala.util.Try
import cats.effect._
import cats.implicits._
import fs2.Stream
import java.io.{ByteArrayInputStream, InputStream}
import docspell.extract.internal.Text
import org.apache.tika.metadata.Metadata
import org.apache.tika.parser.ParseContext
import org.apache.tika.parser.odf.OpenDocumentParser
import org.apache.tika.sax.BodyContentHandler
import scala.util.Try
import docspell.extract.internal.Text
object OdfExtract {
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.nio.file.Path
import cats.implicits._
import scala.util.{Try, Using}
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.text.PDFTextStripper
import scala.util.{Try, Using}
import fs2.Stream
import docspell.extract.internal.Text
object PdfboxExtract {
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 scala.util.Try
import cats.data.EitherT
import cats.implicits._
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.usermodel.HSSFWorkbook
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.xwpf.extractor.XWPFWordExtractor
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 {

View File

@ -1,16 +1,17 @@
package docspell.extract.rtf
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 scala.util.Try
import cats.effect.Sync
import cats.implicits._
import fs2.Stream
import docspell.common.MimeType
import docspell.extract.internal.Text
object RtfExtract {
val rtfType = MimeType.application("rtf")