-
-
Save Licenser/334097 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns irc-parser.core | |
(:use clojure.contrib.duck-streams | |
clojure.contrib.str-utils | |
clojure.contrib.seq-utils)) | |
(def dates (file-seq (java.io.File. "./clojure"))) | |
(defn parse-irc-log | |
[logfile] | |
(line-seq (reader logfile))) | |
(def parsed (map parse-irc-log (rest dates))) | |
(defn find-lines | |
[#^String text logs] | |
(flatten (map | |
(fn [log] (filter (fn [#^String line] (< 0 (.indexOf line text))) log)) | |
logs))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment