Hacker News new | ask | show | jobs
by sammy0910 20 days ago
I've been working on some open source tools for this that you might find interesting:

https://github.com/sstraust/simpleweb

2 comments

the idea is to open a webpage in a headless browser, run all the javascript and whatnot, and then ai-generate a program to translate the page as-displayed into a textonly format.

not great for everything, and it does, unfortunately need an LLM call to generate the translation program, but if you truly want to live in emacs, I've found it as a good stop-gap for certain pages that EWW cannot effectively render.

You don't need AI for that, this all can be done deterministically. I'm currently using Mac and using OSA layer I can easily grab the readable text out of DOM as it's rendered on the page to display in an Emacs buffer.
yes! this works for plain-text, like articles, but it's a bit tricky for menus and navigation. the challenge is that grabbing plain-text doesn't always translate the intent of a horizontal (or vertical navbar) into horizontally rendered text buttons
True. I suppose the use of small and cheap model to straighten them up is justified here. I think I'm gonna try to add that processing step, maybe it's cheap enough. It still worth to extract the plain text from the page properly, even if it sakes three-four-ten seconds.
Is the web going to swing back to a place where you exchange information in text?

Goodbye ads, and good riddance.

I like to give my AI assistant a URL and ask it to tell me what the page says — and my preferred way to talk to the assistant is in Emacs.