No changes yet.
Apache Tika dependency has been upgraded to 1.19.1.
GitHub issue: #29
The library now depends on Clojure 1.10.
Apache Tika dependency has been upgraded to 1.14.
The library now depends on Clojure 1.9.
Apache Tika dependency has been upgraded to 1.14.
TikaConfig
Instance SupportSeveral functions now accept TikaConfig
instances.
Contributed by ejshoen.
The library now depends on Clojure 1.8.
Extraction functions now return namespaced keywords.
Contributed by Ole Krüger.
instance-of?
instead of type-instance?
Contributed by Dorian Taylor.
Apache Tika dependency has been upgraded to version 1.11.
pantomime.mime/add-pattern
is a new function that makes
it possible to extent MIME patterns used by the library:
(require '[pantomime.mime :as pm])
(pm/add-pattern "text/lorem-ipsum" ".+\\.ipsum$" "lorem.ipsum")
Contributed by Daniel Woelfel and Tommi Reinikainen.
The library now depends on Clojure 1.7.
Apache Tika dependency has been upgraded to version 1.9.
Apache Tika dependency has been upgraded to version 1.8.
Pantomime now provdes access to Tika's content extraction
functionality via pantomime.extract/parse
:
(require [clojure.java.io :as io]
[pantomime.extract :as extract])
(pprint (extract/parse "test/resources/pdf/qrl.pdf"))
;= {:producer ("GNU Ghostscript 7.05"),
;= :pdf:pdfversion ("1.2"),
;= :dc:title ("main.dvi"),
;= :dc:format ("application/pdf; version=1.2"),
;= :xmp:creatortool ("dvips(k) 5.86 Copyright 1999 Radical Eye Software"),
;= :pdf:encrypted ("false"),
;= ...
;= :text "\nQuickly Reacquirable Locks∗\n\nDave Dice Mark Moir ... "
;= }
If extraction fails, extract.parse
will return the following:
{:text "",
:content-type ("application/octet-stream"),
:x-parsed-by ("org.apache.tika.parser.EmptyParser")}
extract/parse
is a simple interface to Tika's own
Parser.parse method.
Contributed by Joshua Thayer.
Apache Tika dependency has been upgraded to version 1.7.
pantomime.mime/extension-for-name
is a new function that suggests
common extensions for MIME type names:
(require '[pantomime.mime :as pm])
(pm/extension-for-name "application/vnd.ms-excel")
;= ".xls"
(pm/extension-for-name "image/jpeg")
;= ".jpg"
(pm/extension-for-name "application/octet-stream")
;= ".bin"
The library now depends on Clojure 1.6.
Apache Tika dependency has been upgraded to version 1.5.
Pantomime 2.0
drops support for Clojure 1.3.
pantomime.languages
is a new namespace that provides functions for
detecting natural languages:
(require '[pantomime.languages :as pl])
(pl/detect-language "this is English, it should not be hard to detect")
;= "en"
(pl/detect-language "parlez-vous Français")
;= "fr"
Apache Tika dependency has been upgraded to version 1.4.
Pantomime now depends on org.clojure/clojure
version 1.5.1
which
includes an important bug fix.
Pantomime now depends on org.clojure/clojure
version 1.5.0
. It is
still compatible with Clojure 1.3+ and if your project.clj
depends
on a different version, it will be used, but 1.5 is the default now.
We encourage all users to upgrade to 1.5, it is a drop-in replacement for the majority of projects out there.
Apache Tika dependency has been upgraded to version 1.3.
Pantomime now depends on org.clojure/clojure
version 1.4.0
. It is still compatible with Clojure 1.3 and if your project.clj
depends
on 1.3, it will be used, but 1.4 is the default now.
We encourage all users to upgrade to 1.4, it is a drop-in replacement for the majority of projects out there.
Apache Tika dependency has been upgraded to version 1.2.
Contains the same functions as pantomime.mime but is Web-oriented. Apache Tika as of April 2012 cannot detect PNG, JPEG and other image bytes for byte arrays. However, it is not uncommon to see broken Web frameworks, apps and servers that serve, say, PDF files claiming that they are text/html. pantomime.web attempts to improve the situation by providing special MIME type detection functions that can use content-based detection and Content-Type header at the same time.
New functions:
pantomime.web/mime-type-of
New functions that return media type parameters and charset:
pantomime.media/has-parameters?
New functions that return media type parameters and charset:
pantomime.media/parameters-of
pantomime.media/charset-of
New media type functions:
pantomime.media/parse
pantomime.media/application?
pantomime.media/text?
pantomime.media/audio?
pantomime.media/image?
pantomime.media/video?
pantomime.media/multipart?
pantomime.media.BaseMediaType protocol is now pantomime.media.MediaTypeOps. Function names haven't changed so for code that does not extend or reify this protocol, this is a backwards-compatible change.
Apache Tika dependency has been upgraded to version 1.1.
pantomime.mime/MIMETypeDetection now supports byte arrays
Pantomime now uses Leiningen 2.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close