707 points · 140 comments · 5 days ago · tamnd
github.comsimonw
wolttam
Cool!
It would be especially cool to have a version that didn't require the separate serving process - even though it's nifty you can package up a whole site as a single binary.
Maybe a single HTML entrypoint shim with a bit of javascript that could index into an archive (potentially embedded) of the site's content?
ninalanyon
kage serve $HOME/data/kage/paulgraham.com
If the result is static why does it need a server? Isn't it possible to make it so that it can simply be opened by the browser? Like:
$ firefox $HOME/data/kage/paulgraham.com
Then the result would be useable on machines without kage nstalled.
maxloh
It strips out all the JavaScript too, but also packs everything into a single HTML file that is easy to transfer. Binary assets (like web fonts and images) are packed as base64 strings.
They also offer a CLI powered by Puppeteer. [1]
xlii
No tracking, no network calls, no surprises.
Won't comment on a project (though idea seems interesting) but this in README is a tell for me ;)
telesilla
latexr
pandoc --from html --to epub --output /PATH/TO/FILE.epub https://example.comgregwebs
dimiprasakis
In any case, cool stuff :)
rahimnathwani
coffeecoders
It's one of the reasons I've become a bigger fan of RSS over time. A feed from 10-ish years ago is often more usable today than a carefully preserved (application) website.
shinryuu
Compared to that is there anything kage does better?
soulofmischief
https://github.com/jart/cosmopolitan
https://justine.lol/cosmopolitan/index.html
(Certificates just expired for justine's website, just ignore the warning.)
ralferoo
kadhirvelm
But will look into this now, see if we can swap some stuff out. We’ve really liked the idea of an offline mirror, makes a lot of collaboration use cases simpler
jokethrowaway
I would recommend an add-on or new feature to detect and remove cookie banners / annoying popups that open on load (eg. sign up to my mailing list).
listing a few examples form fastText could help you.
You might also have the opposite problem though: some websites have content in the base html (so it's searchable by Google and they get views) and remove it on load (so you have to pay).
Capturing the initial html and comparing it to the final version could give you some hints and allow you to repair the removed content.
Best of luck with the project!
lolpython
sanqui
sails
Igor_Wiwi
[deleted]
amatecha
b0dhimind
cynicalsecurity
carsonye
jyscao
chinnyys
Is the code also AI slop?
ekianjo
godot
for an entire website though of many pages I can see this can be useful.
Sathwickp
aynite
c7b
calrizien
nitotm
[deleted]
smusamashah
daviding
Departed7405
rickylin
KellyCriterion
endorphine
G_o_D
chfritz
aa-jv
So I don't quite get whats the point of kage? What does it do that print-to-PDF won't already do? The resulting .pdf's contain all the content, and also include the original URL and creation date, etc. How is kage an improvement?
sneak
snowflaxxx
kjmh
Onavo
[deleted]
delduca
grahamstanes17
Turns out it's using another project by the same author: https://github.com/tamnd/ascii-gif
The script used for the demo is at https://github.com/tamnd/kage/blob/01e75b87ecc893bbba7943c63... and has a comment showing how to run it:
Looks like it's an opinionated wrapper around https://github.com/charmbracelet/vhs