diff --git a/README.md b/README.md index 14251540..e521b445 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,14 @@ # Smart-Mirror Raspberry powered mirror which can display the news, weather, and time. +## Installation and Updating +Installation is simple as running the following command. + +> sudo pip install git+https://github.com/HackerHouseYT/Smart-Mirror.git + +## Running +To run the application run the following command in this folder +> python smartmirror.py + +## Demo and Build Instructions [![Link to youtube how-to video](http://i.imgur.com/cMyaSHT.png)](https://youtu.be/fkVBAcvbrjU) diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..89937fb2 --- /dev/null +++ b/setup.py @@ -0,0 +1,32 @@ +#!/usr/bin/python + +import os +import sys +from setuptools import setup, find_packages + +# Must be ran as root or as sudo +if os.getuid() != 0: + print('ERROR: Need to run as root') + sys.exit(1) + +# Install the requirements if the system does not have it installed +print('INFO: Checking and installing requirements') +os.system('! dpkg -S python-imaging-tk && apt-get -y install python-imaging-tk') + +# Generate the requirements from the file for old instructions +print('INFO: Generating the requirements from requirements.txt') +packages = [] +for line in open('requirements.txt', 'r'): + if not line.startswith('#'): + packages.append(line.strip()) + +# Run setuptools for pip +setup( + name='smartmirror', + version='1.0.0', + description='Raspberry powered mirror which can display news, weather, calendar events', + author='HackerHouse', + url='https://github.com/HackerHouseYT/Smart-Mirror', + install_requires=packages, + packages=find_packages(), +)