Initial version.

Features:

- Upload PDF files let them analyze

- Manage meta data and items

- See processing in webapp
This commit is contained in:
Eike Kettner
2019-07-23 00:53:30 +02:00
parent 6154e6a387
commit 831cd8b655
341 changed files with 23634 additions and 484 deletions

View File

@ -0,0 +1,28 @@
module Util.String exposing (..)
import Base64
crazyEncode: String -> String
crazyEncode str =
let
b64 = Base64.encode str
len = String.length b64
in
case (String.right 2 b64 |> String.toList) of
'=' :: '=' :: [] ->
(String.dropRight 2 b64) ++ "0"
_ :: '=' :: [] ->
(String.dropRight 1 b64) ++ "1"
_ ->
b64
ellipsis: Int -> String -> String
ellipsis len str =
if String.length str <= len then str
else (String.left (len - 3) str) ++ "..."
withDefault: String -> String -> String
withDefault default str =
if str == "" then default else str