Skip to content
/ Raspink Public

Raspink is a little utility that allows to display various info on an eInk reader connected to a Raspberry Pi.

License

Notifications You must be signed in to change notification settings

Skyost/Raspink

Repository files navigation

Raspink

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.

Features

  • 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 !

Installation

Prerequisites

I assume that your Waveshare EPD has been set up using the official instructions.

Python dependencies

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 repository

Clone the current repository, using something like this :

git clone https://github.com/Skyost/Raspink

Install and set up the waveshare_epd Python dependency

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.

Set up environment variables

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 :

Usage

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

Customization

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 the image.

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.

About

Raspink is a little utility that allows to display various info on an eInk reader connected to a Raspberry Pi.

Resources

License

Stars

Watchers

Forks