begin implementing a flf loader

This commit is contained in:
Gered 2014-03-29 13:35:16 -04:00
parent 7ee1aa478a
commit 4455bb6d65

View file

@ -1,6 +1,16 @@
(ns clj-figlet.core)
(ns clj-figlet.core
(:import (java.io File))
(:require [clojure.string :as str]))
(defn- parse-flf-header [header-line]
(let [parts (str/split header-line #" ")]
{:hardblank (-> parts first last)
:height (Integer/parseInt (nth parts 1))
:num-comments (Integer/parseInt (nth parts 5))}))
(defn load-flf [file]
(let [lines (str/split (slurp file) #"\n")
header (parse-flf-header (first lines))
char-lines (drop (inc (:num-comments header)) lines)]
))
(defn foo
"I don't do a whole lot."
[x]
(println x "Hello, World!"))