Skip to content

Using Google Task Base to make Google Keep API Friendly

Notifications You must be signed in to change notification settings

KoboseHome/MMM-GoogleKeepAI

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MMM-GoogleKeepAI

Module for the MagicMirror² smart mirror.

Displays notes from Google Keep.

Example

Example of MMM-GoogleKeepAI

Dependencies

  1. The Google Node.js client library: For authentication and Google Keep API (v1). See Installation for instructions

Installation

To install the module, use your terminal to:

  1. Navigate to your MagicMirror's modules folder. If you are using the default installation directory, use the command:
    cd ~/MagicMirror/modules
  2. Clone the module:
    git clone https://github.com/KoboseHome/MMM-GoogleKeepAI.git
  3. Install Google API:
    npm install googleapis

Authentication Setup

Google Keep API requires an authenticated OAuth2 client:

  1. Go here, and click "Enable the Google Keep API" button. Follow the steps to download the credentials.json file.
  2. Move credentials.json to your MMM-GoogleKeepAI directory (MagicMirror/modules/MMM-GoogleKeepAI/)
  3. Enable Google Keep API. Select the same project as in step 1.
  4. Run authenticate.js:
    node authenticate.js
  5. Follow the instructions and it should print your notes. Copy the ID of the list you want to the config listID

Using the module

MagicMirror² Configuration

To use this module, add the following configuration block to the modules array in the config/config.js file:

var config = {
    modules: [
        ...
        {
            module: 'MMM-GoogleKeepAI',
            header: "Google Keep",
            position: "top_right",
            config: {
                listID: "",
                maxResults: 10,
                dateFormat: "MMM Do",
                updateInterval: 10000,
                animationSpeed: 2000,
                tableClass: "small",
            }
        },
        ...
    ]
}

Configuration Options

Option Details
listID Required - List ID printed from authenticate.js (see installation)
maxResults Optional - Max number of list items to retrieve.

Possible values: 0 - 100
Default value: 10
showCompleted Optional - Show completed task items

Possible values: true false
Default value: false
dateFormat Optional - Format to use for due date

Possible values: See Moment.js formats
Default value: MMM Do (e.g. Jan 18th)
updateInterval Optional - Interval at which content updates (Milliseconds)

Possible values: 2000 - 86400000 (Tasks API has default maximum of 50,000 calls per day.)
Default value: 10000 (10 seconds)
animationSpeed Speed of the update animation. (Milliseconds)

Possible values: 0 - 5000
Default value: 2000 (2 seconds)
tableClass Name of the classes issued from main.css.

Possible values: xsmall, small, medium, large, xlarge.
Default value: small

About

Using Google Task Base to make Google Keep API Friendly

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 87.2%
  • CSS 12.8%