# Refactoring branch. Work in progress! Please do not use this branch as this is in pre-alpha stage. It it only intended for development purposes. ## Short Summary Aim of refactoring: * [x] Use settings.json file instead of .py file * [x] Fully dynamic images (changable section sizes) * [x] No preferred module positions or sizes * [x] Switch from scripts to classes * [ ] Allow using pip3 install .... to install inkycal * [x] Update dependencies * [x] Switch from ics to icalendar library for better parsing of iCalendars * [ ] Allow using on windows (no-render mode) * [x] Implement features from dev branch * [ ] Implement testing for each module ## Testing While the main file is incomplete, you can still try out a few tests. To run these tests, please follow the steps below: * Clone this branch: `git clone -b dev_ver2_0 https://github.com/aceisace/Inky-Calendar inkycal` * Navigate to inkycal directory: `cd inkycal` * run tests: `python3 dev_tests.py` ## Info The main folder is now inkcal. Folder structure: ```bash | Inkycal.py -main file (work in progress) | __init__.py | +---config | layout.py -handles layout of image (size, section-sizes) | parser.py -parse the settings.json file | settings.json -JSON file for all the user-config | __init__.py | +---custom | functions.py -custom functions of inkycal-software (writing text, etc..) | __init__.py | +---display | | __init__.py | | | \---drivers - drivers.... | epdconfig.py | epd_4_in_2.py | epd_4_in_2_colour.py | epd_5_in_83.py | epd_5_in_83_colour.py | epd_7_in_5.py | epd_7_in_5_colour.py | epd_7_in_5_v2.py | epd_7_in_5_v2_colour.py | __init__.py | \---modules - folder containing all modules ical_parser.py - parses icalendars inkycal_rss.py - parses rss feeds inkycal_weather.py - parses weather from openweathermap __init__.py ```
[](https://github.com/aceisace/Inky-Calendar/releases) [](https://img.shields.io/pypi/pyversions/pyowm.svg) [](https://github.com/aceisace/Inky-Calendar/blob/Stable/LICENSE) [](https://www.paypal.me/SaadNaseer)
A python3 software for displaying events (from iCalendars), weather (from openweathermap) and RSS feeds on selected E-Paper displays (4.2", 5.83", 7.5"(v1), 7.5"(v2)) from Waveshare/GoodDisplay. ## Main features * Monthly Calendar that shows events from your Google (or other) iCalendar/s * Live weather info and forecasts for next 9 hours (openweathermap) * Agenda to show what is on your shedule (from your iCalendar/s) * RSS feeds from various providers to keep up to date with news, quotes etc. ## News: * **Looking for a server-only solution? [This repo offers a server-only solution](https://github.com/Atrejoe/Inky-Calendar-Server) (Credit to Atrejoe)** * **Discord chat open now. [Click here to enter](https://discord.gg/sHYKeSM)** * **Version 1.7.1 released with support for 4.2", 5.83", 7.5" (v1) and 7.5" (v2) E-Paper displays** (Mid January 2020) * **Added support for Debian Buster, Buster Lite is not supported!** ## Development status This software is in active development. To see the current development status, [[Click here]](https://github.com/aceisace/Inky-Calendar/projects/2). ## Preview
## Hardware required
* 7.5" 3-Colour E-Paper Display (Black, White, Red/Yellow) with driver hat from [waveshare](https://www.waveshare.com/product/7.5inch-e-paper-hat-b.htm)
**or**
* 7.5" 2-Colour E-Paper Display (Black, White) with driver hat from [waveshare](https://www.waveshare.com/product/7.5inch-e-paper-hat.htm)
* Raspberry Pi Zero WH (with headers) (no soldering iron required)
* Or: Raspberry Pi Zero W. In this case, you'll need to solder 2x20 pin GPIO headers yourself
* MicroSD card (min. 4GB)
* MicroUSB cable (for power)
* Something to be used as a case (e.g. a RIBBA photo-frame or a 3D-printed case)
# Setup
## Getting the Raspberry Pi Zero W ready
1. After [flashing Raspbian Buster (with Desktop)](https://www.raspberrypi.org/downloads/raspbian/), set up Wifi on the Raspberry Pi Zero W by copying the file [**wpa_supplicant.conf**](https://github.com/aceisace/Inky-Calendar/blob/installer/wpa_supplicant.conf) (from above) to the /boot directory and adding your Wifi details in that file.
2. Create a simple text document named **ssh** in the boot directory to enable ssh.
3. Install the SD card and boot your Raspberry Pi. Connect to it over the network with ssh and login.
3. Expand the filesystem in the Terminal with **`sudo raspi-config --expand-rootfs`**
4. Enable SPI by entering **`sudo sed -i s/#dtparam=spi=on/dtparam=spi=on/ /boot/config.txt`** in the Terminal
5. Set the correct timezone with **`sudo dpkg-reconfigure tzdata`**, selecting the correct continent and then the capital of your country.
6. Reboot to apply changes
7. Optional: If you want to disable the on-board leds of the Raspberry, follow these instructions:
**[Disable on-board-led](https://www.jeffgeerling.com/blogs/jeff-geerling/controlling-pwr-act-leds-raspberry-pi)**
## Installing required packages for python 3.x
Execute the following command in the Terminal to install all required packages. Please use Raspbian Buster with Desktop (preferably the latest version). Raspbian Buster **LITE** is __not__ supported.
**`bash -c "$(curl -sL https://raw.githubusercontent.com/aceisace/Inky-Calendar/master/Installer.sh)"`**
**Installing tagged versions**:
If you want to install a different version than the *master* branch, insert the tag name into the above URL, e. g.
`bash -c "$(curl -sL https://raw.githubusercontent.com/aceisace/Inky-Calendar/v1.7.1/Installer.sh)"`
**Upgrading from old versions:**:
If you were using a previous version, please use the web-ui for generating a new settings file. Settings files from previous versions are not compatible.
If you get some red lines, please run `pip3 install Pillow`.
If the installer is broken, please follow the instructions here [manual installation](https://github.com/aceisace/Inky-Calendar/wiki/Manual-installation)
If the Installer should fail for any reason, kindly open an issue and paste the error. Thanks.
**Preview of Installer:**