Commit e074a50d authored by ioa's avatar ioa
Browse files

Added graphing from a selection of forms

parent 483f28e3
......@@ -9,7 +9,9 @@
(defun local (rel-path)
(concatenate 'string *local-directory* rel-path))
(setq hunchentoot:*dispatch-table*
(setq hunchentoot:*dispatch-table* ; dispatches folders, files, and pages
(list (hunchentoot:create-static-file-dispatcher-and-handler
"/logo.jpg" (local "www/logo.jpg"))
......@@ -25,8 +27,16 @@
"/diagram" 'diagram)
"/random-diagram" 'random-diagram)
"/selection-diagram" 'selection-diagram)
"/examples" 'examples)
"/math-snippets/" (local "math-snippets/"))
"/names-and-statements" 'names-and-statements)
"/selected-diagram" 'selected-diagram)
"/" 'generate-index-page)))
......@@ -40,7 +50,7 @@
;; but the below does transmit the website fine at
(defun start-website?? (&key (port "8080"))
(defun start-website?? (&key (port 8080))
(setq *server* (hunchentoot:start
(make-instance 'easy-acceptor
:port port))))
......@@ -71,6 +81,14 @@
#P"examples.tmpl" '()
:stream stream)))
;; ## names-and-statements page
(defun names-and-statements ()
(with-output-to-string (stream)
#P"forms-statements.tmpl" '()
:stream stream)))
;; ## Diagrams pages
;; ### Encoding filenames
......@@ -126,7 +144,7 @@
:direction :output
:if-exists :error
:if-does-not-exist :create)
(declare (ignore out))))
(format out "")))
(defun delete-temp (names label-style)
(delete-file (local (names->temp names label-style))))
......@@ -180,6 +198,16 @@
(get-graph names "fancy")
(fill-template names "fancy" nil :kind "random")))
(defun selection-diagram ()
(let ((names (loop for name being the hash-keys of jeffrey.graph:*graph*
for string-name = (format nil "~a" name)
when (parameter string-name)
collect name)))
(web-graph names "fancy")
(get-graph names "fancy")
(fill-template names "fancy" nil :kind "standard")))
;;; debugging
(defun debug-mode-on ()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment