Skip to content

Commit

Permalink
working version
Browse files Browse the repository at this point in the history
  • Loading branch information
alexott committed Mar 18, 2010
1 parent 9138769 commit 7afa85c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pom-generated.xml
Manifest.txt
tika.jar
tika-clj.jar
lib/*.jar
*~
7 changes: 3 additions & 4 deletions src/tika.clj
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
(:import (org.apache.tika.sax BodyContentHandler))
)

(defn conv-metadata [#^Metadata mdata]
(defn- conv-metadata [#^Metadata mdata]
(let [names (.names mdata)]
(zipmap (map #(keyword (.toLowerCase %1)) names)
(map #(seq (.getValues mdata %1)) names))))


(defn parse-stream
"Parses Tika-supported stream"
[#^InputStream ifile]
Expand All @@ -30,5 +29,5 @@

(defn parse-file
"Parses Tika-supported file"
[#^File file]
(parse-stream (new FileInputStream file)))
[#^String filename]
(parse-stream (new FileInputStream (File. filename))))

0 comments on commit 7afa85c

Please sign in to comment.