Raspink is a little utility that allows to display various info on an eInk reader connected to a Raspberry Pi.
I've been using it for my personal needs since the very start of 2022, and I've decided to share it. As it is a personal utility, you may have to customize it in order to suit your needs.
- Can fetch and display the weather for the next three days.
- Can fetch and display an iCal.
- Can fetch and display a random quote.
- Can fetch and display an RSS news feed.
- Can fetch and display... well almost what you want !
I assume that your Waveshare EPD has been set up using the official instructions.
This utility depends on the following Python libraries :
You'll have to install of them first. You can do it manually or run the following command :
pip install -r requirements.txt
Clone the current repository, using something like this :
git clone https://github.com/Skyost/Raspink
You must copy the content of the waveshare_epd
folder
into the newly created Raspink folder.
This library has been made for the Waveshare 7.5" EPD. If you plan
to use it with another reader, you must replace the epd7in5
references to whatever_epd_you_are_using
in the display/epd.py
file.
Create a .env
file in the Raspink folder. Use it like this :
OPENWEATHERMAP_KEY=your_key
REMEMBERTHEMILK_KEY=your_key
REMEMBERTHEMILK_SECRET=your_secret
REMEMBERTHEMILK_TOKEN=your_token
ICAL_URL=your_ical_url
Here's a little documentation :
OPENWEATHERMAP_KEY
: Put your OpenWeatherMap API key here. It will allow you to fetch and display the current weather.REMEMBERTHEMILK_KEY
: Put your RememberTheMilk API key here. It will allow you to fetch and display your RTM tasks.REMEMBERTHEMILK_SECRET
: Put your RememberTheMilk shared secret here. Works withREMEMBERTHEMILK_KEY
.REMEMBERTHEMILK_TOKEN
: Put your RememberTheMilk authentication token here. Works withREMEMBERTHEMILK_KEY
.ICAL_URL
: Put your iCal calendar URL here. Works best with Google Agenda calendars.
Start Raspink by running the following command in the Raspink folder :
python ./main.py
With this command, the content is refreshed every five minutes. You can combine it with nohup
to leave it active in the background.
Good for you : I've already done the work !
chmod +x start.sh
./start.sh
Hey, don't run unverified scripts on your Pi !
If you want to test it on Windows (for example), you may want to try this command :
python ./main.py --display=shell
Feel free to customize Raspink and to add new features !
All displayed components are called ``Widgets'' and are available in the widgets
folder.
They have two main methods :
_fetch()
that fetch remote data._paint(image)
that display the fetched data on theimage
.
You may be particularly interested in customizing the followings :
- News (
news.py
) : The RSS feed URL is hardcorded. Change it here. - Word of the day (
word_of_the_day.py
) : The RSS feed URL is also hardcorded here.
The method _append_default_widgets()
of the file raspink.py
handles the displaying and
the placing of all widgets.