added all files to project

This commit is contained in:
2022-03-10 10:36:59 +01:00
parent 09dd957b33
commit 46a936d7de
25351 changed files with 3883356 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017 Mykle
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+15
View File
@@ -0,0 +1,15 @@
/* Copy and paste any or all of these css entries into your custom.css file inside your
* css folder. The functions are annotated to make things as easy as possible for you.
*
* Using this you can size and move your picture precisely in all directions
* You can even use a direct internet url to an image
*/
.MMM-EasyPix .photo {
margin-right: -1px; /* Move your picture using these */
margin-left: -1px; /* Move your picture using these */
margin-top: -1px; /* Move your picture using these */
margin-bottom: -1px; /* Move your picture using these */
float: center; /* Left, center or right */
}
+92
View File
@@ -0,0 +1,92 @@
/* Magic Mirror
* Module: MMM-EasyPix
*
* By Mykle1
* MIT Licensed.
*/
Module.register("MMM-EasyPix", {
defaults: {
picName: "face.gif", // .jpg, .gif, .png, etc.. (animated gif's too!)
maxWidth: "100%", // your picture files go in "pix" folder of module
sounds: ["1.mp3", "me2.mp3"], // mp3 sound file names in quotes seperated by commas
updateInterval: 30 * 60 * 1000, // updates display
animationSpeed: 3000,
},
start: function() {
var self = this;
this.url = '';
// ADDED: Schedule update timer courtesy of ninjabreadman
var self = this;
setInterval(function() {
self.updateDom(self.config.animationSpeed || 0); // use config.animationSpeed or revert to zero @ninjabreadman
}, this.config.updateInterval);
},
getStyles: function() {
return ["MMM-EasyPix.css"]
},
// Override dom generator.
getDom: function() {
var wrapper = document.createElement("div");
var image = document.createElement("img");
image.src = '/modules/MMM-EasyPix/pix/' + this.config.picName + "?seed=" + new Date();
image.className = "photo";
image.style.maxWidth = this.config.maxWidth;
wrapper.appendChild(image);
return wrapper;
},
random_imglink: function (){
var myimages = new Array()
var myimages = '/modules/MMM-EasyPix/pix/';
var ry = Math.floor(Math.random()*'/modules/MMM-EasyPix/pix/'.length)
if (ry==0) {
ry=1;
}
document.write('<img src="'+myimages[ry]+'" border=0>');
return random_imglink;
},
///// Add this function to the modules you want to control with voice //////
///// Must be the same as in "sentences" array in MMM-voice.js /////
///// Replace sound file with your own greeting /////
notificationReceived: function(notification, payload) {
if (notification === 'HIDE_LUCY') {
this.hide(500);
} else if (notification === 'SHOW_LUCY') {
this.show(1000);
}
if (notification === 'HELLO_THERE_LUCY') {
var sound = new Audio();
sound.src = 'modules/MMM-EasyPix/hello.mp3';
sound.play();
}
///////// So you don't hear the same greeting every time /////////////////////////
////////// Randomized sound files courtesy of @ Cowboysdude ////////////////////////
if (notification === 'SHOW_LUCY') {
var audio_files = this.config.sounds;
var random_file = audio_files[Math.floor(Math.random() * audio_files.length)];
var audio = new Audio(random_file);
audio.src = 'modules/MMM-EasyPix/sounds/'+random_file;
audio.play();
}
},
});
+39
View File
@@ -0,0 +1,39 @@
## MMM-EasyPix
The easiest way to show pictures onto your mirror.
.jpg files, .png files, .gif files, etc.. (Even animated gif's work)
## Where your picture files go
* Your picture files go in the "pix" folder inside the MMM-EasyPix module folder.
## Works with Hello-Lucy voice enhancement (required for sound)
## Installation
* `git clone https://github.com/mykle1/MMM-EasyPix` into the `~/MagicMirror/modules` directory.
* Annotated .css file included for exact positioning.
## Config.js entry and options
{
module: "MMM-EasyPix",
position: "top_center",
config: {
picName: "18.jpg", // Enter the picture file name.
maxWidth: "75%", // Size picture precisely. Retains aspect ratio.
sounds: ["1.mp3", "me2.mp3"], // mp3 sound file names in quotes seperated by commas for Hello-Lucy
updateInterval: 30 * 60 * 1000, // updates display
animationSpeed: 3000,
}
},
## How to use it multiple times!
* Simply make multiple entries in your config and name a different picture.
## Remember
* All picture files go in the "pix" folder inside the MMM-EasyPix module folder.
Binary file not shown.

After

Width:  |  Height:  |  Size: 263 KiB

@@ -0,0 +1,4 @@
Alternative pictures for use with Hello-Lucy.
Pi users should use static pictures, or small sized gifs.
Pi users can try eyes.gif or 2.gif
Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB