           #{}
           (ts/children html)))
 
+;; TODO: Refactor these 2 functions as they are copy/pasted.
 (defn extract-author
   "Extract the author of the entry from the html. Assumes there is only one author linked."
   [html]

         "}\n")))

(defn make-order
  []
  (str (apply str (interpose "->" (map #(apply str (sort %)) turns))) ";\n"))

(defn graphify-ranked
  "Convert a map representation of the graph into a string of graphviz dot language."
  [g]
  (let [decls (map #(make-turn % (map node-def (seq g))) turns) 
        vals (map graphify-one (seq g))]

  (apply str (map #(str \" key \" " -> " \" % \" ";\n") links)))

(defn node-def
  "Build a node definition for a given graph node. Form: <quoted-name> [color=<colour>,style=filled];\n. Omits colour/filled if no author given."
  [[key {:keys [author]}]]
  (str \" key \"
       (if-let [colour (get author-colours author)]
