Merge pull request #134 from nhubbard/v2-beta

Clean up the project's README and installation instructions.
This commit is contained in:
Michael Teeuw 2016-04-04 20:25:15 +02:00
commit 915e716936
2 changed files with 116 additions and 30 deletions

View File

@ -1,39 +1,56 @@
# MagicMirror V2 # MagicMirror²
[![Dependency Status](https://david-dm.org/MichMich/MagicMirror/v2-beta.svg)](https://david-dm.org/MichMich/MagicMirror/v2-beta)
[![devDependency Status](https://david-dm.org/MichMich/MagicMirror/v2-beta/dev-status.svg)](https://david-dm.org/MichMich/MagicMirror/v2-beta#info=devDependencies)
This version of the Magic Mirror software focusses on a modular plugin system. Besides that, the Magic Mirror software now also uses [Electron](http://electron.atom.io/), so no more webserver or browser installs necessary. This version of the Magic Mirror software focusses on a modular plugin system. Besides that, the Magic Mirror software now also uses [Electron](http://electron.atom.io/), so no more webserver or browser installs necessary.
#WARNING: THIS VERSION IS IN A VERY EARLY STAGE. IT IS NOT COMPLETED YET. PLEASE USE THE MASTER BRANCH. **WARNING!** This version is in a *very* early stage. It is **not** completed yet. **Please** use the master branch.
## Usage ## Usage
1. Download the latest node version:
`wget https://nodejs.org/dist/latest/node-v5.10.0-linux-armv6l.tar.gz` for Pi 1
`wget https://nodejs.org/dist/latest/node-v5.10.0-linux-armv7l.tar.gz` for Pi 2
2. Unpack file `tar -xvf filename`
3. Install `cd foldername && sudo cp -R * /usr/local/`
4. Set loglevel `npm config set loglevel info`
5. `npm install && npm start` (You may have to restart your terminal before this works)
**Important:** `npm start` does NOT work via SSH you have to execute it in a terminal session running in a window-manager. #### Automatic Installer
1. Clone the repository: `git clone -b v2-beta https://github.com/MichMich/MagicMirror`
2. Enter the new directory: `cd MagicMirror`
3. Give the installer permission to run: `sudo chmod +x install.sh`
4. Start the installer: `sudo ./install.sh`
#### Manual Installation
1. Download the latest Node.js version:
- `wget https://nodejs.org/dist/latest/node-v5.10.0-linux-armv6l.tar.gz` for Raspberry Pi
- `wget https://nodejs.org/dist/latest/node-v5.10.0-linux-armv7l.tar.gz` for Raspberry Pi 2
- `wget https://nodejs.org/dist/latest/node-v5.10.0-linux-arm64.tar.gz` for Raspberry Pi 3
2. Unpack the archive file: `tar -xvf filename.tar.gz`
3. Install Node.js: `cd foldername && sudo cp -R * /usr/local/`
4. Set loglevel `npm config set loglevel info`
5. Clone the repository and check out the beta branch: `git clone -b v2-beta https://github.com/MichMich/MagicMirror`
6. Enter the repository: `cd MagicMirror`
7. `npm install && npm start` (You may have to restart your terminal before this works!)
**Important:** `npm start` does **not** work via SSH! You will have to execute it in a terminal session running in a window manager.
## Configuration ## Configuration
1. Duplicate `config/config.js.sample` to `config/config.js`. 1. Duplicate `config/config.js.sample` to `config/config.js`.
2. Modify your required settings. 2. Modify your required settings.
##Todo ## Todo List
Things that still have to be implemented or changed.
####Main Here is a list of various things that still have to be implemented or changed.
- Allow show/hide animations to animate the height. This way the other modules won't jump around.
####Alert - [ ] Allow show/hide animations to animate the height. This way, the other modules won't jump around.
- Vertical centering of alerts - [ ] Allow vertical centering of alerts.
- Rewrite the alert module in vanilla JavaScript - [ ] Rewrite the [alert](modules/default/alert) module in vanilla JavaScript.
- [ ] Write all the documentation.
####Documentation
- Write all the documentation. :)
## Modules ## Modules
### Default modules: The following modules are installed by default.
- [**Clock**](modules/default/clock) - [**Clock**](modules/default/clock)
- [**Calendar**](modules/default/calendar) - [**Calendar**](modules/default/calendar)
- [**Current Weather**](modules/default/currentweather) - [**Current Weather**](modules/default/currentweather)
@ -43,7 +60,7 @@ Things that still have to be implemented or changed.
- [**Hello World**](modules/default/helloworld) - [**Hello World**](modules/default/helloworld)
- [**Alert**](modules/default/alert) - [**Alert**](modules/default/alert)
### 3rd Party Modules: The following modules are created by their respective authors.
- **[MMM-FRITZ-Box-Callmonitor by PaViRo](https://github.com/paviro/MMM-FRITZ-Box-Callmonitor)** <br> FRITZ!Box Callmonitor (Display an alert when someone is calling ...) - **[MMM-FRITZ-Box-Callmonitor by PaViRo](https://github.com/paviro/MMM-FRITZ-Box-Callmonitor)** <br> FRITZ!Box Callmonitor (Display an alert when someone is calling ...)
@ -52,14 +69,14 @@ Things that still have to be implemented or changed.
- **[MMM-Wunderlist by PaViRo](https://github.com/paviro/MMM-Wunderlist)** <br> Displays your Wunderlist todos on your mirror ... - **[MMM-Wunderlist by PaViRo](https://github.com/paviro/MMM-Wunderlist)** <br> Displays your Wunderlist todos on your mirror ...
## Contributing ## Contributing
Contributions of all kinds are welcome, not only in the form of code but also with regards bug reports and documentation. Contributions of all kinds are welcome, not only in the form of code but also with regards bug reports and documentation.
But please keep the following in mind: Please keep the following in mind:
- **Bug reports**: Make sure you're running the latest version. If the issue still persist: please open a clearly documented issue with a clear title. - **Bug Reports**: Make sure you're running the latest version. If the issue(s) still persist: please open a clearly documented issue with a clear title.
- **Minor bug fixes**: Please send a pull request with a clear explanation of the issue or a link to the isssue it solves. - **Minor Bug Fixes**: Please send a pull request with a clear explanation of the issue or a link to the isssue it solves.
- **Major bug fixes**: please discuss your approach in an github issue before you start to alter a big part of the code. - **Major Bug Fixes**: please discuss your approach in an GitHub issue before you start to alter a big part of the code.
- **New features**: please please discuss in an github issue before you start to alter a big part of the code. Without discussion upfront, pull request will not be accepted / merged. - **New Features**: please please discuss in a GitHub issue before you start to alter a big part of the code. Without discussion upfront, the pull request will not be accepted / merged.
Thanks for your help in making Magic Mirror better! Thanks for your help in making Magic Mirror better!

69
install.sh Normal file
View File

@ -0,0 +1,69 @@
# $$\ $$\ $$\ $$\ $$\ $$\ $$$$$$\
# $$$\ $$$ | \__| $$$\ $$$ |\__| $$ __$$\
# $$$$\ $$$$ | $$$$$$\ $$$$$$\ $$\ $$$$$$$\ $$$$\ $$$$ |$$\ $$$$$$\ $$$$$$\ $$$$$$\ $$$$$$\ \__/ $$ |
# $$\$$\$$ $$ | \____$$\ $$ __$$\ $$ |$$ _____|$$\$$\$$ $$ |$$ |$$ __$$\ $$ __$$\ $$ __$$\ $$ __$$\ $$$$$$ |
# $$ \$$$ $$ | $$$$$$$ |$$ / $$ |$$ |$$ / $$ \$$$ $$ |$$ |$$ | \__|$$ | \__|$$ / $$ |$$ | \__|$$ ____/
# $$ |\$ /$$ |$$ __$$ |$$ | $$ |$$ |$$ | $$ |\$ /$$ |$$ |$$ | $$ | $$ | $$ |$$ | $$ |
# $$ | \_/ $$ |\$$$$$$$ |\$$$$$$$ |$$ |\$$$$$$$\ $$ | \_/ $$ |$$ |$$ | $$ | \$$$$$$ |$$ | $$$$$$$$\
# \__| \__| \_______| \____$$ |\__| \_______|\__| \__|\__|\__| \__| \______/ \__| \________|
# $$\ $$ |
# \$$$$$$ |
# \______/
#
# This is an installer script for MagicMirror2. It works well enough
# that it can detect if you have Node installed, run a binary script
# and then download and run MagicMirror2.
sudo apt-get install curl wget build-essential unzip
ARM=$(uname -m) # Determine which Pi is running.
NODE_LATEST="v5.10.0" # Set the latest version here.
6L_HASH="019a257faa5eebf6304686dfeffdbcb4c22f0547aa366f6e563aad39ab1b1ab1" # Set the armv6l hash here.
7L_HASH="3f7524d3db60175c2323bb2a0a13ad1ca7d47d4ede6f42834b6b8425be70e0a2" # Set the armv7l hash here.
8_HASH="df88803bda234b32240906b620315c8f6d6200332047a88cb0ec83009cf25dd5" # Set the arm64 hash here.
DOWNLOAD_URL="https://nodejs.org/dist/latest/node-$NODE_LATEST-linux-$ARM.tar.gz" # Construct the download URL.
wget $DOWNLOAD_URL # Download the file given.
if [ $ARM = "armv6l" ]; then
if [ -f "node-$NODE_LATEST-linux-armv6l.tar.gz"]; then
COMMAND256="sha256sum node-$NODE_LATEST-linux-armv6l.tar.gz"
if [ $($COMMAND256) = "019a257faa5eebf6304686dfeffdbcb4c22f0547aa366f6e563aad39ab1b1ab1" ]; then
echo "Node.js was downloaded and verified successfully."
else
echo "Node.js was downloaded, but verification failed. Make sure sha256sum works."
exit 1
fi
fi
elif [ $ARM = "armv7l" ]; then
if [ -f "node-$NODE_LATEST-linux-armv7l.tar.gz" ]; then
COMMAND256="sha256sum node-$NODE_LATEST-linux-armv7l.tar.gz"
if [ $($COMMAND256) = "3f7524d3db60175c2323bb2a0a13ad1ca7d47d4ede6f42834b6b8425be70e0a2" ]; then
echo "Node.js was downloaded and verified successfully."
else
echo "Node.js was downloaded, but verification failed. Make sure sha256sum works."
exit 1
fi
fi
elif [ $ARM = "arm64" ]; then
if [ -f "node-$NODE_LATEST-linux-arm64.tar.gz" ]; then
COMMAND256="sha256sum node-$NODE_LATEST-linux-arm64.tar.gz"
if [ $($COMMAND256) = "df88803bda234b32240906b620315c8f6d6200332047a88cb0ec83009cf25dd5" ]; then
echo "Node.js was downloaded and verified successfully."
else
echo "Node.js was downloaded, but verification failed. Make sure sha256sum works."
exit 1
fi
fi
fi
tar xvf node-$NODE_LATEST-linux-$ARM.tar.gz
cd node*
sudo cp -R * /usr/local
cd ..
rm -rf node*
# Run Node checks to make sure Node works properly.
curl -sL https://deb.nodesource.com/test | bash -
npm config set loglevel info
if [ ! -f package.json ]; then
wget https://github.com/nhubbard/MagicMirror/archive/v2-beta.zip
unzip v2-beta.zip
cd MagicMirror-2-beta
fi
npm install
echo "We're ready! Run `npm start` from the MagicMirror-2-beta directory (not over SSH) and enjoy MagicMirror2!"