summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--artcles/funweb.vs9
-rw-r--r--artcles/someweb.vs10
-rw-r--r--articles.vs5
-rwxr-xr-xdefault.do8
-rw-r--r--index.html.st5
-rw-r--r--main.st4
-rwxr-xr-xshelter.sh3
-rwxr-xr-xvsvs.sh1
8 files changed, 29 insertions, 16 deletions
diff --git a/artcles/funweb.vs b/artcles/funweb.vs
new file mode 100644
index 0000000..a7770e1
--- /dev/null
+++ b/artcles/funweb.vs
@@ -0,0 +1,9 @@
+title Web must be fun!
+content
+ This operator can be used on a quotation or a dictionary:<br />
+ If a quotation quot is passed, it returns a new quotation
+ obtained by evaluating each element of quot in a separate stack.<br />
+ If a dictionary dict (with values and keys) is passed,
+ it returns a new dictionary obtained by evaluating each value
+ in the dict that is a symbol in a separate stack
+ (values that aren’t symbols stay as they are).
diff --git a/artcles/someweb.vs b/artcles/someweb.vs
new file mode 100644
index 0000000..4ef95a1
--- /dev/null
+++ b/artcles/someweb.vs
@@ -0,0 +1,10 @@
+title Web must be!
+content
+ Yeap!
+ This operator can be used on a quotation or a dictionary:<br />
+ If a quotation quot is passed, it returns a new quotation
+ obtained by evaluating each element of quot in a separate stack.<br />
+ If a dictionary dict (with values and keys) is passed,
+ it returns a new dictionary obtained by evaluating each value
+ in the dict that is a symbol in a separate stack
+ (values that aren’t symbols stay as they are).
diff --git a/articles.vs b/articles.vs
new file mode 100644
index 0000000..902c495
--- /dev/null
+++ b/articles.vs
@@ -0,0 +1,5 @@
+template
+ <html>
+ <head><title>$title</title></head>
+ <body>$content</body>
+ </html>
diff --git a/default.do b/default.do
index 9baba44..ee79c29 100755
--- a/default.do
+++ b/default.do
@@ -1,5 +1,5 @@
#!/bin/sh
-if test -f $1.st
-then
- { shelter.sh $1.st >$3; } 3>&1 | xargs redo-ifchange
-fi
+export title="$(vsvs.sh title < $1.vs)"
+export content="$(vsvs.sh content < $1.vs)"
+echo -n "$(vsvs.sh template < articles.vs)" | shelter >$3;
+redo-ifchange $1.vs articles.vs
diff --git a/index.html.st b/index.html.st
deleted file mode 100644
index 176b0ce..0000000
--- a/index.html.st
+++ /dev/null
@@ -1,5 +0,0 @@
-$(
- export title="Welcome"
- export content="Hello, World."
- shelter.sh main.st
-)
diff --git a/main.st b/main.st
deleted file mode 100644
index e9339f2..0000000
--- a/main.st
+++ /dev/null
@@ -1,4 +0,0 @@
-<html>
-<head><title>$title</title></head>
-<body>$content</body>
-</html>
diff --git a/shelter.sh b/shelter.sh
deleted file mode 100755
index 7f7f044..0000000
--- a/shelter.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-echo $1 >&3
-shelter <$1
diff --git a/vsvs.sh b/vsvs.sh
index 4362729..d3b6764 100755
--- a/vsvs.sh
+++ b/vsvs.sh
@@ -1,3 +1,4 @@
+#!/bin/sh
res=""
met=false
while IFS="" read str