diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2020-12-02 00:12:06 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2020-12-02 00:12:06 +0300 |
commit | 1d68d0267d7e8f82649a42fcadc408c8f5a1f070 (patch) | |
tree | 0b426e846c15bb39346770739cf94c657e567147 | |
parent | d03c206532d195e3d8f4d8db10de7694511c026f (diff) | |
download | vsvs-1d68d0267d7e8f82649a42fcadc408c8f5a1f070.tar vsvs-1d68d0267d7e8f82649a42fcadc408c8f5a1f070.tar.xz vsvs-1d68d0267d7e8f82649a42fcadc408c8f5a1f070.zip |
.
-rw-r--r-- | artcles/funweb.vs | 9 | ||||
-rw-r--r-- | artcles/someweb.vs | 10 | ||||
-rw-r--r-- | articles.vs | 5 | ||||
-rwxr-xr-x | default.do | 8 | ||||
-rw-r--r-- | index.html.st | 5 | ||||
-rw-r--r-- | main.st | 4 | ||||
-rwxr-xr-x | shelter.sh | 3 | ||||
-rwxr-xr-x | vsvs.sh | 1 |
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> @@ -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 @@ -1,3 +1,4 @@ +#!/bin/sh res="" met=false while IFS="" read str |