swallow effect. There's no need for text-mode graphics.
foo function call which is also not found because again there's no foo command anywhere, because the function definition wasn't parsed correctly earlier as preferred.
$ /bin/sh -c "$(cat foo); foo", the $(cat foo) part is evaluated in the outer sh process, so the actual argument your sh invocation is getting is:\n\n$ /bin/sh -c "foo() {\n printf "Hello World"\n}; foo"\n\nYou have the function definition there and the call which works.\nWhen calling $ /bin/sh -c '$(cat foo); foo', the $(cat foo) part is evaluated in your sh process, so what's actually happening is $(cat foo) is trying to interpret the first "command" from the foo file, foo() which is obviously not found.
\n$ cat foo\nfoo() { printf "Hello World" }\n$ sh foo\nfoo[1]: syntax error: {' unmatched\n\n\n\n$ cat foo\nfoo() {\nprintf "Hello World"\n}\n$ /bin/sh -c "$(cat foo); foo"\n\n\nWorks well.\n\n\n/bin/sh -c '$(cat foo); foo'\n\n\nDoesn't.\n\n I guess is how newlines are processed inside double quotes as opposed to single quotes.
seds on those html files and maybe create some temp files and pass those files to ./share/l.upphtml in the mkws main script?
\nf() {\nuname\n}\n\n\nt2\n\n#!/bin/sh\n\n. ./t\nf\nssh -T adi@REMOTE << EOF\n$(cat t)\nf\nEOF\n
pp ? π Did you get pp: Buffer overflow? π
sed 's/"/'\\''/g' I guess for double quotes.
share/sitemap.uppxml:\n\n\n<?xml version='1.0' encoding='UTF-8'?>\n<urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'>\n#!\nfor f in *.html\ndo\n#!\n<url>\n <loc>$1/$(basename "$f")</loc>\n <lastmod>$(lmt -f '%Y-%m-%dT%H:%M:%SZ' "$f" | cut -d' ' -f1)</lastmod>\n <priority>1.0</priority>\n</url>\n#!\ndone\n#!\n</urlset>\n\n\nlmt is scripted in there, also in ./share/l.upphtml. You can script lmt also in your Atom Feed. pp is called all over the place.
mkws, the rest are dependencies. You don't run those manually and you can script them in your templates. Makes sense to call pp $anotherfile than singlebinary render $anotherfile I guess.
entr in my static site generator for instance, entr does its job very well. Also another thttpd or some other webserver or some weird websocket JavaScript live reload mechanism or another markdown processor when we have smu, cmark, lowdown, all of these with a lengthy set of switches and knobs on a single binary.
Markdown support in that single binary, and live reload, and a webserver. There's Hugo for that. Maybe Hugo is better.
wget -O - https://mkws.sh/mkws@4.0.8.tgz | tar -xzvf -.
pp and lmt. I really refuse to build another static site generator that has a webserver inside.
pp, lmt, mkws symlinks linking to one mkws main binary, or call one mkws main binary with the arguments mkws pp, mkws lmt, mkws main?. Or just build a single binary with arguments like "everybody" does it.
sh is a good fit as a templating language, it was built for massaging text, that's what templating languages mostly do.
tools, plugins or extensions section to the website. Also, you can check out some stuff from here also https://adi.tilde.institute/, linters and cl, cbl and fl which are CLI log "analytics" tools: unique, visits, referers etc. Might rewrite them in C not sure, but awk fits the bill pretty well. Some tinkering required for now.
Markdown capabilities to the main binary, or add a web server, or add live reload to the main binary. I kept it as simple as possible, I don't believe I really have to combine everything in a single executable, a tree is not bad.
./share/l.upphtml file is https://clbin.com/phoub, where l.js is https://livejs.com/. This gives me a live reload env.
./bin/d script for development:\n\n\n#!/bin/sh\n\nexport DEV=1\n\nhttps &\n\nfind . -type f -name 'mkws' -o -name '*.upp*' | entr ./bin/mkws https://mkws.sh\n\n\nhttps is https://clbin.com/tIIMk, entr is http://eradman.com/entrproject/.
mkws script for customization. pp, lmt and mkws could be combined in a single shell file via shar but that would give a complicated main mkws script I guess or combine them all in a single static binary but that would mean being unable to customize the mkws script. Anyway, give it a spin and let me know how it works.
pp and lmt I guess?
all is a broad scope. My idea was to distribute a full tree to and from which you can add/extract stuff to your preference. Read this also https://twtxt.net/conv/hvygjbq. There are also other static site generators who deliver a single static executable, hugo, zola, `saait`.
sh file via https://man.openbsd.org/shar. I'll have to explore this.
uudecode not uuencode, this one:\n\n\nssh -T "$1" << EOF | uudecode\n
\ntar -czf - ws.sh|uuencode "\\$f"\n>&2 printf "Writing %s\\\\n" "\\$f"\n\n\n>&2 printf "Writing %s\\\\n" "\\$f" goes to stderr and doesn't interfere with uuencode which is getting it's input from stdout.
4.0.9 is identical to 4.0.8. It's a bug.
\nssh -T "$1" << EOF | uudecode\n>&2 printf "Packing for %s\\\\n" "\\$(uname)"\ntrap "rm -rf $tmp" EXIT INT HUP TERM\ncd "$tmp"\n...\nf=mkws-"\\$(uname | tr '[:upper:]' '[:lower:]')"@"$(echo "$5"| tr _ .)".tgz\ntar -czf - ws.sh|uuencode "\\$f"\n>&2 printf "Writing %s\\\\n" "\\$f"\nEOF\n}\n
mkws's binaries on OpenBSD and Linux I run a set of commands via ssh, create a binary archive, pipe it to uuencode on the remote server and pipe it back to uudecode locally. Great use case for uuencode and uudecode pair.
package.json or requirements.txt or something similar.
404 page not found, what's the deal?
mkws websites is to bundle them as static binaries so you don't have to run any package manager on the server side either. So, if your website uses smu, distribute a statically compiled smu in your website's ./bin directory. The recommended way of doing this is to do a make install PREFIX=/path/to/mkws/website/root. Make sure the -static flag is set. That way you will also get the man pages installed in the ./share/man directory.
shellcheck your pp templates via pp -d docs.upphtml | shellcheck -s sh -.
awk script is a thing of beauty. π
mkws would handle 217 articles. π
Markdown?
mkws the site's name is mkws.sh.
meta file and maybe use my first paragraph as description suggestion?
updated field with lmt https://mkws.sh/lts.html wherever it's a good idea to have. (sitemap, atom feed)
\n<h1>Blog</h1>\n<h2>News and a collection of tips and tricks for <code>mkws</code></h2>\n<ol id=i>\n#!\nfind p -mindepth 1 | sort -r | while read -r f\ndo\ntest "${f##*.}" == "html" && continue;\nt=$(echo "${f##*/}" | cut -c21-)\n#!\n<li>\n<h2><a href=p/$(echo "$t" | pe).html>$t</a></h2>\n<time>$(echo "${f##*/}" | cut -c1-10 )</time>\n</li>\n#!\ndone\n#!\n</ol>\n\n\nI have yet to come up with a solution for the description meta but I might formulate the first paragraph to be a good description, I'd rather not use any front matter.
\n$ ls -1\n2021-02-28 15:34:42 Welcome\n2021-02-28 15:35:21 How to add a navigation menu\n2021-02-28 15:35:39 How to add custom titles\n