Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jeffrey
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ioanna M. Dimitriou H.
jeffrey
Commits
e074a50d
Commit
e074a50d
authored
Feb 17, 2017
by
ioa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added graphing from a selection of forms
parent
483f28e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
3 deletions
+31
-3
website.lisp
website.lisp
+31
-3
No files found.
website.lisp
View file @
e074a50d
...
@@ -9,7 +9,9 @@
...
@@ -9,7 +9,9 @@
(
defun
local
(
rel-path
)
(
defun
local
(
rel-path
)
(
concatenate
'string
*local-directory*
rel-path
))
(
concatenate
'string
*local-directory*
rel-path
))
(
setq
hunchentoot:*dispatch-table*
(
load-nodes-html
)
(
setq
hunchentoot:*dispatch-table*
; dispatches folders, files, and pages
(
list
(
hunchentoot:create-static-file-dispatcher-and-handler
(
list
(
hunchentoot:create-static-file-dispatcher-and-handler
"/logo.jpg"
(
local
"www/logo.jpg"
))
"/logo.jpg"
(
local
"www/logo.jpg"
))
(
hunchentoot:create-folder-dispatcher-and-handler
(
hunchentoot:create-folder-dispatcher-and-handler
...
@@ -25,8 +27,16 @@
...
@@ -25,8 +27,16 @@
"/diagram"
'diagram
)
"/diagram"
'diagram
)
(
hunchentoot:create-prefix-dispatcher
(
hunchentoot:create-prefix-dispatcher
"/random-diagram"
'random-diagram
)
"/random-diagram"
'random-diagram
)
(
hunchentoot:create-prefix-dispatcher
"/selection-diagram"
'selection-diagram
)
(
hunchentoot:create-prefix-dispatcher
(
hunchentoot:create-prefix-dispatcher
"/examples"
'examples
)
"/examples"
'examples
)
(
hunchentoot:create-folder-dispatcher-and-handler
"/math-snippets/"
(
local
"math-snippets/"
))
(
hunchentoot:create-prefix-dispatcher
"/names-and-statements"
'names-and-statements
)
(
hunchentoot:create-prefix-dispatcher
"/selected-diagram"
'selected-diagram
)
(
hunchentoot:create-prefix-dispatcher
(
hunchentoot:create-prefix-dispatcher
"/"
'generate-index-page
)))
"/"
'generate-index-page
)))
...
@@ -40,7 +50,7 @@
...
@@ -40,7 +50,7 @@
;; but the below does transmit the website fine at
;; but the below does transmit the website fine at
;; http://127.0.0.1:8080/
;; http://127.0.0.1:8080/
(
defun
start-website??
(
&key
(
port
"8080"
))
(
defun
start-website??
(
&key
(
port
8080
))
(
setq
*server*
(
hunchentoot:start
(
setq
*server*
(
hunchentoot:start
(
make-instance
'easy-acceptor
(
make-instance
'easy-acceptor
:port
port
))))
:port
port
))))
...
@@ -71,6 +81,14 @@
...
@@ -71,6 +81,14 @@
#P"examples.tmpl"
'
()
#P"examples.tmpl"
'
()
:stream
stream
)))
:stream
stream
)))
;; ## names-and-statements page
(
defun
names-and-statements
()
(
with-output-to-string
(
stream
)
(
html-template:fill-and-print-template
#P"forms-statements.tmpl"
'
()
:stream
stream
)))
;; ## Diagrams pages
;; ## Diagrams pages
;; ### Encoding filenames
;; ### Encoding filenames
...
@@ -126,7 +144,7 @@
...
@@ -126,7 +144,7 @@
:direction
:output
:direction
:output
:if-exists
:error
:if-exists
:error
:if-does-not-exist
:create
)
:if-does-not-exist
:create
)
(
declare
(
ignore
out
)
)))
(
format
out
""
)))
(
defun
delete-temp
(
names
label-style
)
(
defun
delete-temp
(
names
label-style
)
(
delete-file
(
local
(
names->temp
names
label-style
))))
(
delete-file
(
local
(
names->temp
names
label-style
))))
...
@@ -180,6 +198,16 @@
...
@@ -180,6 +198,16 @@
(
get-graph
names
"fancy"
)
(
get-graph
names
"fancy"
)
(
fill-template
names
"fancy"
nil
:kind
"random"
)))
(
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
;;; debugging
(
defun
debug-mode-on
()
(
defun
debug-mode-on
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment