| @@ -1,47 +0,0 @@ | |||||||
| ## This file will be deleted soon as the progress of the next release has been shifted to 'Projects' |  | ||||||
|  |  | ||||||
| ### This file contains features in planning for the next release |  | ||||||
|  |  | ||||||
| # For version 1.6 |  | ||||||
|  |  | ||||||
| ## Installer |  | ||||||
| * Optimise the installer by adding a few more options when updating |  | ||||||
| * Add version number on both, the installer and the software version to allow automatic updates |  | ||||||
|  |  | ||||||
| ## Main script |  | ||||||
| | Feature | Status | |  | ||||||
| | -- | -- | |  | ||||||
| |Use relative path instead of explicit path| work in progress | |  | ||||||
| |Implement Agenda view (will take some more time)| Work in progress | |  | ||||||
| |Display more events when free space is available (below monthly calendar)| finished -> implemented in master branch| |  | ||||||
| |Implement feature to fetch tasks| canceled as Google Calendar does not support VTODO (Tasks)| |  | ||||||
| |Add code in E-Paper.py for fixing errors related to the iCalendar (ics.py is pretty picky)| finished -> implemented in master branch | |  | ||||||
| |Add support for recurring events found in iCalendars| finished -> implemented in master branch (credit to Hubert)| |  | ||||||
| |Truncate event names if they're too long to be displayed|finished -> implemented in master branch| |  | ||||||
| |Fix a bug where past events are shown along with ones in the future| finished -> implemented in master branch | |  | ||||||
| |Add support for ics files along with iCalendar URLs| Not yet started | |  | ||||||
| |Add feature to fetch rss-feeds and display it on the E-Paper| finished -> implemented in master branch | |  | ||||||
| |Add 'pre-processing' operations on the generated image to greatly improve readablity| finished -> implemented in master branch | |  | ||||||
| |Fetch events in iCalendar if they are in the range specified by the settings.py file|finished -> implemented in master branch| |  | ||||||
| |Allow leaving some setting blank(iCalendar, api_key) in case users want to test the software first| -> work in progress| |  | ||||||
|  |  | ||||||
| ## E-Paper files (epd7in5/epd7in5b) |  | ||||||
| | Feature | Status | |  | ||||||
| | -- | -- | |  | ||||||
| | Merge calibration module with epd7in5 and epd7in5b| Not yet started | |  | ||||||
| | Create function to calibrate the screen faster by omitting conversion| work in progress| |  | ||||||
|  |  | ||||||
| ## Settings file |  | ||||||
| | Feature | Status | |  | ||||||
| | -- | -- | |  | ||||||
| | Add option to switch between the monthly and agenda-view | work in progress | |  | ||||||
| | Add option to display one of the following below the monthly Calendar section: Tasks, RSS-feed, events| work in progress | |  | ||||||
| | Add option to fetch events from a given time range in the future| finished -> implemented in master branch| |  | ||||||
| | Add option to choose the Display-update interval| finished -> implemented in master branch | |  | ||||||
|  |  | ||||||
| --------------------------- |  | ||||||
| ## More feature suggestions (will not be implemented anytime soon) |  | ||||||
| * Nextcloud Integration (further research required) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| If you can help with any features, please do so :) |  | ||||||
| @@ -69,7 +69,7 @@ There are currently 2 ways to add details to the programm, the user-friendly met | |||||||
| user-friendly option first. If you encounter any bugs, please use the legacy method and write a comment describing the bug. | user-friendly option first. If you encounter any bugs, please use the legacy method and write a comment describing the bug. | ||||||
|  |  | ||||||
| 1) **User-friendly method** | 1) **User-friendly method** | ||||||
| To use the new WEB-UI (Web-User-Interface), simply double-click the file Settings-Web-UI.html located in /home/pi/Inky-Calendar/Calendar/ to open up the document with the browser (Chrome etc.). Next, fill in the details (you can use the table below for a reference) and click on generate to create your settings.py file. Lastly, copy the generated 'settings.py' file to /home/pi/Inky-Calendar/Calendar (the same path where the settings.py file is) and try starting the main script with: | To use the new WEB-UI (Web-User-Interface), simply double-click the file Settings-Web-UI.html located in /home/pi/Inky-Calendar/Calendar/ to open up the document with the browser (Chrome etc.). Next, fill in the details (you can use the table below for a reference) and click on generate to create your settings.py file. Please add your details without these signs `""`. For example, your api_key should be entered like this: `wadiln3ilioejo` and _not_ `"wadiln3ilioejo"`. Lastly, copy the generated 'settings.py' file to /home/pi/Inky-Calendar/Calendar (the same path where the settings.py file is) and try starting the main script with: | ||||||
| python3.5 /home/pi/Inky-Calendar/Calendar/E-Paper.py. | python3.5 /home/pi/Inky-Calendar/Calendar/E-Paper.py. | ||||||
| If you encounter any issues, please leave a comment here or via email. Thanks in advance. | If you encounter any issues, please leave a comment here or via email. Thanks in advance. | ||||||
|  |  | ||||||
| @@ -79,8 +79,8 @@ Navigate to the home directory, open 'Inky-Calendar' and open the file 'settings | |||||||
|  |  | ||||||
| | Parameter |  Description | | | Parameter |  Description | | ||||||
| | :---: | :---: | | | :---: | :---: | | ||||||
| | ical_urls |  Your iCalendar URL/s. To add more than one URL, seperate each with a comma | | | ical_urls |  Your iCalendar URL/s. To add more than one URL, seperate each with a comma, for example: "ical-url1", "ical-url2"| | ||||||
| | rss_feeds | Here, you can add RSS-feed URLs which are used to fetch news etc. | | | rss_feeds | Here, you can add RSS-feed URLs which are used to fetch news etc. for example: "rss-url1", "rss-url2"| | ||||||
| | update_interval | How often should be Display be updated in one hour? The default option is `"60"`, which means once every 30 hour. You can select one of the values from: `"10"`, `"15"`, `"20"`, `"30"`, `"60"`. Please note that ghosting will occur when updating too frequently. To prevent ghosting, it's recommended to run 1 calibration for every 6 updates. For example, with an update interval of 1 hour, the calibration should be executed every 6 hours. | | | update_interval | How often should be Display be updated in one hour? The default option is `"60"`, which means once every 30 hour. You can select one of the values from: `"10"`, `"15"`, `"20"`, `"30"`, `"60"`. Please note that ghosting will occur when updating too frequently. To prevent ghosting, it's recommended to run 1 calibration for every 6 updates. For example, with an update interval of 1 hour, the calibration should be executed every 6 hours. | | ||||||
| | additional_feature | What would you like the Display to show in the section below the Calendar? The default option is `"rss"` (for RSS-feeds. You may choose `"events`" if you want to display events instead of RSS-feeds| | | additional_feature | What would you like the Display to show in the section below the Calendar? The default option is `"rss"` (for RSS-feeds. You may choose `"events`" if you want to display events instead of RSS-feeds| | ||||||
| | api_key | Your __personal__ openweathermap API-key which you can generate and find in your Account info | | | api_key | Your __personal__ openweathermap API-key which you can generate and find in your Account info | | ||||||
|   | |||||||
							
								
								
									
										257
									
								
								prototype.sh
									
									
									
									
									
								
							
							
						
						
									
										257
									
								
								prototype.sh
									
									
									
									
									
								
							| @@ -1,257 +0,0 @@ | |||||||
| #!/bin/bash |  | ||||||
| # E-Paper-Calendar software installer for Raspberry pi |  | ||||||
| # Version: 1.6 (Mid April 2019) |  | ||||||
| # Stability status of this installer: Testing in progress |  | ||||||
|  |  | ||||||
| echo -e "\e[1mPlease select an option from below:" |  | ||||||
| echo -e "\e[97mEnter \e[91m1 \e[97m to update the E-Paper software" |  | ||||||
| echo -e "\e[97mEnter \e[91m2 \e[97m to install the E-Paper software" |  | ||||||
| echo -e "\e[97mEnter \e[91m3 \e[97m to uninstall the E-Paper software" |  | ||||||
| echo -e "\e[97mConfirm your selection with [ENTER]" |  | ||||||
| read -r -p 'Waiting for input...  ' option |  | ||||||
|  |  | ||||||
| if [ "$option" != 1 ] && [ "$option" != 2 ] && [ "$option" != 3 ]; then |  | ||||||
|     echo -e "invalid number, aborting now" |  | ||||||
|     exit |  | ||||||
| fi |  | ||||||
| if [ -z "$option" ]; then |  | ||||||
|     echo -e "You didn't enter anything, aborting now." |  | ||||||
|     exit |  | ||||||
| fi |  | ||||||
| if [ "$option" = 3 ]; then |  | ||||||
|     echo -e "\e[1;36m"Removing the E-Paper software now..."\e[0m" |  | ||||||
|     pip3 uninstall Pillow -y && sudo pip3 uninstall Pillow -y && sudo pip3 uninstall pyowm -y&& sudo pip3 uninstall ics -y && pip3 uninstall pyowm -y && pip3 uninstall ics -y && sudo apt-get remove supervisor -y && pip3 uninstall feedparser -y && sudo pip3 uninstall feedparser -y && sudo apt-get clean && sudo apt-get autoremove -y |  | ||||||
|     if [ -e /etc/supervisor/conf.d/E-Paper.conf ]; then |  | ||||||
|         sudo rm /etc/supervisor/conf.d/E-Paper.conf |  | ||||||
|     fi |  | ||||||
|     echo -e "\e[1;36m"The libraries have been removed successfully"\e[0m" |  | ||||||
|     sleep 1 |  | ||||||
|     echo -e "Removing the Inky-Calendar folder if it exists" |  | ||||||
|     if [ -d "/home/pi/Inky-Calendar" ]; then |  | ||||||
|         sudo rm -r /home/pi/Inky-Calendar/ |  | ||||||
| 	echo -e "\e[1;36m"Found the E-Paper-software folder and deleted it"\e[0m" |  | ||||||
|     fi |  | ||||||
|     echo -e "\e[1;36m"All done!"\e[0m" |  | ||||||
| fi |  | ||||||
|  |  | ||||||
| if [ "$option" = 1 ]; then |  | ||||||
|     echo -e "\e[1;36m"Checking if the settings.py exists..."\e[0m" |  | ||||||
|     if [ -e /home/pi/Inky-Calendar/Calendar/settings.py ]; then |  | ||||||
|         echo -e "Found an E-Paper settings file." |  | ||||||
|         sleep 2 |  | ||||||
| 	echo "Backing up the current settings file in the home directory." |  | ||||||
| 	sleep 2 |  | ||||||
| 	cp /home/pi/Inky-Calendar/Calendar/settings.py /home/pi/settings-old.py |  | ||||||
| 	echo -e "renaming the old E-Paper software folder" |  | ||||||
| 	sleep 2 |  | ||||||
| 	cp -r /home/pi/Inky-Calendar /home/pi/Inky-Calendar-old |  | ||||||
| 	sudo rm -r /home/pi/Inky-Calendar |  | ||||||
| 	echo "Updating now..." |  | ||||||
|         cd |  | ||||||
|     else |  | ||||||
|         # Ask to update anyway. May not work always, but can help with new versions. |  | ||||||
| 	echo -e "\e[1;36m"Could not find the configuration file -settings.py- in /home/pi/Inky-Calendar/Calendar"\e[0m" |  | ||||||
| 	sleep 2 |  | ||||||
| 	echo -e "\e[1;36m"Would you like to update the Inky-Calendar software anyway?"\e[0m" |  | ||||||
|         echo -e "\e[97mPlease type [y] for yes or [n] for no and confirm your selection with [ENTER]" |  | ||||||
|         read -r -p 'Waiting for input...  ' update_anyway |  | ||||||
|      |  | ||||||
|         if [ "$update_anyway" != Y ] && [ "$update_anyway" != y ] && [ "$update_anyway" != N ] && [ "$update_anyway" != n ]; then |  | ||||||
|             echo -e "invalid input, aborting now" |  | ||||||
|             exit |  | ||||||
|         fi |  | ||||||
|         if [ -z "$update_anyway" ]; then |  | ||||||
|             echo -e "You didn't enter anything, aborting now." |  | ||||||
|             exit |  | ||||||
|         fi |  | ||||||
|      |  | ||||||
|         if [ "$update_anyway" = Y ] || [ "$update_anyway" = y ]; then |  | ||||||
|             echo "Updating now..." |  | ||||||
| 	else |  | ||||||
| 	    echo -e "Not attempting to update, exiting now." |  | ||||||
|             exit |  | ||||||
|         fi |  | ||||||
|     fi |  | ||||||
| fi |  | ||||||
|  |  | ||||||
| if [ "$option" = 2 ]; then |  | ||||||
|     echo -e "\e[1;36m"Setting up the system by installing some required libraries for python3"\e[0m" |  | ||||||
|  |  | ||||||
|     # Installing a few packages which are missing on Raspbian Stretch Lite |  | ||||||
|     echo -e "\e[1;36m"Installing a few packages that are missing on Raspbian Stretch Lite..."\e[0m" |  | ||||||
|     sudo apt-get install python3-pip -y python-rpi.gpio-dbgsym -y python3-rpi.gpio -y python-rpi.gpio -y python3-rpi.gpio-dbgsym -y python3-spidev -y git -y libopenjp2-7-dev -y libtiff5 -y python3-numpy -y |  | ||||||
|     echo "" |  | ||||||
|  |  | ||||||
|     # Running apt-get clean and apt-get autoremove |  | ||||||
|     echo -e "\e[1;36m"Cleaning a bit of mess to free up some space..."\e[0m" |  | ||||||
|     sudo apt-get clean && sudo apt-get autoremove -y |  | ||||||
|     echo "" |  | ||||||
| fi |  | ||||||
|  |  | ||||||
| if [ "$option" = 1 ] || [ "$option" = 2 ]; then |  | ||||||
|     # Ask to update system |  | ||||||
|     echo -e "\e[1;36m"Would you like to update and upgrade the operating system first?"\e[0m" |  | ||||||
|     sleep 1 |  | ||||||
|     echo -e "\e[97mIt is not scrictly required, but highly recommended." |  | ||||||
|     sleep 1 |  | ||||||
|     echo -e "\e[97mPlease note that updating may take quite some time, in rare cases up to 1 hour." |  | ||||||
|     sleep 1 |  | ||||||
|     echo -e "\e[97mPlease type [y] for yes or [n] for no and confirm your selection with [ENTER]" |  | ||||||
|     read -r -p 'Waiting for input...  ' update |  | ||||||
|      |  | ||||||
|     if [ "$update" != Y ] && [ "$update" != y ] && [ "$update" != N ] && [ "$update" != n ]; then |  | ||||||
|         echo -e "invalid input, aborting now" |  | ||||||
|         exit |  | ||||||
|     fi |  | ||||||
|     if [ -z "$update" ]; then |  | ||||||
|         echo -e "You didn't enter anything, aborting now." |  | ||||||
|         exit |  | ||||||
|     fi |  | ||||||
|      |  | ||||||
|     if [ "$update" = Y ] || [ "$update" = y ]; then |  | ||||||
|         # Updating and upgrading the system, without taking too much space |  | ||||||
|         echo -e "\e[1;36m"Running apt-get update and apt-get dist-upgrade for you..."\e[0m" |  | ||||||
| 	sleep 1 |  | ||||||
|         echo -e "\e[1;36m"This will take a while, sometimes up to 1 hour"\e[0m" |  | ||||||
|         sudo apt-get update && sudo apt-get dist-upgrade -y |  | ||||||
|         echo -e "\e[1;36m"System successfully updated and upgraded!"\e[0m" |  | ||||||
|         echo "" |  | ||||||
|     fi |  | ||||||
|  |  | ||||||
|     # Installing dependencies |  | ||||||
|      |  | ||||||
|     #PYOWM for user pi |  | ||||||
|     echo -e "\e[1;36m"Installing dependencies for the Inky-Calendar software"\e[0m" |  | ||||||
|      |  | ||||||
|     echo -e "\e[1;36m"Checking if pyowm is installed for user pi"\e[0m" |  | ||||||
|     if python3.5 -c "import pyowm" &> /dev/null; then |  | ||||||
|         echo 'pyowm is installed, skipping installation of this package.' |  | ||||||
|     else |  | ||||||
|         echo 'pywom is not installed, attempting to install now' |  | ||||||
| 	pip3 install pyowm |  | ||||||
|     fi |  | ||||||
|      |  | ||||||
|     #PYOWM for user sudo |  | ||||||
|     echo -e "\e[1;36m"Checking if pyowm is installed for user sudo"\e[0m" |  | ||||||
|     if sudo python3.5 -c "import pyowm" &> /dev/null; then |  | ||||||
|         echo 'pyowm is installed, skipping installation of this package.' |  | ||||||
|     else |  | ||||||
|         echo 'pywom is not installed, attempting to install now' |  | ||||||
| 	sudo pip3 install pyowm |  | ||||||
|     fi |  | ||||||
|      |  | ||||||
|     #Pillow for user pi   |  | ||||||
|     echo -e "\e[1;36m"Checking if Pillow is installed for user pi"\e[0m" |  | ||||||
|     if python3.5 -c "import PIL" &> /dev/null; then |  | ||||||
|         echo 'Pillow is installed, skipping installation of this package.' |  | ||||||
|     else |  | ||||||
|         echo 'Pillow is not installed, attempting to install now' |  | ||||||
| 	pip3 install Pillow==5.3.0 |  | ||||||
|     fi |  | ||||||
|      |  | ||||||
|     #Pillow for user sudo |  | ||||||
|     echo -e "\e[1;36m"Checking if Pillow is installed for user sudo"\e[0m" |  | ||||||
|     if sudo python3.5 -c "import PIL" &> /dev/null; then |  | ||||||
|         echo 'Pillow is installed, skipping installation of this package.' |  | ||||||
|     else |  | ||||||
|         echo 'Pillow is not installed, attempting to install now' |  | ||||||
| 	sudo pip3 install Pillow==5.3.0 |  | ||||||
|     fi |  | ||||||
|      |  | ||||||
|     #Ics.py for user pi   |  | ||||||
|     echo -e "\e[1;36m"Checking if ics is installed for user pi"\e[0m" |  | ||||||
|     if python3.5 -c "import ics" &> /dev/null; then |  | ||||||
|         echo 'ics is installed, skipping installation of this package.' |  | ||||||
|     else |  | ||||||
|         echo 'ics is not installed, attempting to install now' |  | ||||||
| 	pip3 install ics |  | ||||||
|     fi |  | ||||||
|      |  | ||||||
|     #Ics.py for user sudo |  | ||||||
|     echo -e "\e[1;36m"Checking if ics is installed for user sudo"\e[0m" |  | ||||||
|     if sudo python3.5 -c "import ics" &> /dev/null; then |  | ||||||
|         echo 'ics is installed, skipping installation of this package.' |  | ||||||
|     else |  | ||||||
|         echo 'ics is not installed, attempting to install now' |  | ||||||
| 	sudo pip3 install ics |  | ||||||
|     fi |  | ||||||
|  |  | ||||||
|     #feedparser for user pi   |  | ||||||
|     echo -e "\e[1;36m"Checking if feedparser is installed for user pi"\e[0m" |  | ||||||
|     if python3.5 -c "import feedparser" &> /dev/null; then |  | ||||||
|         echo 'feedparser is installed, skipping installation of this package.' |  | ||||||
|     else |  | ||||||
|         echo 'feedparser is not installed, attempting to install now' |  | ||||||
| 	pip3 install feedparser |  | ||||||
|     fi |  | ||||||
|      |  | ||||||
|     #feedparser for user sudo |  | ||||||
|     echo -e "\e[1;36m"Checking if feedparser is installed for user sudo"\e[0m" |  | ||||||
|     if sudo python3.5 -c "import feedparser" &> /dev/null; then |  | ||||||
|         echo 'feedparser is installed, skipping installation of this package.' |  | ||||||
|     else |  | ||||||
|         echo 'feedparser is not installed, attempting to install now' |  | ||||||
| 	sudo pip3 install feedparser |  | ||||||
|     fi |  | ||||||
|      |  | ||||||
|     echo -e "\e[1;36m"Finished installing all dependencies"\e[0m" |  | ||||||
|      |  | ||||||
|     # Clone the repository, then delete some non-required files |  | ||||||
|     echo -e "\e[1;36m"Installing the Inky-Calendar Software for your display"\e[0m" |  | ||||||
|     cd |  | ||||||
|     git clone https://github.com/aceisace/Inky-Calendar Inky-Calendar-temp |  | ||||||
|     mkdir Inky-Calendar |  | ||||||
|     cd Inky-Calendar-temp |  | ||||||
|     cp -r Calendar /home/pi/Inky-Calendar/ |  | ||||||
|     cp README.md /home/pi/Inky-Calendar/ |  | ||||||
|     cp LICENSE /home/pi/Inky-Calendar/ |  | ||||||
|     cp -r .git /home/pi/Inky-Calendar/ |  | ||||||
|      |  | ||||||
|     # Make a copy of the sample settings.py file |  | ||||||
|     cd /home/pi/Inky-Calendar/Calendar |  | ||||||
|     cp settings.py.sample settings.py |  | ||||||
|  |  | ||||||
|     # Remove the downloaded (temporary) directory |  | ||||||
|     cd |  | ||||||
|     sudo rm -r Inky-Calendar-temp |  | ||||||
|  |  | ||||||
|     # add a short info |  | ||||||
|     cat > /home/pi/Inky-Calendar/Info.txt << EOF |  | ||||||
| This document contains a short info of the Inky-Calendar software version |  | ||||||
|  |  | ||||||
| Version: 1.6 |  | ||||||
| Installer version: 1.6 (Mid April 2019) |  | ||||||
| configuration file: /home/pi/Inky-Calendar/Calendar/settings.py |  | ||||||
| If the time was set correctly, you installed this software on: |  | ||||||
| EOF |  | ||||||
|     echo "$(date)" >> /home/pi/Inky-Calendar/Info.txt |  | ||||||
|     echo "" |  | ||||||
|  |  | ||||||
|     # Setting up supervisor |  | ||||||
|     echo -e "\e[1;36m"Setting up auto-start of script at boot"\e[0m" |  | ||||||
|     sudo apt-get install supervisor -y |  | ||||||
|  |  | ||||||
|     sudo bash -c 'cat > /etc/supervisor/conf.d/E-Paper.conf' << EOF |  | ||||||
| [program:E-Paper] |  | ||||||
| command = sudo /usr/bin/python3.5 /home/pi/Inky-Calendar/Calendar/E-Paper.py |  | ||||||
| stdout_logfile = /home/pi/Inky-Calendar/E-Paper.log |  | ||||||
| stdout_logfile_maxbytes = 1MB |  | ||||||
| stderr_logfile = /home/pi/Inky-Calendar/E-Paper-err.log |  | ||||||
| stderr_logfile_maxbytes = 1MB |  | ||||||
| EOF |  | ||||||
|  |  | ||||||
|     sudo service supervisor start E-Paper |  | ||||||
|  |  | ||||||
|     echo "" |  | ||||||
|  |  | ||||||
|     # Final words |  | ||||||
|     echo -e "\e[1;36m"The install was successful"\e[0m" |  | ||||||
|     echo -e "\e[1;36m"The programm is set to start at every boot."\e[0m" |  | ||||||
|     echo -e "\e[1;31m"Please enter your details in the file 'settings.py'."\e[0m" |  | ||||||
|     echo -e "\e[1;31m"If this file is not modified, the programm will not start"\e[0m" |  | ||||||
|  |  | ||||||
|     echo -e "\e[1;36m"To modify the settings file, enter:"\e[0m" |  | ||||||
|     echo -e "\e[1;36m"nano /home/pi/Inky-Calendar/Calendar/settings.py"\e[0m" |  | ||||||
|     echo -e "\e[1;36m"You can test if the programm works by typing:"\e[0m" |  | ||||||
|     echo -e "\e[1;36m"python3.5 /home/pi/Inky-Calendar/Calendar/E-Paper.py"\e[0m" |  | ||||||
| fi |  | ||||||
		Reference in New Issue
	
	Block a user