This is a module for the MagicMirror².
This module provides an internal iCalendar feed of a Notion database that can be used in the MagicMirror² Calendar module.
Notion events displayed in the MagicMirror² Calendar module.
In ~/MagicMirror/modules
git clone https://github.com/JHWelch/MMM-NotionCalendar.git
npm install --omit=dev- Open Notion Integrations
- Click "New Integration"
- Fill out Details
- Name: Anything (MMM)
- Associated workspace: Pick target workspace
- Type: Internal
- Click Save
- Click "Configure integration settings"
- Copy "Internal Integration secret" for use in config (
notionToken) - Set "Capabilities" this app only requires
- Content Capabilities: Read Content
- User Capabilities: Read user information without email address
- In "Access" tab edit access and select your database.
- Open the page of your database.
- Open the table menu and select "Manage Data Sources"
- Select the desired data source and "Copy data source ID"
- Save for use in url (
dataSourceId)
Add the following to the modules array in config/config.js. It does not require any configuration options or position. Config options will be passed in the URL of the calendar feed.
{
module: 'MMM-NotionCalendar',
}Add the following to the calendars array in the configuration of the default calendar module.
{
url: 'http://localhost:8080/MMM-NotionCalendar.ics?notionToken=YOUR_NOTION_TOKEN&dataSourceId=YOUR_DATA_SOURCE_ID',
}To easily obtain a URL with the correct parameters, as well as adding additional options, there is a helper tool to generate URLs.
Did you know MagicMirror² has a built-in module updater? Read more about it here.
Add the following to your updates array of updatenotification in config/config.js
{ 'MMM-NotionCalendar': 'git pull && npm install --omit=dev' },In ~/MagicMirror/modules/MMM-NotionCalendar
git pull
npm install --omit=devInstall dev dependencies
npm installThere is a test suite using Jest.
node --run testThere is linting using ESLint
# Run linting
node --run lint
# Fix linting errors
node --run fix