diff --git a/INSTALL.md b/INSTALL.md index 45a5e85..4f81293 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -6,7 +6,7 @@ cd ~/MagicMirror/modules git clone https://github.com/hermanho/MMM-OneDrive cd MMM-OneDrive - npm install + npm run install-prod ``` If you are using Docker @@ -14,7 +14,7 @@ ```sh cd ~/MagicMirror/modules git clone https://github.com/hermanho/MMM-OneDrive - docker exec -it -w /opt/magic_mirror/module MMM-OneDrive magic_mirror npm install + docker exec -it -w /opt/magic_mirror/modules/MMM-OneDrive magic_mirror npm run install-prod ``` 1. Add MMM-OneDrive module config in ~/MagicMirror/config/config.js @@ -32,7 +32,9 @@ 1. At first execution, It will open a browser and will ask you to login Microsoft account. 1. Authorize it and close the browser when done +
+
### Sperated machine (When the device does not have Desktop UI) @@ -47,6 +49,9 @@ 1. At first execution, It will open a browser and will ask you to login Microsoft account. 1. Authorize it and close the browser when done +
+
+ 1. Copy the file `msal/token.json` to the folder `MMM-OneDrive` in the remote device diff --git a/README.md b/README.md index b67b03f..1c3fcd5 100644 --- a/README.md +++ b/README.md @@ -19,23 +19,23 @@ Display your photos from album of OneDrive on [MagicMirror²](https://github.com module: "MMM-OneDrive", position: "top_right", config: { - albums: [], // Set your album name. like ["My wedding", "family share", "Travle to Paris"] - updateInterval: 1000 * 60, // minimum 10 seconds. - sort: "new", // "old", "random" - condition: { - fromDate: null, // Or "2018-03", RFC ... format available - toDate: null, // Or "2019-12-25", - minWidth: null, // Or 400 - maxWidth: null, // Or 8000 - minHeight: null, // Or 400 - maxHeight: null, // Or 8000 - minWHRatio: null, - maxWHRatio: null, - // WHRatio = Width/Height ratio ( ==1 : Squared Photo, < 1 : Portraited Photo, > 1 : Landscaped Photo) - }, - showWidth: 1080, // These values will be used for quality of downloaded photos to show. real size to show in your MagicMirror region is recommended. - showHeight: 1920, - timeFormat: "YYYY/MM/DD HH:mm", // Or `relative` can be used. + albums: [], // Set your album name. like ["My wedding", "family share", "Travle to Paris"] + updateInterval: 1000 * 60, // minimum 10 seconds. + sort: "new", // "old", "random" + condition: { + fromDate: null, // Or "2018-03", RFC ... format available + toDate: null, // Or "2019-12-25", + minWidth: null, // Or 400 + maxWidth: null, // Or 8000 + minHeight: null, // Or 400 + maxHeight: null, // Or 8000 + minWHRatio: null, + maxWHRatio: null, + // WHRatio = Width/Height ratio ( ==1 : Squared Photo, < 1 : Portraited Photo, > 1 : Landscaped Photo) + }, + showWidth: 1080, // These values will be used for quality of downloaded photos to show. real size to show in your MagicMirror region is recommended. + showHeight: 1920, + timeFormat: "YYYY/MM/DD HH:mm", // Or `relative` can be used. } }, ``` @@ -74,9 +74,9 @@ albums: ["My wedding", "family share", "Travle to Paris", "from Tom"], ```js condition: { - fromDate: "2018-01-01", // I don't want older photos than this. - minWidth: 600, // I don't want to display some icons or meme-pictures from my garbage collecting albums. - maxWHRatio: 1, // I want to display photos which are portrait. + fromDate: "2018-01-01", // I don't want older photos than this. + minWidth: 600, // I don't want to display some icons or meme-pictures from my garbage collecting albums. + maxWHRatio: 1, // I want to display photos which are portrait. } ``` @@ -96,8 +96,8 @@ condition: { - For preventing LCD burning, Photo info can be relocated by condition. - `true` : automatically change position to each corner per 15 minutes. - - `false` : not using. - - callbackfunction (album, photo) : User can make his own position. It should return `[top, left, bottom, right]` + - `false` : not using. + - callbackfunction (album, photo) : User can make his own position. It should return `[top, left, bottom, right]` ```js autoInfoPosition: true, // or false @@ -115,7 +115,7 @@ autoInfoPosition: (album, photo)=> { ```css #ONEDRIVE_PHOTO_INFO { - display:none; + display: none; } ``` @@ -134,7 +134,7 @@ autoInfoPosition: (album, photo)=> { ```css #ONEDRIVE_PHOTO_BACK { - display:none; + display: none; } ``` @@ -142,7 +142,7 @@ autoInfoPosition: (album, photo)=> { ```css #ONEDRIVE_PHOTO_CURRENT { - background-size:cover; + background-size: cover; } ``` @@ -150,7 +150,7 @@ autoInfoPosition: (album, photo)=> { ```css #ONEDRIVE_PHOTO_CURRENT { - background-size:contain; + background-size: contain; } ``` @@ -159,7 +159,7 @@ autoInfoPosition: (album, photo)=> { ```css .clock { padding: 10px; - background-color: rgba(0, 0, 0, 0.5); + background-color: rgba(0, 0, 0, 0.5); } ``` @@ -184,5 +184,5 @@ autoInfoPosition: (album, photo)=> { ## Last Tested -- MagicMirror : v2.24.0 -- node.js : required over v16. +- MagicMirror : v2.26.0 +- node.js : required over v18. diff --git a/package.json b/package.json index 7cef044..95cccf0 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,9 @@ "description": "MagicMirror² module to display your photos from OneDrive.", "license": "MIT", "author": "hermanho", + "contributors": [ + "https://github.com/hermanho/MMM-OneDrive/graphs/contributors" + ], "scripts": { "install-prod": "npm install --no-audit --no-fund --no-update-notifier --only=prod --omit=dev", "lint:js": "eslint . --fix" @@ -31,4 +34,4 @@ "engines": { "node": ">=18" } -} +} \ No newline at end of file