@@ -70,11 +70,11 @@ data LogMessage =
7070 | DocxParserWarning String
7171 | CouldNotFetchResource String String
7272 | CouldNotDetermineImageSize String String
73+ | CouldNotConvertImage String String
7374 | CouldNotDetermineMimeType String
7475 | CouldNotConvertTeXMath String String
7576 | CouldNotParseCSS String
7677 | Fetching String
77− | UsingResourceFrom FilePath FilePath
7878 deriving (Show, Eq, Data, Ord, Typeable, Generic)
7979
8080instance ToJSON LogMessage where
@@ -151,6 +151,10 @@ instance ToJSON LogMessage where
151151 ["type" .= String "CouldNotDetermineImageSize",
152152 "path" .= Text.pack fp,
153153 "message" .= Text.pack s]
154+ CouldNotConvertImage fp s ->
155+ ["type" .= String "CouldNotConvertImage",
156+ "path" .= Text.pack fp,
157+ "message" .= Text.pack s]
154158 CouldNotDetermineMimeType fp ->
155159 ["type" .= String "CouldNotDetermineMimeType",
156160 "path" .= Text.pack fp]
@@ -164,10 +168,6 @@ instance ToJSON LogMessage where
164168 Fetching fp ->
165169 ["type" .= String "CouldNotParseCSS",
166170 "path" .= Text.pack fp]
167− UsingResourceFrom resource dir ->
168− ["type" .= String "UsingResourceFrom",
169− "resource" .= Text.pack resource,
170− "path" .= Text.pack dir]
171171
172172showPos :: SourcePos -> String
173173showPos pos = sn ++ "line " ++
@@ -216,6 +216,9 @@ showLogMessage msg =
216216 CouldNotDetermineImageSize fp s ->
217217 "Could not determine image size for '" ++ fp ++ "'" ++
218218 if null s then "" else (": " ++ s)
219+ CouldNotConvertImage fp s ->
220+ "Could not convert image '" ++ fp ++ "'" ++
221+ if null s then "" else (": " ++ s)
219222 CouldNotDetermineMimeType fp ->
220223 "Could not determine mime type for '" ++ fp ++ "'"
221224 CouldNotConvertTeXMath s m ->
@@ -225,8 +228,6 @@ showLogMessage msg =
225228 "Could not parse CSS" ++ if null m then "" else (':':'\n':m)
226229 Fetching fp ->
227230 "Fetching " ++ fp ++ "..."
228− UsingResourceFrom fp dir ->
229− "Using " ++ fp ++ " from " ++ dir
230231
231232messageVerbosity:: LogMessage -> Verbosity
232233messageVerbosity msg =
@@ -245,8 +246,8 @@ messageVerbosity msg =
245246 DocxParserWarning{} -> WARNING
246247 CouldNotFetchResource{} -> WARNING
247248 CouldNotDetermineImageSize{} -> WARNING
249+ CouldNotConvertImage{} -> WARNING
248250 CouldNotDetermineMimeType{} -> WARNING
249251 CouldNotConvertTeXMath{} -> WARNING
250252 CouldNotParseCSS{} -> WARNING
251253 Fetching{} -> INFO
252− UsingResourceFrom{} -> INFO