10 ms·
Heh that's cool. It renders the calendar as HTML and then uses selenium to open up headless chrome and screenshot it and then send the bitmap to the eink displa
by acidburnNSA 5y ago
Heh that's cool. It renders the calendar as HTML and then uses selenium to open up headless chrome and screenshot it and then send the bitmap to the eink display. Clever.
- freeone3000 5y agothere has to be a simpler way to draw a grid. there has to.
- adrianmonk 5y agoPostScript, maybe. Instead of generating HTML from calendar data, generate PS and have Ghostscript convert it to PNG. I don't know PostScript, and based on the example code in the wikipedia article (https://en.wikipedia.org/wiki/PostScript#The_language https://en.wikipedia.org/wiki/PostScript#The_language), I was able to get it to draw some text in a few minutes.
- 41209 5y agoAll the complexity is handled by well known tools/libraries. I can code a selenium script to capture a screenshot in my sleep. Often using tools your know is the best solution. Your free to fork this and come up with a cleaner implementation. This is probably why you need a PI Zero. Smaller micro controllers can't run a full browser. Most of these projects are just whatever can be hacked together in a weekend.
- floren 5y agoWhen all you have is a hammer...
- vanviegen 5y agoSure. But this approach sounds like a sensible base to quickly whip up all sorts of little projects.
- pshc 5y agoI would volunteer LaTeX but that's also 100s of MBs/GBs of dependencies to be fair. Perhaps an SVG rasterizer would suffice here.
- dragonwriter 5y agoSimpler in runtime overhead. Simpler for a developer familiar with the tools used here, but less so with others? Maybe not. This seems to be a hobbyist project, not a major corporate effort where $100Ks were spent on tech selection.
- saagarjha 5y agoI would not be surprised if a corporation would spend $100Ks on tech selection and end up with a headless Chrome too.
- salawat 5y agoThat is not clever. That is horrifying. You have just massively bloated your set of dependencies to accomplish something you could have done with a rudimentary GUI toolkit.
- rfrankenstein 5y ago“Premature optimization is the root of all evil”—Donald Knuth.
- emsy 5y agoThat phrase is so overused in light of massively over engineered solutions that are created every day in our industry . Let’s face it: this project loads some data via http and displays some text and primitives on a display. This can easily be handled on a esp32 with room to spare. But somehow we think it’s normal to involve an OS, a fully fledged computer and a browser to do this. Seriously, we need the opposite of the Knuth quote: “When in doubt don’t ship a browser” or something like that.
- TedDoesntTalk 5y agoI wonder what the reason is for this solution. He must have one.
- edoceo 5y agoCause EInk display code works nice to just ship it an image type file. So, it's gotta be rasterized before, using Chromium makes that super easy - rather than hand crafting PNG. I personally make SVG then rasterize but this isn't that terrible.
- jazzyjackson 5y agoI was going down this route once, trying to use Inkscape headless. Is there a SVG-2-bitmap tool you can recommend?
- 5y ago
- tejohnso 5y agoI use Python Imaging Library + Seaborn to push out a bar chart bitmap representing some PiHole statistics to this: https://thepihut.com/products/inky-impression-7-colour-epaper-eink-epd https://thepihut.com/products/inky-impression-7-colour-epape...
- acidburnNSA 5y agoAh nice. Yeah I'm looking for the right display for my skymap that shows the sun and moon and planets as they track across the sky. It's fun to see the sun curve change with the seasons. Would be way better to have on 7 color eink in the living room than on my phone or laptop. This one looks good. Are there any that are like 3 inches bigger with borderline similar price points?