GithubHelp home page GithubHelp logo

Comments (7)

pascalw avatar pascalw commented on July 22, 2024 1

Hey @julianlam yes, thanks for the suggestion. I think eips might already be doing something like this under the covers, but I'll look into this in more detail soon.

from kindle-dash.

pascalw avatar pascalw commented on July 22, 2024 1

@julianlam I've added a bit of docs + the code I use here.

from kindle-dash.

pascalw avatar pascalw commented on July 22, 2024

I briefly looked into this and indeed it seems that eips is doing something like this already internally. Calling eips twice with the same image results in only one screen update (the first call), even with the -f (full screen update) flag.

Doing a conditional HTTP request might save a tiny bit of energy, as the Kindle doesn't have to download the data and write to disk if the image hasn't changed. Given that these dashboard images are pretty small (mine are about 40kb), I doubt it's worth it to pour much time into this.

I'll soon merge a small change though that will make it easier to process headers of HTTP responses. With that it should be possible to implement conditional GET requests in fetch_dashboard.sh, so outside of the 'core' code. I'll add an example for this after I merge these changes.

from kindle-dash.

julianlam avatar julianlam commented on July 22, 2024

Thank you for looking into this. It's good to know eips is smart enough to not do the full screen update if the image has not changed.

Unrelated, but I noticed eips screws up if the image is not grayscale. At least, with my test 600x800px RGBA PNG image. I wonder if eips knows how to automatically convert to grayscale...

from kindle-dash.

pascalw avatar pascalw commented on July 22, 2024

Indeed this is something to add to the documentation (which is a bit lacking as you might've noticed 😅). You can use pngcrush -c0 image.png (on the server) to convert the image to grayscale. It's also easy to with pngjs if you produce the images with Node.js.

from kindle-dash.

julianlam avatar julianlam commented on July 22, 2024

Thanks for the tips, I was hoping I wouldn't have to use imagemagick 👍

Just wondering, what utility did you use to convert the dashbling dashboard to an image? I ended up with firefox --screenshot since both CutyCapt and phantomjs came with a ton of dependencies (per apt, anyway)

from kindle-dash.

pascalw avatar pascalw commented on July 22, 2024

I'm using Puppeteer + headless Chrome. I'm not behind my computer right now, I'll post the code later (and include it in the docs).

from kindle-dash.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.