npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

agenda-paper

v1.1.3

Published

Show your daily agenda on an ePaper display

Downloads

18

Readme

About this project

This project allows you to set up an ePaper display on your desktop, which shows the next couple of meetings from your calendar. It uses hardware you can simply purchase on Amazon - an ePaper display and a Raspberry Pi Zero - and optionally a 3D printed case. Software wise, it uses ePaper.js as the framework for printing on the ePaper display, Create React App and express.js.

image

Getting started

Get the hardware

  • Waveshare 7.5" ePaper display - Amazon
  • Raspberry Pi Zero WH - Amazon
  • Raspberry Pi Power Supply - Amazon
  • 16GB MicroSD card - Amazon
  • 7.5" enclosure (optional) - Amazon - in case you can't 3D print a proper enclosure

If you have access to a 3D printer, I used this awesome design as an enclosure.

Create a GCP app

In order to be able to login to your Google calendar, you will need to set up an app on Google Cloud Console.

Steps:

  1. Set up a new project under Google Cloud Console.
  2. Enable the Google Calendar API for your newly created project.
  3. Create new credentials for your project:
    1. Goto the credentials page and click on the "Create credentials" button
    2. Choose the OAuth Client ID option
    3. Choose Web application for application type
    4. Add http://localhost:3000 under "Authorized JavaScript origins" and http://localhost:3000/api/auth/login/callback under "Authorized redirect URIs", click save
    5. Copy the created Client ID and Client Secret, you will need them later
  4. Update the OAuth Consent screen:
    1. Go to the OAuth consent screen setup page
    2. Give your app a name and provide your email (not that important since you will be the only one using this app), click Save and Continue
    3. Click the "Add or remove scopes" button and select the calendar.events.readonly scope, click Save and Continue
    4. Save your app

Install Raspberry Pi Operating System (with desktop)

  • use Raspberry Pi Imager
  • finish installation on the desktop and connect to wifi
  • optionally enable SSH

Setup Agenda Paper on your Raspberry Pi

Install NVM

wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

Install node lts See here: https://dev.to/patrickweaver/installing-node-12-and-higher-on-a-raspberry-pi-zero-with-nvm-4dnj

NVM_NODEJS_ORG_MIRROR=https://unofficial-builds.nodejs.org/download/release nvm install 14

check node version

node -v
v14.18.1

Enable SPI

sudo raspi-config
# Choose Interfacing Options -> SPI -> Yes  to enable SPI interface
sudo reboot

Install dependencies

sudo apt-get update

# Install wiringpi
sudo apt-get install -y wiringpi

# For Pi 4, you need to update wiringpi (skip otherwise):
cd /tmp
wget https://project-downloads.drogon.net/wiringpi-latest.deb
sudo dpkg -i wiringpi-latest.deb
#You will get 2.52 information if you've installed it correctly
gpio -v

# Remaining dependencies
sudo apt-get install -y build-essential chromium-browser

Install Agenda Paper globally

npm i -g agenda-paper

Create environment config file

Create a config directory called .agenda-paper under your home folder

mkdir ~/.agenda-home

Create an .env file under the config directory and add the GCP app credentials

echo "GOOGLE_CLIENT_ID=<enter your app's client ID>" >> ~/.agenda-paper/.env
echo "GOOGLE_CLIENT_SECRET=<enter your app's client secret>" >> ~/.agenda-paper/.env

# this is optional, in case you want to use another display supported by ePaper.js
echo "EPAPER_DEVICE_TYPE=<device_type_id>" >> ~/.agenda-paper/.env

Run Agenda-Paper

On your raspberry pi terminal (or SSH), run agenda-paper

agenda-paper

You should be seeing a prompt on your ePaper display to set up your account. Follow the instructions to set everything up. Eventually, you should be seeing your agenda on the display.

Running Agenda-Paper on system startup

First, let's install pm2 globally.

npm i -g pm2

Now, let's run setup pm2 on system startup:

pm2 startup

Run the command shown in the output - should be something along these lines:

sudo env PATH=$PATH:/home/pi/.nvm/versions/node/<version>/bin /home/pi/.nvm/versions/node/<version>/lib/node_modules/pm2/bin/pm2 startup systemd -u pi --hp /home/pi

Now, let's run agenda-paper using pm2

pm2 start agenda-paper

Finally, let's persist agenda-paper on pm2 app list

pm2 save

If everything goes well, agenda-paper should be started automatically on system startup

To check the app logs under pm2, use the following command:

pm2 logs