mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-04-05 10:59:33 +00:00
Merge branch 'eikek:master' into master
This commit is contained in:
commit
bc308c3b1b
2
.github/workflows/website.yml
vendored
2
.github/workflows/website.yml
vendored
@ -23,4 +23,6 @@ jobs:
|
||||
- name: Build website (${{ env.DOCSPELL_VERSION }})
|
||||
run: nix-shell website/shell.nix --run "sbt make-website"
|
||||
- name: Publish website (${{ env.DOCSPELL_VERSION }})
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: sbt publish-website
|
||||
|
23
Changelog.md
23
Changelog.md
@ -1,5 +1,17 @@
|
||||
# Changelog
|
||||
|
||||
## v0.25.0
|
||||
|
||||
*Unreleased*
|
||||
|
||||
### Rest API Changes
|
||||
|
||||
- Removed `sec/collective/previews` endpoint, in favor for new
|
||||
`admin/attachments/generatePreviews` endpoint which is now an admin
|
||||
task to generate previews for all files. The now removed enpoint did
|
||||
this only for one collective.
|
||||
|
||||
|
||||
## v0.24.0
|
||||
|
||||
*Jun 18, 2021*
|
||||
@ -61,6 +73,10 @@ state (the master branch). The `latest` tag points to the latest
|
||||
release. Each release is also tagged with its version number, like
|
||||
`v0.24.0`.
|
||||
|
||||
The images changed slightly in that there is no assumption on where
|
||||
the config file is placed. Now you need to pass the docspell config
|
||||
file explicitely when using the images.
|
||||
|
||||
Multiarch: Images are now build for `amd64`, `arm64` and `armv7`.
|
||||
|
||||
The consumedir is being replaced by the more generic `docspell/tools`
|
||||
@ -80,7 +96,10 @@ The docker-compose setup is now at `docker/docker-compose`. Please
|
||||
look at the new [compose
|
||||
file](https://github.com/eikek/docspell/blob/master/docker/docker-compose/docker-compose.yml)
|
||||
and do the corresponding changes at yours. Especially the consumedir
|
||||
container changed significantly.
|
||||
container changed significantly. Then due to the fact that the config
|
||||
file must be given explicitely, you need to add this argument to each
|
||||
docspell component (restserver and joex) via a `command` section (see
|
||||
the compose file referenced above).
|
||||
|
||||
The `.envrc` has been cleaned from some settings. Since the config
|
||||
files is mounted into the image, you can just edit this file instead.
|
||||
@ -912,7 +931,7 @@ improvements for processing files.
|
||||
upload the file into memory for nothing if something fails (e.g. the
|
||||
source doesn't exist)
|
||||
- Re-process files. A
|
||||
[route](https://docspell.org/openapi/docspell-openapi.html#api-Item-secItemItemIdReprocessPost)
|
||||
[route](https://docspell.org/openapi/docspell-openapi.html#operation/sec-item-start-reprocess)
|
||||
has been added that submits files for re-processing. It is possible
|
||||
to re-process some files of an item or all. There is no UI for this
|
||||
for now. You'd need to run `curl` or something manually to trigger
|
||||
|
@ -1,5 +1,5 @@
|
||||
Docspell
|
||||
Copyright 2019-2021, Eike Kettner
|
||||
Copyright 2019-2021, Eike Kettner and Contributors
|
||||
Licensed under the GPLv3 or later
|
||||
|
||||
This software contains portions of code from tika-parser
|
||||
|
26
build.sbt
26
build.sbt
@ -2,6 +2,7 @@ import com.github.eikek.sbt.openapi._
|
||||
import scala.sys.process._
|
||||
import com.typesafe.sbt.SbtGit.GitKeys._
|
||||
import docspell.build._
|
||||
import de.heikoseeberger.sbtheader.CommentBlockCreator
|
||||
|
||||
val toolsPackage = taskKey[Seq[File]]("Package the scripts/extension tools")
|
||||
val elmCompileMode = settingKey[ElmCompileMode]("How to compile elm sources")
|
||||
@ -20,6 +21,13 @@ val scalafixSettings = Seq(
|
||||
val sharedSettings = Seq(
|
||||
organization := "com.github.eikek",
|
||||
scalaVersion := "2.13.6",
|
||||
organizationName := "Docspell Contributors",
|
||||
licenses += ("GPL-3.0-or-later", url(
|
||||
"https://spdx.org/licenses/GPL-3.0-or-later.html"
|
||||
)),
|
||||
startYear := Some(2020),
|
||||
headerLicenseStyle := HeaderLicenseStyle.SpdxSyntax,
|
||||
headerSources / excludeFilter := HiddenFileFilter || "*.java" || "StringUtil.scala",
|
||||
scalacOptions ++= Seq(
|
||||
"-deprecation",
|
||||
"-encoding",
|
||||
@ -35,6 +43,7 @@ val sharedSettings = Seq(
|
||||
"-Wvalue-discard",
|
||||
"-Wnumeric-widen"
|
||||
),
|
||||
javacOptions ++= Seq("-target", "1.8", "-source", "1.8"),
|
||||
LocalRootProject / toolsPackage := {
|
||||
val v = version.value
|
||||
val logger = streams.value.log
|
||||
@ -75,7 +84,13 @@ val elmSettings = Seq(
|
||||
(Compile / sourceDirectory).value / "elm",
|
||||
FileFilter.globFilter("*.elm"),
|
||||
HiddenFileFilter
|
||||
)
|
||||
),
|
||||
Compile / unmanagedSourceDirectories += (Compile / sourceDirectory).value / "elm",
|
||||
headerSources / includeFilter := "*.elm",
|
||||
headerMappings := headerMappings.value + (HeaderFileType("elm") -> HeaderCommentStyle(
|
||||
new CommentBlockCreator("{-", " ", "-}"),
|
||||
HeaderPattern.commentBetween("\\{\\-", " ", "\\-\\}")
|
||||
))
|
||||
)
|
||||
val stylesSettings = Seq(
|
||||
stylesMode := StylesMode.Dev,
|
||||
@ -113,7 +128,7 @@ def webjarSettings(queryJS: Project) = Seq(
|
||||
|
||||
def debianSettings(cfgFile: String) =
|
||||
Seq(
|
||||
maintainer := "Eike Kettner <eike.kettner@posteo.de>",
|
||||
maintainer := "Eike Kettner <eikek@posteo.de>",
|
||||
Universal / mappings += {
|
||||
val conf = (Compile / resourceDirectory).value / "reference.conf"
|
||||
if (!conf.exists)
|
||||
@ -788,8 +803,11 @@ addCommandAlias("make-pkg", ";clean ;make ;make-zip ;make-deb ;make-tools")
|
||||
addCommandAlias("ci", "make; lint; test")
|
||||
addCommandAlias(
|
||||
"lint",
|
||||
"restapi/openapiLint; joexapi/openapiLint; scalafmtSbtCheck; scalafmtCheckAll; Compile/scalafix --check; Test/scalafix --check"
|
||||
"restapi/openapiLint; joexapi/openapiLint; headerCheck; scalafmtSbtCheck; scalafmtCheckAll; Compile/scalafix --check; Test/scalafix --check"
|
||||
)
|
||||
addCommandAlias(
|
||||
"fix",
|
||||
"headerCreateAll; Compile/scalafix; Test/scalafix; scalafmtSbt; scalafmtAll"
|
||||
)
|
||||
addCommandAlias("fix", "Compile/scalafix; Test/scalafix; scalafmtSbt; scalafmtAll")
|
||||
addCommandAlias("make-website", ";website/clean ;website/zolaBuild ;website/zolaCheck")
|
||||
addCommandAlias("publish-website", "website/publishToGitHubPages")
|
||||
|
@ -18,7 +18,7 @@
|
||||
db_url="jdbc:postgresql://db:5432/dbname"
|
||||
db_user="dbuser"
|
||||
db_pass="dbpass"
|
||||
solr_url="http://docspell-solr:8983/docspell"
|
||||
solr_url="http://docspell-solr:8983/solr/docspell"
|
||||
|
||||
|
||||
# This configures the restserver
|
||||
@ -34,6 +34,17 @@ docspell.server {
|
||||
header-value = ${?DOCSPELL_HEADER_VALUE}
|
||||
}
|
||||
}
|
||||
|
||||
# This is a special endpoint that allows some basic administration.
|
||||
#
|
||||
# This is used for some endpoints, for example:
|
||||
# - re-create complete fulltext index:
|
||||
# curl -XPOST -H'Docspell-Admin-Secret: xyz' http://localhost:7880/api/v1/admin/fts/reIndexAll
|
||||
admin-endpoint {
|
||||
# The secret. If empty, the endpoint is disabled.
|
||||
secret = ""
|
||||
}
|
||||
|
||||
# Configuration of the full-text search engine.
|
||||
full-text-search {
|
||||
enabled = true
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis
|
||||
|
||||
import java.nio.file.Path
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis
|
||||
|
||||
import cats.Applicative
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis
|
||||
|
||||
import docspell.analysis.TextAnalysisConfig.NlpConfig
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis.classifier
|
||||
|
||||
import java.nio.file.Path
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis.classifier
|
||||
|
||||
import java.nio.file.Path
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis.classifier
|
||||
|
||||
import cats.data.Kleisli
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis.classifier
|
||||
|
||||
import java.nio.file.Path
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis.contact
|
||||
|
||||
import cats.implicits._
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis.contact
|
||||
|
||||
import cats.data.NonEmptyList
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis.contact
|
||||
|
||||
private[analysis] object Tld {
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis.date
|
||||
|
||||
import java.time.LocalDate
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis.date
|
||||
|
||||
import docspell.common.Language
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis.nlp
|
||||
|
||||
import cats.effect.Sync
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis.nlp
|
||||
|
||||
import java.net.URL
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis.nlp
|
||||
|
||||
import docspell.common.{NerLabel, NerTag}
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis.nlp
|
||||
|
||||
import scala.concurrent.duration.{Duration => _, _}
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis.nlp
|
||||
|
||||
import java.nio.file.Path
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis.nlp
|
||||
|
||||
import java.nio.file.Path
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis.nlp
|
||||
|
||||
import java.nio.file.Path
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis.split
|
||||
|
||||
import fs2.Stream
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis.split
|
||||
|
||||
case class Word(value: String, begin: Int, end: Int) {
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis
|
||||
|
||||
object Env {
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis.classifier
|
||||
|
||||
import java.nio.file.Paths
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis.contact
|
||||
|
||||
import docspell.common.{NerLabel, NerTag}
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis.date
|
||||
|
||||
import java.time._
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis.nlp
|
||||
|
||||
import docspell.analysis.Env
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis.nlp
|
||||
|
||||
import java.nio.file.Paths
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.analysis.split
|
||||
|
||||
import munit._
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend
|
||||
|
||||
import scala.concurrent.ExecutionContext
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend
|
||||
|
||||
import cats.effect._
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend
|
||||
|
||||
import docspell.backend.signup.{Config => SignupConfig}
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend
|
||||
|
||||
import cats.effect._
|
||||
@ -139,7 +145,10 @@ object JobFactory {
|
||||
prio: Priority,
|
||||
tracker: Option[Ident]
|
||||
): F[Vector[RJob]] = {
|
||||
def create(id: Ident, now: Timestamp, arg: ProcessItemArgs): RJob =
|
||||
def create(now: Timestamp, arg: ProcessItemArgs): F[RJob] =
|
||||
Ident
|
||||
.randomId[F]
|
||||
.map(id =>
|
||||
RJob.newJob(
|
||||
id,
|
||||
ProcessItemArgs.taskName,
|
||||
@ -151,11 +160,11 @@ object JobFactory {
|
||||
prio,
|
||||
tracker
|
||||
)
|
||||
)
|
||||
|
||||
for {
|
||||
id <- Ident.randomId[F]
|
||||
now <- Timestamp.current[F]
|
||||
jobs = args.map(a => create(id, now, a))
|
||||
jobs <- args.traverse(a => create(now, a))
|
||||
} yield jobs
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend
|
||||
|
||||
import docspell.common.Password
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.auth
|
||||
|
||||
import java.time.Instant
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.auth
|
||||
|
||||
import cats.data.OptionT
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.auth
|
||||
|
||||
import java.time.Instant
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.auth
|
||||
|
||||
import javax.crypto.Mac
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.ops
|
||||
|
||||
import cats.data.OptionT
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.ops
|
||||
|
||||
import cats.effect.{Async, Resource}
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.ops
|
||||
|
||||
import cats.data.EitherT
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.ops
|
||||
|
||||
import cats.effect.{Async, Resource}
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.ops
|
||||
|
||||
import cats.effect._
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.ops
|
||||
|
||||
import cats.data.NonEmptyList
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.ops
|
||||
|
||||
import cats.data.{NonEmptyList, OptionT}
|
||||
@ -187,6 +193,14 @@ trait OItem[F[_]] {
|
||||
account: AccountId,
|
||||
notifyJoex: Boolean
|
||||
): F[UpdateResult]
|
||||
|
||||
/** Submits a task that (re)generates the preview images for all
|
||||
* attachments.
|
||||
*/
|
||||
def generateAllPreviews(
|
||||
storeMode: MakePreviewArgs.StoreMode,
|
||||
notifyJoex: Boolean
|
||||
): F[UpdateResult]
|
||||
}
|
||||
|
||||
object OItem {
|
||||
@ -693,6 +707,16 @@ object OItem {
|
||||
_ <- if (notifyJoex) joex.notifyAllNodes else ().pure[F]
|
||||
} yield UpdateResult.success
|
||||
|
||||
def generateAllPreviews(
|
||||
storeMode: MakePreviewArgs.StoreMode,
|
||||
notifyJoex: Boolean
|
||||
): F[UpdateResult] =
|
||||
for {
|
||||
job <- JobFactory.allPreviews[F](AllPreviewsArgs(None, storeMode), None)
|
||||
_ <- queue.insertIfNew(job)
|
||||
_ <- if (notifyJoex) joex.notifyAllNodes else ().pure[F]
|
||||
} yield UpdateResult.success
|
||||
|
||||
private def onSuccessIgnoreError(update: F[Unit])(ar: UpdateResult): F[Unit] =
|
||||
ar match {
|
||||
case UpdateResult.Success =>
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.ops
|
||||
|
||||
import cats.data.OptionT
|
||||
@ -49,7 +55,7 @@ trait OItemSearch[F[_]] {
|
||||
|
||||
def findByFileCollective(checksum: String, collective: Ident): F[Vector[RItem]]
|
||||
|
||||
def findByFileSource(checksum: String, sourceId: Ident): F[Vector[RItem]]
|
||||
def findByFileSource(checksum: String, sourceId: Ident): F[Option[Vector[RItem]]]
|
||||
|
||||
}
|
||||
|
||||
@ -274,11 +280,11 @@ object OItemSearch {
|
||||
def findByFileCollective(checksum: String, collective: Ident): F[Vector[RItem]] =
|
||||
store.transact(QItem.findByChecksum(checksum, collective, Set.empty))
|
||||
|
||||
def findByFileSource(checksum: String, sourceId: Ident): F[Vector[RItem]] =
|
||||
def findByFileSource(checksum: String, sourceId: Ident): F[Option[Vector[RItem]]] =
|
||||
store.transact((for {
|
||||
coll <- OptionT(RSource.findCollective(sourceId))
|
||||
items <- OptionT.liftF(QItem.findByChecksum(checksum, coll, Set.empty))
|
||||
} yield items).getOrElse(Vector.empty))
|
||||
} yield items).value)
|
||||
|
||||
})
|
||||
}
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.ops
|
||||
|
||||
import cats.data.OptionT
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.ops
|
||||
|
||||
import scala.concurrent.ExecutionContext
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.ops
|
||||
|
||||
import cats.data.OptionT
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.ops
|
||||
|
||||
import cats.effect.{Async, Resource}
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.ops
|
||||
|
||||
import cats.effect.{Async, Resource}
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.ops
|
||||
|
||||
import cats.Applicative
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.ops
|
||||
|
||||
import cats.effect.{Async, Resource}
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.ops
|
||||
|
||||
import cats.effect.{Async, Resource}
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.ops
|
||||
|
||||
import cats.Functor
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.ops
|
||||
|
||||
import cats.data.OptionT
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.ops
|
||||
|
||||
import docspell.common._
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.ops
|
||||
|
||||
final class WildcardString private (str: String) {
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.signup
|
||||
|
||||
import docspell.common.{Duration, Password}
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.signup
|
||||
|
||||
import docspell.common.Ident
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.signup
|
||||
|
||||
import cats.effect.{Async, Resource}
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.backend.signup
|
||||
|
||||
import docspell.store.AddResult
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import io.circe._
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import io.circe.generic.semiauto._
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
case class Banner(
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import java.time.Instant
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import java.nio.charset.Charset
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import io.circe.Decoder
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import io.circe.{Decoder, Encoder}
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import io.circe.{Decoder, Encoder}
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import io.circe._
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import java.time.LocalDate
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
sealed trait DataType {}
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import io.circe.{Decoder, Encoder}
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
object DocspellSystem {
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import java.time.{Duration => JDur}
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import cats.implicits._
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import cats.data.NonEmptyList
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import java.nio.file.Path
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
case class FileName private (name: String) {
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import cats.data.NonEmptyList
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import java.nio.charset.StandardCharsets
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import cats.Order
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import java.security.SecureRandom
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
final case class ItemQueryString(query: String) {
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import cats.data.NonEmptyList
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import cats.data.NonEmptyList
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import java.time.Instant
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import cats.data.NonEmptyList
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import docspell.common.syntax.all._
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import java.net.HttpURLConnection
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import cats.data.NonEmptyList
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import io.circe.{Decoder, Encoder}
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import cats.effect.Sync
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
case class MailSendConfig(listId: String)
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Docspell Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package docspell.common
|
||||
|
||||
import io.circe.generic.semiauto._
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user