Code Monkey home page Code Monkey logo

kindlecalendar's Introduction

KindleCalendar

Selenium automation to screenshot your calendar and view it on the Kindle browser

How to get started

  1. log in to your Pi (or whatever device you want to use)
  2. Clone this repo: git clone https://github.com/morrolinux/KindleCalendar.git
  3. Install python dependencies: cd KindleCalendar && pip install -r requirements.txt && cd ..
  4. Install systemd user services: cp KindleCalendar/config/systemd/user/* .config/systemd/user/
  5. Enable systemd services: systemctl --user daemon-reload && systemctl --user enable kindleserver && systemctl --user enable screenshot
  6. Install Firefox and login with your google account
  7. Visit Google Calendar just to make sure it loads correctly
  8. Install the selenium webdriver for firefox: instructions here
  9. Edit KindleCalendar/screenshot.py and set your Firefox profile path under profile = webdriver.FirefoxProfile(...
  10. Install nodejs and npm sudo apt install nodejs npm
  11. Install project dependencies with npm: cd KindleCalendar && npm i

If everything went fine, you should be able to visit your Pi's IP address on port 8080 with any browser including Kindle, but make sure Javascript is enabled in browser settings.

Enjoy!

Special thanks to noxquest for his awesome project and hixie bridge node library :)

kindlecalendar's People

Contributors

bellisario avatar dkf10 avatar drego85 avatar morrolinux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

kindlecalendar's Issues

package.json and package-lock.json missing

npm should create a package.json and a package-lock.json file when you install dependencies. If you push these files in the repository we can install them just typing npm i.

Missing requirements.txt

I was following your instructions and...
cd KindleCalendar && pip install -r requirements.txt && cd .. Defaulting to user installation because normal site-packages is not writeable ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'

Thanks for the interesting project!

info: component 'rust-std' for target 'armv7-unknown-linux-gnueabihf' is up to date

Ciao Morro, bel progetto,
io vorrei solo fare semplicemente uno screenshot dal Raspberry Pi3 con "Bullseye 32bit full version", (ultimi update/upgrade) di un percorso di GoogleMap e salvarlo in "/home/linux/Immagini/Casa-Lavoro.png" quando lancio il programma .py
PS: Ho logicamente la striga completa funzionante ('https://www.google.com/maps/dir/Via+Milano+23+... ecc. ecc')

Ho provato con varie guide in internet...

sudo python3 -m pip install selenium==2.53.5 sudo apt-get install firefox-esr wget https://github.com/mozilla/geckodriver/releases/download/v0.19.1/geckodriver-v0.19.1-arm7hf.tar.gz tar -xf geckodriver-v0.19.1-arm7hf.tar.gz rm geckodriver-v0.19.1-arm7hf.tar.gz sudo chmod a+x geckodriver sudo mv geckodriver /usr/local/bin/

ma il problema sta nel come installare selenium /geckodrive e firefox-sr , perchè viene aperto firefox ma in /temp/xxxxx e da errore timeout. Non riesco ad impostare l'apertura del mio profilo firefox-sr invece che nel /temp...

Traceback (most recent call last): File "/home/pi/x.py", line 15, in <module> browser = webdriver.Firefox(firefox_profile=profile) File "/usr/local/lib/python3.9/dist-packages/selenium/webdriver/firefox/webdriver.py", line 80, in __init__ executor = ExtensionConnection("127.0.0.1", self.profile, File "/usr/local/lib/python3.9/dist-packages/selenium/webdriver/firefox/extension_connection.py", line 51, in __init__ self.binary.launch_browser(self.profile, timeout=timeout) File "/usr/local/lib/python3.9/dist-packages/selenium/webdriver/firefox/firefox_binary.py", line 68, in launch_browser self._wait_until_connectable(timeout=timeout) File "/usr/local/lib/python3.9/dist-packages/selenium/webdriver/firefox/firefox_binary.py", line 103, in _wait_until_connectable raise WebDriverException("Can't load the profile. Profile " selenium.common.exceptions.WebDriverException: Message: Can't load the profile. Profile Dir: /tmp/tmpxoz8thyw/webdriver-py-profilecopy If you specified a log_file in the FirefoxBinary constructor, check it for details.

e se setto
profile = webdriver.FirefoxProfile(/home/pi/.mozilla/firefox/MIONUMEROprofilo.default-esr/)
ricevo errore:
`ImportError: cannot import name FirefoxOptions from selenium.webdriver (/usr/local/lib/python3.9/dist-packages/selenium/webdriver/init.py)'

Ho provato il tuo progetto, ma mi fermo qui:
dalla guida:https://firefox-source-docs.mozilla.org/testing/geckodriver/ARM.html

con comando:
pi@Bullseye:~ $ rustup target install armv7-unknown-linux-gnueabihf

ricevo errore:
info: component 'rust-std' for target 'armv7-unknown-linux-gnueabihf' is up to date

Inoltre questo NON installa "selenium" giusto?
Grazie1000

Screenshots streaming

The screenshot.png file should be a screenshot sent from a device. If the device is not the host, the screenshot should be streamed to the raspberry (maybe over HTTP?)

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.