Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

website & manual work

 * Keep the website on main branch under web/.

 * Link examples (just einstain.lisp for now) to manual.

 * Move splice-analytics.lisp to tools/

 * Submodule: tools/htmlize.sh, and a wrapper script for it.
  • Loading branch information...
commit 068b0fe1781c0e7c74fdd9e22beb9fdc578c077a 1 parent d768654
@nikodemus authored
View
3  .gitmodules
@@ -0,0 +1,3 @@
+[submodule "tools/htmlize.sh"]
+ path = tools/htmlize.sh
+ url = git://github.com/vy/htmlize.sh.git
View
13 Makefile
@@ -4,8 +4,9 @@ all:
echo "Targets: clean, wc, doc, test, web"
clean:
- rm -f *.fasl *~
+ rm -f *.fasl *~ examples/*.fasl examples/*~
make -C doc clean
+ make -C web clean
wc:
wc -l *.lisp
@@ -13,12 +14,14 @@ wc:
test: clean
sbcl --eval '(let ((asdf:*central-registry* (cons #p"./" asdf:*central-registry*))) (asdf:test-system :screamer) (quit))'
-doc: test
+doc:
make -C doc
-web: doc
- sbcl --script doc/splice-analytics.lisp < doc/screamer.html > tmp.html
+web:
+ make -C web
+
+gh-pages: web
git checkout gh-pages
- mv tmp.html index.html
+ cp web/* .
git commit -a -c master
git checkout -f master
View
5 doc/Makefile
@@ -14,5 +14,8 @@ include:
--eval '(sb-texinfo:generate-includes "include/" (list :screamer) :base-package :screamer)' \
--eval '(quit)'
-html: include
+screamer.html: screamer.texinfo style.css docstrings.lisp ../*.lisp ../*.asd
+ make include
makeinfo --html --no-split --css=style.css screamer.texinfo
+
+html: screamer.html
View
20 doc/screamer.texinfo
@@ -306,6 +306,16 @@ values, and force a solution:
In this case backtracking occurs only over @code{solution}, whereas in the first
one we backtracked over the entire @code{let}.
+@chapter Examples
+
+@section Einstein's Riddle
+
+Solving the ``Einstein's Riddle'', aka ``The Zebra Puzzle'' using
+nondeterministic features of Screamer, ie. backtracking search.
+
+[ @url{einstein.html, HTML} ]
+[ @url{einstein.lisp, Source} ]
+
@chapter Nondetermism
@include include/macro-screamer-either.texinfo
@@ -351,4 +361,14 @@ one we backtracked over the entire @code{let}.
@include include/var-screamer-star-screamer-version-star.texinfo
@include include/var-screamer-star-iscream?star.texinfo
+@chapter Examples
+
+@section Einstein's Riddle
+
+Solving the ``Einstein's Riddle'', aka ``The Zebra Puzzle'' using
+nondeterministic features of Screamer, ie. backtracking search.
+
+[ @url{http://nikodemus.github.com/screamer/examples/einstein.html, HTML} ]
+[ @url{http://nikodemus.github.com/screamer/examples/einstein.lisp, Source} ]
+
@bye
View
35 tools/htmlize-source.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+set -e
+
+BASE=`dirname $0```
+
+$BASE/htmlize.sh/htmlize.sh $1 $2.tmp
+
+cat > $2 <<EOF
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+EOF
+
+echo " <title>"`basename $1`"</title>" >> $2
+
+cat >> $2 <<EOF
+ <link rel="stylesheet" href="style.css" type="text/css">
+ </head>
+ <body>
+EOF
+
+printf " <pre>" >> $2
+
+cat $2.tmp >> $2
+
+cat >> $2 <<EOF
+</pre>
+ </body>
+</html>
+EOF
+
+rm $2.tmp
+
+echo "$2 built"
1  tools/htmlize.sh
@@ -0,0 +1 @@
+Subproject commit 9728fd2fc4eeb5e31f958838905c76b9aa54f72b
View
0  doc/splice-analytics.lisp → tools/splice-analytics.lisp
File renamed without changes
View
18 web/Makefile
@@ -0,0 +1,18 @@
+.PHONY: clean
+
+EXAMPLES:=$(foreach lisp, $(wildcard ../examples/*.lisp), $(notdir $(addsuffix .html, $(lisp))))
+
+all: $(EXAMPLES) index.html
+
+%.lisp.html: ../examples/%.lisp
+ cp $< .
+ sh ../tools/htmlize-source.sh $< ../web/$@
+
+index.html: ../doc/screamer.html ../tools/splice-analytics.lisp
+ sbcl --script ../tools/splice-analytics.lisp < ../doc/screamer.html > index.html
+
+../doc/screamer.html:
+ make -C ../doc
+
+clean:
+ rm -f *~ *.lisp *.lisp.html \#*
View
55 web/style.css
@@ -0,0 +1,55 @@
+body {
+ color: #000000;
+ background-color: #ffffff;
+}
+.builtin {
+ /* font-lock-builtin-face */
+ color: #7a378b;
+}
+.comment {
+ /* font-lock-comment-face */
+ color: #b22222;
+}
+.comment-delimiter {
+ /* font-lock-comment-delimiter-face */
+ color: #b22222;
+}
+.constant {
+ /* font-lock-constant-face */
+ color: #008b8b;
+}
+.function-name {
+ /* font-lock-function-name-face */
+ color: #0000ff;
+}
+.keyword {
+ /* font-lock-keyword-face */
+ color: #7f007f;
+}
+.slime-reader-conditional {
+ /* slime-reader-conditional-face */
+ color: #b22222;
+}
+.string {
+ /* font-lock-string-face */
+ color: #996633;
+}
+.type {
+ /* font-lock-type-face */
+ color: #228b22;
+}
+.warning {
+ /* font-lock-warning-face */
+ color: #ff0000;
+ font-weight: bold;
+}
+
+a {
+ color: inherit;
+ background-color: inherit;
+ font: inherit;
+ text-decoration: inherit;
+}
+a:hover {
+ text-decoration: underline;
+}
Please sign in to comment.
Something went wrong with that request. Please try again.