# 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 69
# self = https://watcher.sour.is/conv/gmlphva
@adi Here you go. go-busybox-embed

> A quick 'n dirty example ow using Go (https://golang.org)'s 1.16 new embed (https://pkg.go.dev/embed) facilities to build a busybox (https://busybox.net/) style portable executable binary that embeds other tools/executables/whatever in a seamless way.
@adi Here you go. go-busybox-embed

> A quick 'n dirty example ow using Go (https://golang.org)'s 1.16 new embed (https://pkg.go.dev/embed) facilities to build a busybox (https://busybox.net/) style portable executable binary that embeds other tools/executables/whatever in a seamless way.
@prologic 404 πŸ˜›
@prologic 404 πŸ˜›
Fuck sorry! πŸ’©

Try now! Projects are private by default on my private git hosting 🀣
Fuck sorry! πŸ’©\n\nTry now! Projects are private by default on my private git hosting 🀣
Fuck sorry! πŸ’©

Try now! Projects are private by default on my private git hosting 🀣
@prologic Aaaah, busybox style, but then we'd have symlinks, @bml @eldersnake.
@prologic Aaaah, busybox style, but then we'd have symlinks, @bml @eldersnake.
@adi @eldersnake @prologic @bml So either have 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.
@adi @eldersnake @prologic @bml So either have 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.
@prologic @bml @adi @eldersnake Is distributing a tree such a bad idea?
@prologic @bml @adi @eldersnake Is distributing a tree such a bad idea?
@prologic @bml @eldersnake @adi But if I build a single binary it would hold pp and lmt. I really refuse to build another static site generator that has a webserver inside.
@prologic @bml @eldersnake @adi But if I build a single binary it would hold pp and lmt. I really refuse to build another static site generator that has a webserver inside.
No, but reducing moving parts and reducing what a user has to do reduces friction and increase adoption 😁
No, but reducing moving parts and reducing what a user has to do reduces friction and increase adoption 😁
@bml @eldersnake @adi You can do it as arguments too 😁
@bml @eldersnake @adi You can do it as arguments too 😁
@prologic He just has to run this command wget -O - https://mkws.sh/mkws@4.0.8.tgz | tar -xzvf -.
@prologic He just has to run this command wget -O - https://mkws.sh/mkws@4.0.8.tgz | tar -xzvf -.
@bml @eldersnake @adi Then keep it as it is and just distribute a tree of tools / assets 😁
@bml @eldersnake @adi Then keep it as it is and just distribute a tree of tools / assets 😁
@prologic @eldersnake @bml And then people will ask for Markdown support in that single binary, and live reload, and a webserver. There's Hugo for that. Maybe Hugo is better.
@prologic @eldersnake @bml And then people will ask for Markdown support in that single binary, and live reload, and a webserver. There's Hugo for that. Maybe Hugo is better.
@adi @prologic @eldersnake @bml What's your opinion @bml on the issue?
@adi @prologic @eldersnake @bml What's your opinion @bml on the issue?
@eldersnake @bml @adi That’s called β€œmanaging features” 🀣 I have the same set of problems as you with the very social platform you are using πŸ˜‚
@eldersnake @bml @adi That’s called β€œmanaging features” 🀣 I have the same set of problems as you with the very social platform you are using πŸ˜‚
@adi @eldersnake @bml personally I don’t see an issue I think it’s fine the way it is πŸ‘Œ
@adi @eldersnake @bml personally I don’t see an issue I think it’s fine the way it is πŸ‘Œ
@prologic @eldersnake @bml I refuse to build an 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.
@prologic @eldersnake @bml I refuse to build an 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.
@adi @prologic @eldersnake @bml You may say I'm not distributing single static binaries, but that's exactly what I'm doing! πŸ˜›
@adi @prologic @eldersnake @bml You may say I'm not distributing single static binaries, but that's exactly what I'm doing! πŸ˜›
@adi @prologic @eldersnake personally i think it's fine... the tree is fine too. i was thinking more about how other people would use it, and just mentioned having a single binary would be nice, it would be easier to use and adopt too.
Mkws is great the way it is, and pp is genius. The only reason why I don't use it for my own site is because I can't figure out how to escape the required characters in an elegant way before files are sent to pp. The best parts of mkws are the simplicity and the ability to tweak the script for your use case. Putting everything in one binary or adding a bunch of extra features like a web server would add unnecessary complication.
Mkws is great the way it is, and pp is genius. The only reason why I don't use it for my own site is because I can't figure out how to escape the required characters in an elegant way before files are sent to pp. The best parts of mkws are the simplicity and the ability to tweak the script for your use case. Putting everything in one binary or adding a bunch of extra features like a web server would add unnecessary complication.
@bml @prologic @eldersnake Going to leave the tree, I understand how a single binary is The Holy Grail, I don't believe it's harder to use because the binaries are split. You run a single command 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.
@bml @prologic @eldersnake Going to leave the tree, I understand how a single binary is The Holy Grail, I don't believe it's harder to use because the binaries are split. You run a single command 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.
@adi @bml @prologic @eldersnake The idea of having split binaries is that you can call them in your templates. @mckinley What characters? What kind of escaping?
@adi @bml @prologic @eldersnake The idea of having split binaries is that you can call them in your templates. @mckinley What characters? What kind of escaping?
@adi @bml @prologic @eldersnake @mckinley Take 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#!\nfind . -name '*.html' | while read f\ndo\n#!\n<url>\n        <loc>$1/$(basename "$f" | pe)</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.
@adi @bml @prologic @eldersnake @mckinley Take share/sitemap.uppxml:


<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'>
#!
for f in *.html
do
#!
<url>
        <loc>$1/$(basename "$f")</loc>
        <lastmod>$(lmt -f '%Y-%m-%dT%H:%M:%SZ' "$f" | cut -d' ' -f1)</lastmod>
        <priority>1.0</priority>
</url>
#!
done
#!
</urlset>


lmt 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.
@adi @bml @prologic @eldersnake @mckinley Take 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.
@adi @bml @prologic @eldersnake @mckinley Take 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.
@adi Double quotes and ampersands with a backslash for sh, probably other characters it uses to do special functions as well. I just can't get used to omitting quotes or using single quotes in HTML tags.
@adi Double quotes and ampersands with a backslash for sh, probably other characters it uses to do special functions as well. I just can't get used to omitting quotes or using single quotes in HTML tags.
@mckinley sed 's/"/'\''/g' I guess for double quotes.
@mckinley sed 's/"/'\\''/g' I guess for double quotes.
@mckinley sed 's/"/'\\''/g' I guess for double quotes.
@adi @mckinley

> After that, I tried to use a program bundled with someone else's shell script site generator to make my own, but I couldn't get around one of the absurd limitations of the original generator. I eventually conceded that I would have to drastically change the formatting of my website and continued working, and I very quickly ran into either a bug that I couldn't fix because I don't know C, or (more likely) an even more absurd limitation that I don't care to conform to.

Is this pp ? πŸ˜› Did you get pp: Buffer overflow? πŸ˜›
@adi @mckinley \n\n> After that, I tried to use a program bundled with someone else's shell script site generator to make my own, but I couldn't get around one of the absurd limitations of the original generator. I eventually conceded that I would have to drastically change the formatting of my website and continued working, and I very quickly ran into either a bug that I couldn't fix because I don't know C, or (more likely) an even more absurd limitation that I don't care to conform to.\n\nIs this pp ? πŸ˜›
@adi @mckinley \n\n> After that, I tried to use a program bundled with someone else's shell script site generator to make my own, but I couldn't get around one of the absurd limitations of the original generator. I eventually conceded that I would have to drastically change the formatting of my website and continued working, and I very quickly ran into either a bug that I couldn't fix because I don't know C, or (more likely) an even more absurd limitation that I don't care to conform to.\n\nIs this pp ? πŸ˜› Did you get pp: Buffer overflow? πŸ˜›
@adi @mckinley \n\n> After that, I tried to use a program bundled with someone else's shell script site generator to make my own, but I couldn't get around one of the absurd limitations of the original generator. I eventually conceded that I would have to drastically change the formatting of my website and continued working, and I very quickly ran into either a bug that I couldn't fix because I don't know C, or (more likely) an even more absurd limitation that I don't care to conform to.\n\nIs this pp ? πŸ˜› Did you get pp: Buffer overflow? πŸ˜›
@adi I believe so, and I can't for the life of me remember what problem I ran into.
@adi I believe so, and I can't for the life of me remember what problem I ran into.
@mckinley If and when you're willing to take another look, maybe we could do it together? πŸ˜ƒ
@mckinley If and when you're willing to take another look, maybe we could do it together? πŸ˜ƒ
@adi Thank you, I appreciate it. If I remember correctly, the printf program can escape a string for shell input, but I had difficulty making it work elegantly with the contents of a multi-line file.
@adi Thank you, I appreciate it. If I remember correctly, the printf program can escape a string for shell input, but I had difficulty making it work elegantly with the contents of a multi-line file.
@adi I agree with @mckinley in regards to mkws being fine the way it is. For mine it also helps differentiate it from all the other SSGs out there.
@adi @mckinley wrt single quotes , for example inside meta tags, I just use &quot;.
@mckinley Do you have your sources somewhere? I understand you'd rather not escape manually and still write "normal" html, with unescaped double quotes and special characters ? Can't you just run a few seds on those html files and maybe create some temp files and pass those files to ./share/l.upphtml in the mkws main script?
@mckinley Do you have your sources somewhere? I understand you'd rather not escape manually and still write "normal" html, with unescaped double quotes and special characters ? Can't you just run a few seds on those html files and maybe create some temp files and pass those files to ./share/l.upphtml in the mkws main script?
@adi I'm trying it again with a clear head, and I'm making a little headway.
@adi I'm trying it again with a clear head, and I'm making a little headway.
@mckinley Let me know how it goes.
@mckinley Let me know how it goes.