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

rgsms

v0.0.4

Published

CLI application for sending sms through Google calendar.

Downloads

3

Readme

RGSMS

Description

Simple tool to send SMS through the Google Calendar.

Installation

Local installation:

npm install rgsms

To get access for the CLI tool, install global version:

npm install -g rgsms

Google calendar and service account setup

Service account

Go to Google developer console First make sure you have turned on the "calendar API".

Next create "Service account" and download the public/private key pair also get the service account email address which used later for authentication.

Currently Node can not read the pub/priv key pair so extract the key with OpenSSL.

openssl pkcs12 -in ~/path/to-key.p12 -out ~/key.pem -nocerts

Now we should have the key file and email for authentication.

Google calendar setup

Create a new calendar, choose the name carefully as it will be displayed partly in the SMS title. Go to the "Remainders and notifications" settings and make sure you have verified your phone number so you can accept SMS.

Different ways to send the SMS, you can set the event remainder so it will send SMS before 1 minute. The second possible use case is to send the remainder as the event is created.

API usage

var SERVICE_EMAIL = '[email protected]';
var KEY_FILE = './key.pem';

var GCal = require('rgsms'),
    g = new GCal(SERVICE_EMAIL, KEY_FILE);

g.getClient(function (err, client) {

    // Get back the client instance
});

g.listCalendars(function (err, res) {

    // List the calendars without printing any data
});

g.listCalendarsFormat(function (err, res) {

    // Get the calendar array with printing operation
});

g.createEventFormat('[email protected]', { summary: "Change name" }, function (err, res) {

    // Get the event result with formated result
});

CLI usage

rgsms create -k ./key.pem -e [email protected] -i [email protected] -u www.neti.ee
status=200 summary="SMS title" description="Description" start=2014-06-14T10:54:31+03:00 end=2014-06-14T10:54:31+03:00

Set the start and end time:

rgsms create -k ./key.pem -e [email protected] -i [email protected] -S "2014-06-14T19:15:42.752Z" -E "2014-06-14T19:20:42.752Z"
status=200 summary="SMS title" description="Description" start=2014-06-14T22:15:42+03:00 end=2014-06-14T22:20:42+03:00

Using the evn variables:

export [email protected]
export KEY_FILE=/home/risto/Dropbox/rgsms/key.pem
export [email protected]

rgsms create -s "This is the first other message"

License

GPL