unclutter icon indicating copy to clipboard operation
unclutter copied to clipboard

(python) API

Open ddddavidee opened this issue 2 years ago • 4 comments

Hi, would it be possible to use this extension in a programmatically way ? I really like how pages are rendered, but I have a quite long list of urls I would like to save rendered, and I would like to get them with a (hopefully, python) script. Is it possible?

ddddavidee avatar Sep 09 '22 07:09 ddddavidee

@ddddavidee sorry I saw this issue only just now.

To clarify, you want to download the HTML (or maybe PDF) of the "uncluttered" articles pages? Why don't you open the links in your browser (maybe it should work offline)? Where do you save the list of URLs currently?

phgn0 avatar Sep 19 '22 11:09 phgn0

Sometimes reading a blog, I'd like to save that page and all referenced links. I can open and save it one by one but sometimes I've dozens of them and scripting the whole thing would be nicer

ddddavidee avatar Sep 19 '22 12:09 ddddavidee

I'm curious, why do you want to save articles as HTML or PDF files instead of saving just the links?

Right now Unclutter doesn't work outside the browser. But there's a way to programmatically control Chrome & unclutter pages this way, even if it takes some effort to set up. I use this method to capture screenshots of a few 100 articles to test the extension. This uses Typescript though, and only creates a screenshot of the first article page: https://github.com/lindylearn/unclutter/blob/main/serverless-screenshots/cloudrun/src/index.ts

phgn0 avatar Sep 19 '22 12:09 phgn0

I would store some pages. (If ever they're removed from the internet) And I usually unclutter some articles I study, so saving the html on disk allows me to create archives on a particular topic for later revision...

Moreover having the html, I can create a booklet and print it to PDF and to paper.

ddddavidee avatar Sep 19 '22 15:09 ddddavidee

I would store some pages. (If ever they're removed from the internet) And I usually unclutter some articles I study, so saving the html on disk allows me to create archives on a particular topic for later revision...

On Mon, 19 Sep 2022, 14:42 Peter Hagen, @.***> wrote:

I'm curious, why do you want to save articles as HTML or PDF files instead of saving just the links?

Right now Unclutter doesn't work outside the browser. But there's a way to programmatically control Chrome & unclutter pages this way, even if it takes some effort to set up. I use this method to capture screenshots of a few 100 articles to test the extension. This uses Typescript though, and only creates a screenshot of the first article page: https://github.com/lindylearn/unclutter/blob/main/serverless-screenshots/cloudrun/src/index.ts

— Reply to this email directly, view it on GitHub https://github.com/lindylearn/unclutter/issues/332#issuecomment-1250968886, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMVOIKPZ3BQ5DFB65A3EZLV7BNTFANCNFSM6AAAAAAQINYH2E . You are receiving this because you were mentioned.Message ID: @.***>

ddddavidee avatar Oct 11 '22 08:10 ddddavidee

A related issue for saving individual PDFs natively: https://github.com/lindylearn/unclutter/issues/704

Still not a lot of progress on exposing the uncluttering algorithm as a package :(

phgn0 avatar Dec 05 '22 12:12 phgn0