GithubHelp home page GithubHelp logo

charlesrg / kindle-wallpaper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pablojimenezmateo/kindle-wallpaper

0.0 0.0 0.0 868 KB

This creates a custom wallpaper fetching the information from Open Weather and from you calendar from Google!

Shell 11.79% Python 88.21%

kindle-wallpaper's Introduction

Kindle weather and calendar displayer

Author: Pablo Jiménez Mateo

ScreenShot

Do you use a Kindle and hope that the wallpapers could be more useful? Well, that has just changed, with this program you will display the weather and some task to do retrieved from Open Weather and Google calendar!

You can see a preview in the preview.png file

Based on the idea of Matthew Petroff: http://www.mpetroff.net/archives/2012/09/14/kindle-weather-display/

Dependencies

Note that you need a server for this, a Raspberry Pi is more than enough.

You should have previously Jailbreaked you kindle (http://www.shatteredhaven.com/2012/11/1337365-ssh-on-kindle-4-usbnetwork-hack.html) and enabled the "screensavers" folder (https://wiki.mobileread.com/wiki/Kindle_Screen_Saver_Hack_for_all_2.x,_3.x_%26_4.x_Kindles)

You can install the dependencies with the following 2 commands:

sudo apt install pngcrush librsvg2-bin python3-pip
python3 -m pip install icalendar

Setup

In the Kindle

  • Move the file kindle/launch.sh to /mnt/us/launch.sh and change its permissions:
    scp launch.sh [email protected]:/mnt/us/

    chmod 755 /mnt/us/launch.sh
  • Mount the partition in Read/Write
    mntroot rw
  • Edit the crontab file and append your job (this will make it run everyday at 6:50 AM)
    vi /etc/crontab/root 
    50 6 * * * /mnt/us/launch.sh

In the server

You must edit the following files:

programs/parse_ical

You need to open the file programs/parse_ical and put your .ical URL in the variable ICAL_URL

Google calendar
To get your .ical for parse_ical go to https://support.google.com/calendar/answer/37103?hl=en and follow the instructions, you need the URL that is under "Public address in iCal format" and make that calendar public, or the link won't work.

iCloud calendar
The same is also possible with iCloud. Just enable sharing throgh the fan symbol and tick "public" to see the webcal URL. You can either use the easier accessible public URL explained here at apple support https://support.apple.com/en-gb/guide/icloud/mm6b1a9479/icloud or try and get the secret private URL through this tutorial https://www.techrepublic.com/article/how-to-find-your-icloud-calendar-url/ In any case you will need to replace prefix "webcal://" with "https://"

Should you experience a timezone offset when displaying calendar entry times, you will need to adapt the timedelta variable as well. So far, time delta needs to be set to the GMT offset with Google calendar (CET = GMT+1 = 1) and to 0 with iCloud.

programs/parse_weather

You need to open the file programs/parse_weather and put your city code in the variable CODE.

To get your city code for parse_weather download http://bulk.openweathermap.org/sample/city.list.json.gz and search your city id.

As an example my city code would be 6356995:

  {
    "id": 6356995,
    "name": "Castellón de la Plana/Castelló de la Plana",
    "country": "ES",
    "coord": {
      "lon": -0.05768,
      "lat": 39.992901
    }

launch.sh

You may need to change your path if you are not using the default yourserver/kindle structure.

General configuration

Finally you should create a folder in your webserver readable by your kindle when trying to download it (In this example would be yourserver/kindle):

    sudo mkdir /var/www/kindle
    sudo chown www-data:www-data /var/www/kindle
    sudo chmod 755 /var/www/kindle

Give the script launch permissions:

    chmod 755 launch.sh

Append the cronjob some minutes before the one in the Kindle (this will execute everydat at 6:30 AM):

    crontab -e 
    30 6 * * * /path/to/launch.sh

Special thanks

[email protected] for the remaining weather icons.

This program is licensed under Creative commons Attribution 3.0 Unported, more info : http://creativecommons.org/licenses/by/3.0/deed.en_US

kindle-wallpaper's People

Contributors

luedi0 avatar pablojimenezmateo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.