Hacker News new | past | comments | ask | show | jobs | submit login

> it didn't even occur to me that I could add some ad hoc logic to fetch the article HTML from js, pass it to readability and insert the in the UI

I don't know what you mean by "ad hoc". Again, Readability was written to run in the browser. It operates on the DOM, not HTML. If there's anything ad hoc going on, it would be (a) the fake DOM that Gijs wrote[1] so you can run it when all you have is HTML instead of an object graph, and (b) logic involved in shelling out to a separate NodeJS process from Python. These are hacks on top of hacks.

> which I guess is what you suggest

I wasn't suggesting anything. I'm making an observation about how illogical the JS,-therefore-Node cliché is. If I were going to suggest anything, it would be "don't use Readability" since it isn't a good fit for this use case. If "use Readability" were a requirement, then I would suggest, for the benefit of yourself and your brethren, rewriting Readability in Python or creating a binary Python module using either QuickJS and Readability plus Gijs's fake DOM, or Haxe.

1. <https://github.com/mozilla/readability/blob/main/JSDOMParser...>




> If I were going to suggest anything, it would be "don't use Readability" since it isn't a good fit for this use case.

It is a perfect fit for the user experience I was going for, even if it adds development and operational complexity --both of which were a lower priority for this project, as I stressed in the blog post.


> a perfect fit for the user experience

That's not what I said. You're moving the goalposts.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: