# I am the Watcher. I am your guide through this vast new twtiverse.
# 
# Usage:
#     https://watcher.sour.is/api/plain/users              View list of users and latest twt date.
#     https://watcher.sour.is/api/plain/twt                View all twts.
#     https://watcher.sour.is/api/plain/mentions?uri=:uri  View all mentions for uri.
#     https://watcher.sour.is/api/plain/conv/:hash         View all twts for a conversation subject.
# 
# Options:
#     uri     Filter to show a specific users twts.
#     offset  Start index for quey.
#     limit   Count of items to return (going back in time).
# 
# twt range = 1 94
# self = https://watcher.sour.is/conv/kzo5h7q
Shout out to @adi and his static site generator, mkws! I've been playing around with it for a week or two now building my personal little site. I never thought of the shell as a templating language, but dang does it work well. I've been very surprised. I wanted a SSG that was less 'opinionated' than others and easily extendable, and this seems to be fitting the bill.
@eldersnake @adi Cool! I'd already earmarked some time -- 'cause Future Me has loads to spare 😉 -- to play with this; sounds like a solid decision on my part! 😉😁
@eldersnake @adi Cool! I'd already earmarked some time -- 'cause Future Me has loads to spare 😉 -- to play with this; sounds like a solid decision on my part! 😉😁
@jlj @adi Heh yeah you won't regret it I don't reckon! If you like and are comfortable in the shell, and the usual coreutils etc, mkws feels extremely comfortable once you delve into it. I like having a folder-per-page with a nested index.html as my site structures personally, which mkws doesn't do out of the box, but it was very easy to modify the main script to accommodate this.
@jlj @adi Heh yeah you won't regret it I don't reckon! If you like and are comfortable in the shell, and the usual coreutils etc, mkws feels extremely comfortable once you delve into it. I like having a folder-per-page with a nested index.html as my site structures personally, which mkws doesn't do out of the box, but it was very easy to modify the main script to accommodate this.
@eldersnake @jlj Thanks! Yes, shell script fits the bill pretty well. One if its core strengths are working with the filesystem and working with plain text. Web sites are just files from the file system served by a web server, what better tool to work with the file system then shell. Also HTML is text, again good tool for the job. I understand its structured and a parser is better for complicated stuff but for simple stuff shell script is enough. Fits the worse is better philosophy pretty well also.\n\nI tend to see pp as scriptable plain text.
@eldersnake @jlj Thanks! Yes, shell script fits the bill pretty well. One if its core strengths are working with the filesystem and working with plain text. Web sites are just files from the file system served by a web server, what better tool to work with the file system then shell. Also HTML is text, again good tool for the job. I understand its structured and a parser is better for complicated stuff but for simple stuff shell script is enough. Fits the worse is better philosophy pretty well also.\n\nI tend to see pp as scriptable plain text.
@eldersnake @jlj Thanks! Yes, shell script fits the bill pretty well. One if its core strengths are working with the filesystem and working with plain text. Web sites are just files from the file system served by a web server, what better tool to work with the file system then shell. Also HTML is text, again good tool for the job. I understand its structured and a parser is better for complicated stuff but for simple stuff shell script is enough. Fits the worse is better philosophy pretty well also.

I tend to see pp as scriptable plain text.
@eldersnake @jlj Thanks! Yes, shell script fits the bill pretty well. One if its core strengths are working with the filesystem and working with plain text. Web sites are just files from the file system served by a web server, what better tool to work with the file system then shell. Also HTML is text, again good tool for the job. I understand its structured and a parser is better for complicated stuff but for simple stuff shell script is enough. Fits the worse is better philosophy pretty well also.\n\nI tend to see pp as scriptable plain text.
@adi @jlj @eldersnake Do you have your site online anywhere?
@adi @jlj @eldersnake Do you have your site online anywhere?
@adi @jlj @eldersnake Do you have your site online anywhere?
@adi Yep I do: here. Still not finished and just has some placeholder content from years ago with a few new things like a twts feed, but I got the site set up structurally how I want. I have little helper shell scripts to rebuild the site and push it to the server etc. I'll post the modified mkws script when I get a chance, though my code is probably horrible xD
@adi Yep I do: here. Still not finished and just has some placeholder content from years ago with a few new things like a twts feed, but I got the site set up structurally how I want. I have little helper shell scripts to rebuild the site and push it to the server etc. I'll post the modified mkws script when I get a chance, though my code is probably horrible xD
@adi Basically my install is modified to output the actual site to a dedicated separate output folder as well as sourcing a file called meta if it exists in the given page folder for titles, descriptions etc. Most of my pages use Markdown. This would have all probably been a pain to add in another more complicated and opinionated SSG.
@adi Basically my install is modified to output the actual site to a dedicated separate output folder as well as sourcing a file called meta if it exists in the given page folder for titles, descriptions etc. Most of my pages use Markdown. This would have all probably been a pain to add in another more complicated and opinionated SSG.
@eldersnake You can see in mkws.sh/mkws/README how I solved the meta, title description problem. You could also write a small frontmatter parser for a more "dynamic" solution. How are you rendering your Markdown? Yeah, probaby I can give you some tips if you publish your script.
@eldersnake You can see in mkws.sh/mkws/README how I solved the meta, title, description problem. You could also write a small frontmatter parser for a more "dynamic" solution. How are you rendering your Markdown? Yeah, probaby I can give you some tips if you publish your script.
@eldersnake You can see in mkws.sh/mkws/README how I solved the meta, title, description problem. You could also write a small frontmatter parser for a more "dynamic" solution. How are you rendering your Markdown? Yeah, probaby I can give you some tips if you publish your script.
@eldersnake You can see in mkws.sh/mkws/README how I solved the meta, title, description problem. You could also write a small frontmatter parser for a more "dynamic" solution. How are you rendering your Markdown? Yeah, probaby I can give you some tips if you publish your script.
@eldersnake How do you feel writing about your HTML without quoting your attributes?
@eldersnake How do you feel writing about your HTML without quoting your attributes?
@eldersnake How do you feel writing about your HTML without quoting your attributes?
@adi yeah I'll post it when I'm home and near my main machine. Re: the markdown, I'm just using smu similar to what I saw in the docs. \nI don't mind writing HTML without quoting attributes, or just using single quotation marks, but admittedly I do forget sometimes. The funny thing is I've forgotten a few times to change from the double quotation marks, and it still worked fine...? pp didn't seem to care, but I assume there's a case where it must.
@adi yeah I'll post it when I'm home and near my main machine. Re: the markdown, I'm just using smu similar to what I saw in the docs. \nI don't mind writing HTML without quoting attributes, or just using single quotation marks, but admittedly I do forget sometimes. The funny thing is I've forgotten a few times to change from the double quotation marks, and it still worked fine...? pp didn't seem to care, but I assume there's a case where it must.
@adi yeah I'll post it when I'm home and near my main machine. Re: the markdown, I'm just using smu similar to what I saw in the docs.
I don't mind writing HTML without quoting attributes, or just using single quotation marks, but admittedly I do forget sometimes. The funny thing is I've forgotten a few times to change from the double quotation marks, and it still worked fine...? pp didn't seem to care, but I assume there's a case where it must.
@eldersnake How did find out about mkws?\n\nFor \n<a href="https://google.ro"></a>\n\npp -d outputs\n\necho "<a href="https://google.ro"></a>\n"\n\nand pp outputs\n\n<a href=https://google.ro></a>\n\nSo when using double quotes the output is unpredictable.
@eldersnake How did you find out about mkws?\n\nFor \n<a href="https://google.ro"></a>\n\npp -d outputs\n\necho "<a href="https://google.ro"></a>\n"\n\nand pp outputs\n\n<a href=https://google.ro></a>\n\nSo when using double quotes the output is unpredictable.
@eldersnake How did you find out about mkws?

For
<a href="https://google.ro"></a>

pp -d outputs

/a> "

and pp outputs

<a href=https://google.ro></a>

So when using double quotes the output is unpredictable.
@eldersnake How did you find out about mkws?\n\nFor \n<a href="https://google.ro"></a>\n\npp -d outputs\n\necho "<a href="https://google.ro"></a>\n"\n\nand pp outputs\n\n<a href=https://google.ro></a>\n\nSo when using double quotes the output is unpredictable.
@eldersnake How did you find out about mkws?\n\nFor \n<a href="https://google.ro"></a>\n\npp -d outputs\n\necho "<a href="https://google.ro"></a>\n"\n\nand pp outputs\n\n<a href=https://google.ro></a>\n\nSo when using double quotes the output is unpredictable.
@adi I think I pretty much went online and searched "most simple static site generator" or something along those lines lol. mkws was one of the results amongst a few typical results, like 11ty etc. One was also a suckless type one where the HTML source code was embedded in C source code, which was... interesting.

Here's the bin/mkws code: https://www.andrewjvpowell.com/pastebin/1612574353/

Fair warning that I'm no shell expert and basically learn as I go.
@adi I think I pretty much went online and searched "most simple static site generator" or something along those lines lol. mkws was one of the results amongst a few typical results, like 11ty etc. One was also a suckless type one where the HTML source code was embedded in C source code, which was... interesting.\n\nHere's the bin/mkws code: https://www.andrewjvpowell.com/pastebin/1612574353/\n\nFair warning that I'm no shell expert and basically learn as I go.
@adi I think I pretty much went online and searched "most simple static site generator" or something along those lines lol. mkws was one of the results amongst a few typical results, like 11ty etc. One was also a suckless type one where the HTML source code was embedded in C source code, which was... interesting.\n\nHere's the bin/mkws code: https://www.andrewjvpowell.com/pastebin/1612574353/\n\nFair warning that I'm no shell expert and basically learn as I go.
@adi @eldersnake I have really started to appreciate simple site designs, especially since larger screen mobiles have become serious replacements to laptops (or since I joined in and upgraded my phone).\n\nThe fancy graphic 'company' sites with multiple nested links are looking dated.
@adi @eldersnake I have really started to appreciate simple site designs, especially since larger screen mobiles have become serious replacements to laptops (or since I joined in and upgraded my phone).\n\nThe fancy graphic 'company' sites with multiple nested links are looking dated.
@adi @eldersnake I have really started to appreciate simple site designs, especially since larger screen mobiles have become serious replacements to laptops (or since I joined in and upgraded my phone).

The fancy graphic 'company' sites with multiple nested links are looking dated.
@eldersnake What was the suckless one, any idea?
@eldersnake What was the suckless one, any idea?
@eldersnake What was the suckless one, any idea?
@adi It's obscure and hard to find, but it's what suckless.org actually uses now (they used to use werc).\nIt's called, I think, build-page.c and I found it through this. And the repo is here. Of course it contains the whole suckless site(s), but the build-page.c source is there. I guess really it's just them self-dogfooding, but I found it interesting.
@adi It's obscure and hard to find, but it's what suckless.org actually uses now (they used to use werc).
It's called, I think, build-page.c and I found it through this. And the repo is here. Of course it contains the whole suckless site(s), but the build-page.c source is there. I guess really it's just them self-dogfooding, but I found it interesting.
@adi It's obscure and hard to find, but it's what suckless.org actually uses now (they used to use werc).\nIt's called, I think, build-page.c and I found it through this. And the repo is here. Of course it contains the whole suckless site(s), but the build-page.c source is there. I guess really it's just them self-dogfooding, but I found it interesting.
@lazarus I hear ya. And I'm just generally appreciating less is more, lately. Life is too busy with things flying into our brains as it is, let alone with overly busy and distracting websites.
@lazarus I hear ya. And I'm just generally appreciating less is more, lately. Life is too busy with things flying into our brains as it is, let alone with overly busy and distracting websites.
@eldersnake Not a big fan of mixing C code and HTML. I belive PHP kinda nailed it when it comes to websites, nesting dynamic code with HTML, it's an inspiration for pp.
@eldersnake Not a big fan of mixing C code and HTML. I belive PHP kinda nailed it when it comes to websites, nesting dynamic code with HTML, it's an inspiration for pp.
@eldersnake Not a big fan of mixing C code and HTML. I belive PHP kinda nailed it when it comes to websites, nesting dynamic code with HTML, it's an inspiration for pp.
@adi Yeah it definitely feels a bit weird to mix them. But oh well, works for them I guess. I like a lot of suckless ways of doing things, but I have my limits lol. I think the shell scripting for templating combined with the pp binary as a processor makes a lot of sense.
@adi Yeah it definitely feels a bit weird to mix them. But oh well, works for them I guess. I like a lot of suckless ways of doing things, but I have my limits lol. I think the shell scripting for templating combined with the pp binary as a processor makes a lot of sense.
Did you see my solution for the meta in http://mkws.sh/mkws/README?
Did you see my solution for the meta in http://mkws.sh/mkws/README?
Did you see my solution for the meta in http://mkws.sh/mkws/README?
@adi Looks like the code is not there, I'll have to incorporate it somehow. Here's a link http://mkws.sh/HOWTO.
@adi Looks like the code is not there, I'll have to incorporate it somehow. Here's a link http://mkws.sh/HOWTO.
@adi Looks like the code is not there, I'll have to incorporate it somehow. Here's a link http://mkws.sh/HOWTO.
@adi Yeah I was using a Google cached version of your HOWTO page. I did originally consider it, but as I use a little helper script (example: make-post.sh) that just creates a new directory with a given name, and brings up a Vim window for me with the new post's Markdown file and a meta file, I just find that more convenient for my use case. I just whack a TITLE=<whatever> etc in the meta file and it'll get sourced for that page when processed
@adi Yeah I was using a Google cached version of your HOWTO page. I did originally consider it, but as I use a little helper script (example: make-post.sh) that just creates a new directory with a given name, and brings up a Vim window for me with the new post's Markdown file and a meta file, I just find that more convenient for my use case. I just whack a TITLE=<whatever> etc in the meta file and it'll get sourced for that page when processed
@eldersnake If it works for you. 😛
@eldersnake If it works for you. 😛
@eldersnake If it works for you. 😛
@adi @eldersnake Do you believe it's a good idea to just download the bundled files (main script, statically compiled binaries and templates) and customize everything in place?
@adi @eldersnake Do you believe it's a good idea to just download the bundled files (main script, statically compiled binaries and templates) and customize everything in place?
@adi @eldersnake Do you believe it's a good idea to just download the bundled files (main script, statically compiled binaries and templates) and customize everything in place?
@adi I believe so. Maybe I'm being a bit dense as I just woke up (lol), but what would be the alternative you might think of?
@adi I believe so. Maybe I'm being a bit dense as I just woke up (lol), but what would be the alternative you might think of?
The alternative is what Hugo does, a single binary and having the static site as "source code" which Hugo compiles, but I believe the ideas of customizing the main mkws script is really nice, I'm replacing config files with just scripting your generator, updating may be a problem but there's not much to update there anyway.
The alternative is what Hugo does, a single binary and having the static site as "source code" which Hugo compiles, but I believe the idea of customizing the main mkws script is really nice, I'm replacing config files with just scripting your generator, updating may be a problem but there's not much to update there anyway.
The alternative is what Hugo does, a single binary and having the static site as "source code" which Hugo compiles, but I believe the idea of customizing the main mkws script is really nice, I'm replacing config files with just scripting your generator, updating may be a problem but there's not much to update there anyway.
The alternative is what Hugo does, a single binary and having the static site as "source code" which Hugo compiles, but I believe the idea of customizing the main mkws script is really nice, I'm replacing config files with just scripting your generator, updating may be a problem but there's not much to update there anyway.
ah yep, I hear you. Honestly think it does work great the way it is. I think the (few) different independent pieces working together is nice, very Unix philosophy etc. I feel like anyone already using mkws would be more than comfortable manually handling any small changes brought about by updates.
ah yep, I hear you. Honestly think it does work great the way it is. I think the (few) different independent pieces working together is nice, very Unix philosophy etc. I feel like anyone already using mkws would be more than comfortable manually handling any small changes brought about by updates.
@eldersnake Yeah, I'm under the impression that we're automating maybe too much in programming and maybe too early when some little manual work could easily do the job with less complexity.
@eldersnake Yeah, I'm under the impression that we're automating maybe too much in programming and maybe too early when some little manual work could easily do the job with less complexity.
@eldersnake Yeah, I'm under the impression that we're automating maybe too much in programming and maybe too early when some little manual work could easily do the job with less complexity.
@adi @eldersnake I'm considering writing some bundles with existing classless CSS frameworks like https://newcss.net/ or https://simplecss.org/ that you can just download and start building. Also considering building an mkblog equivalent altought not sure about the naming.
@adi @eldersnake I'm considering writing some bundles with existing classless CSS frameworks like https://newcss.net/ or https://simplecss.org/ that you can just download and start building. Also considering building an mkblog equivalent altought not sure about the naming.
@adi @eldersnake I'm considering writing some bundles with existing classless CSS frameworks like https://newcss.net/ or https://simplecss.org/ that you can just download and start building. Also considering building an mkblog equivalent altought not sure about the naming.
@adi makes sense! With the blog idea I guess the main difference will be handling dates out of the box, Markdown etc?
@adi makes sense! With the blog idea I guess the main difference will be handling dates out of the box, Markdown etc?
@eldersnake Yeah, exactly!
@eldersnake Yeah, exactly!
@eldersnake Yeah, exactly!
@adi @eldersnake I'm also considering running pp via CGI and building a simple dynamic cms but there are some security issues there I have to solve.
@adi @eldersnake I'm also considering running pp via CGI and building a simple dynamic cms but there are some security issues there I have to solve.
@adi @eldersnake I'm also considering running pp via CGI and building a simple dynamic cms but there are some security issues there I have to solve.
@adi @eldersnake UI would be similar to this https://datenstrom.se/yellow/demo.
@adi @eldersnake UI would be similar to this https://datenstrom.se/yellow/demo.
@adi @eldersnake UI would be similar to this https://datenstrom.se/yellow/demo.
@adi @eldersnake I would really like to develop a simple https server I can bundle with that, but for now https://acme.com/software/thttpd/ can also be used.
@adi @eldersnake I would really like to develop a simple https server I can bundle with that, but for now https://acme.com/software/thttpd/ can also be used.
@adi @eldersnake I would really like to develop a simple https server I can bundle with that, but for now https://acme.com/software/thttpd/ can also be used.
heh you got it all going on! Well I'm always happy to test something out when you put something together 🙂
heh you got it all going on! Well I'm always happy to test something out when you put something together 🙂