{"id":20986256,"url":"https://github.com/hermanho/mmm-onedrive","last_synced_at":"2025-05-14T17:32:47.105Z","repository":{"id":216587587,"uuid":"741716677","full_name":"hermanho/MMM-OneDrive","owner":"hermanho","description":"Display your photos on MagicMirror from Microsoft OneDrive.","archived":false,"fork":false,"pushed_at":"2024-11-13T01:28:17.000Z","size":3399,"stargazers_count":4,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-13T02:26:09.645Z","etag":null,"topics":["javascript","magicmirror","magicmirror2","nodejs","onedrive","photos","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hermanho.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-11T00:55:04.000Z","updated_at":"2024-10-09T00:14:45.000Z","dependencies_parsed_at":"2024-06-16T02:51:27.712Z","dependency_job_id":"c68a2eb9-8f15-4682-b17b-55e8f1c168eb","html_url":"https://github.com/hermanho/MMM-OneDrive","commit_stats":null,"previous_names":["hermanho/mmm-onedrive"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hermanho%2FMMM-OneDrive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hermanho%2FMMM-OneDrive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hermanho%2FMMM-OneDrive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hermanho%2FMMM-OneDrive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hermanho","download_url":"https://codeload.github.com/hermanho/MMM-OneDrive/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225304024,"owners_count":17453037,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","magicmirror","magicmirror2","nodejs","onedrive","photos","raspberry-pi"],"created_at":"2024-11-19T06:12:52.119Z","updated_at":"2025-05-14T17:32:47.099Z","avatar_url":"https://github.com/hermanho.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MMM-OneDrive\n\nDisplay your photos from album of OneDrive on [MagicMirror²](https://github.com/MagicMirrorOrg/MagicMirror). Inspired by [MMM-GooglePhotos](https://github.com/hermanho/MMM-GooglePhotos).\n\n## Screenshot\n\n![screenshot](images/screenshot.jpg)\n\n## Installation \u0026 Upgrade\n\n[INSTALL.md](INSTALL.md)\n\n## Configuration\n\n```javascript\n{\n  module: \"MMM-OneDrive\",\n  position: \"top_right\",\n  config: {\n    albums: [], // Set your album name. like [\"My wedding\", \"family share\", \"Travle to Paris\"]\n    updateInterval: 1000 * 60, // minimum 10 seconds.\n    sort: \"new\", // \"old\", \"random\"\n    condition: {\n      fromDate: null, // Or \"2018-03\", RFC ... format available\n      toDate: null, // Or \"2019-12-25\",\n      minWidth: null, // Or 400\n      maxWidth: null, // Or 8000\n      minHeight: null, // Or 400\n      maxHeight: null, // Or 8000\n      minWHRatio: null,\n      maxWHRatio: null,\n      // WHRatio = Width/Height ratio ( ==1 : Squared Photo,   \u003c 1 : Portraited Photo, \u003e 1 : Landscaped Photo)\n    },\n    showWidth: 1080, // These values will be used for quality of downloaded photos to show. real size to show in your MagicMirror region is recommended.\n    showHeight: 1920,\n    timeFormat: \"YYYY/MM/DD HH:mm\", // Or `relative` can be used.\n    forceAuthInteractive: false, // Force interactive authorization\n  }\n},\n```\n\n## Usage\n\n### `albums`\n\nNow this module can access not only your owns but also shared. You can specify album title like this.\n\n```js\nalbums: [\"My wedding\", \"family share\", \"Travle to Paris\", \"from Tom\"],\n```\n\n- Caution. Too many albums and photos could make long bootup delay.\n- Remember this. You can only show max 8640 photos in a day. Manage your album what to show, it will make better performance.\n\n### `updateInterval`\n\n- Minimum `updateInterval` is 10 seconds. Too often update could makes API quota drains or network burden.\n\n### `sort`\n\n- `new`, `old`, `random` are supported.\n\n### `condition`\n\n- You can filter photos by this object.\n- `fromDate` : If set, The photos which was created after this value will be loaded. (e.g: `fromDate:\"2015-12-25\"` or `fromDate:\"6 Mar 17 21:22 UT\"`)\n- `toDate` : If set, The photos which was created before this value will be loaded. (e.g: `toDate:\"Mon 06 Mar 2017 21:22:23 z\"` or `toDate:\"20130208\"`)\n- ISO 8601 and RFC 2822 is supported for `fromDate` and `toDate`.\n- `minWidth`, `maxWidth`, `minHeight`, `maxHeight` : If set, the photos have these value as original dimensiont will be loaded. You can use these values to avoid too big or too small pictures(like icons)\n- `minWHRatio`, `maxWHRatio` : With these values, you can get only portrait photos(or landscaped, or squared)\n- **WHRatio** is `width / height`. So `=1` will be squared dimension. `\u003e1` will be landscaped. `\u003c1` will be portrait.\n- Example:\n\n```js\ncondition: {\n  fromDate: \"2018-01-01\", // I don't want older photos than this.\n  minWidth: 600, // I don't want to display some icons or meme-pictures from my garbage collecting albums.\n  maxWHRatio: 1, // I want to display photos which are portrait.\n}\n```\n\n### `showWidth`, `showHeight`\n\n- Specify your real resolution to show.\n\n### `timeFormat`\n\n- Specify time format for photo info. You can also use `relative` to show more humanized.\n\n### `debug`\n\n- If set, more detailed info will be logged.\n\n### `autoInfoPosition`\n\n- For preventing LCD burning, Photo info can be relocated by condition.\n  - `true` : automatically change position to each corner per 15 minutes.\n  - `false` : not using.\n  - callbackfunction (album, photo) : User can make his own position. It should return `[top, left, bottom, right]`\n\n```js\nautoInfoPosition: true, // or false\n\n// User custom callback\nautoInfoPosition: (album, photo)=\u003e {\n return ['10px', '10px', 'none', 'none'] // This will show photo info top-left corner.\n}\n\n```\n\n## Tip\n\n- Not to show photo info : Add this into your `css/custom.css`.\n\n```css\n#ONEDRIVE_PHOTO_INFO {\n  display: none;\n}\n```\n\n- To move photo info to other position (e.g: top-left corner): Add this into your `css/custom.css`.\n\n```css\n#ONEDRIVE_PHOTO_INFO {\n  top: 10px;\n  left: 10px;\n  bottom: inherit;\n  right: inherit;\n}\n```\n\n- Not to show blurred Background : Add this into your `css/custom.css`.\n\n```css\n#ONEDRIVE_PHOTO_BACK {\n  display: none;\n}\n```\n\n- To cover whole region with image : Add this into your `css/custom.css`.\n\n```css\n#ONEDRIVE_PHOTO_CURRENT {\n  background-size: cover;\n}\n```\n\n- To shrink image and be fully visible on smaller screens : Add this into your `css/custom.css`.\n\n```css\n#ONEDRIVE_PHOTO_CURRENT {\n  background-size: contain;\n}\n```\n\n- To display `clock` more clearly on showing in `fullscreen_below` : Add this into your `css/custom.css`.\n\n```css\n.clock {\n  padding: 10px;\n  background-color: rgba(0, 0, 0, 0.5);\n}\n```\n\n- To give opacity to photos:\n\n```CSS\n@keyframes trans {\n  from {opacity: 0}\n  to {opacity: 0.5}\n}\n#ONEDRIVE_PHOTO_CURRENT {\n  background-size:cover;\n  opacity:0.5;\n}\n```\n\n## Notice\n\n- First scanning will take a few (~dozens) seconds. Don't panic.\n- If there are 1000s of photos, this scan could take minutes(over 10). longer scans increase the probablity of an error happening. If a single error happens in the scan, it will retry after 1 hour. After first successful scan, subsequent startups should go very quickly(seconds).\n-\n\n## Last Tested\n\n- MagicMirror : v2.26.0\n- node.js : required over v18.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhermanho%2Fmmm-onedrive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhermanho%2Fmmm-onedrive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhermanho%2Fmmm-onedrive/lists"}