GithubHelp home page GithubHelp logo

srynot4sale / alfred Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 1.81 MB

Simple home dashboard

Python 25.92% CSS 23.97% JavaScript 47.91% Dockerfile 1.79% Makefile 0.40%
google-calendar calendar alfred dashboard home-automation homepage home-assistant assistant nextjs

alfred's Introduction

Alfred

Alfred is a simple weather / calendar dashboard, perfect for running on a spare PC / Raspberry Pi hooked up to a screen.

The code is simple... a simple Next.js server and a cron job. Set it up on a linux host running docker and then just open in a browser.

Code is very basic, thrown-together and haphazard. But does the trick!

Screenshot of Alfred in action

How it works

The build.py Python script is called by the cron job and builds the feed.json file. This is regularly loaded by the webpage and used to refresh the data on the screen. The webpage will also detect if you have pulled some new code and refresh the page.

build.py uses uses the Google Calendar API for the calendar which means it supports Family calendars, and https://reddit.com/r/earthporn for the background.

Dependencies

  • Python 3.x (w/ virtualenv and pip)
  • Docker
  • Browser (can be on seperate machine)

Installation

cd srcdir

# Install pip requirements
virtualenv -p /usr/bin/python3 env
env/bin/pip install -r requirements.txt

# Update config
cp config.py.example config.py
vim config.py # Update details

# Build
make

Setup & run

You'll need to setup Google Calendar credentials

cd srcdir
env/bin/python build.py

# Setup cron job
cp alfred.cron /etc/cron.d/alfred
vim /etc/cron.d/alfred # Fix user and paths

# Wait for first cron run

# Run frontend
docker-compose up -d

# Open http://localhost:3000 in your browser!

alfred's People

Contributors

dependabot[bot] avatar srynot4sale avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  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.