PiSupply / PaPiRus

Resources for PaPiRus ePaper eInk displays
https://www.pi-supply.com/product/papirus-epaper-eink-screen-hat-for-raspberry-pi/
Other
347 stars 84 forks source link

Add ability to pipe images into stdin in papirus-draw #180

Closed schwma closed 6 years ago

schwma commented 6 years ago

Follows Unix philosophy of using output of one program as input to another program.

Allows simple one-liners such as the following: curl https://raw.githubusercontent.com/PiSupply/PaPiRus/master/bitmaps/papirus-logo.bmp | papirus-draw - -t resize

tvoverbeek commented 6 years ago

Good idea. We try to have the code Python 3 compatible, since Python 2 will stop to be supported in 2020. In Python 3 there is a strict separation between strings (text) and bytestreams. We need a bytestream here for Python 3. Can you make the code Python 2 and Python 3 compatible?

schwma commented 6 years ago

Hi! I made my code Python 2 and Python 3 compatible. I'm still new to Python and especially the compatibility problems between different versions, so if there is a better way to handle this, then please let me know.

tvoverbeek commented 6 years ago

@schwma Thanks. Tested it with both Python 2 and 3. Works fine. Merged