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

twitch-notifier

v1.1.4

Published

🔔 get email notifications whenever your favorite twitch streamers go live.

Downloads

9

Readme

:trumpet: Overview

Receive an email informing whenever your favorite twitch streamers go live.

I developed this solution because I think twitch way to handle notifications is not so optimized when you follow a lot of streamers, since you have to disable all the ones you don't want to receive notifications, rather than select only the streamers you want to get notified about.

So this tool allows me to disable all twitch notifications and get notified when my favorite streamers (razah and theprimeagen) go live.

:dart: Features

   ✔️ receive an email informing whenever your favorite streamers go live;    ✔️ option set hours to not get notifications, like between 0-6 am;    ✔️ set custom filtering words to ignore: skip notifications when the live title contains the word 'rerun';    ✔️ set custom filtering words to search: get notified only when the live title contains the word 'live'.

:warning: Requirements

The only thing you need to use this project is a gmail/google account.

:bulb: Usage

How it works

It basically sets a function to run in google apps scripts to run everyday at a specified time, and this function is responsable for:

  • visit each of your favorite streamers twitch link and store the information;
  • fitler all the data to only remain the ones you should be notified about, considering your specified options;
  • if there's at least one stream to notify you about, send an email containing the details.

Installation

To effectively use this project, do the following steps:

Updating

To update your twitch-notifier instance and use the latest features, you just need to change the version number in the getTwitchNotifier function, as it is shown bellow:

So if your instance is running at version "1.0.0" and the latest is "3.6.1", just replace those numbers in the version variable.

It is a good practice to go to the dist folder everytime you update your instance to check if your files in GAS have same properties as the new version; if they're not this may cause errors.

Uninstall

If you want to receive the daily emails, just go to the GAS respective project in the header dropdown menu select the uninstall function and then click on the Run button. By doing that, the GAS trigger responsable for running everyday the function will be deleted.

:wrench: Development

Development setup

# Clone this repository
$ git clone https://github.com/lucasvtiradentes/twitch-notifier

# Go into the repository
$ cd twitch-notifier

# Install dependencies
$ npm install

If you want to contribute to the project, fork the project, make the necessary changes, and to test your work you can load your version in apps scripts with almost no effort do this: replace the content of the getTwitchNotifier function with the following code:

function getTwitchNotifier() {
  // const version = "1.1.4" // version
  // const content = getTwitchNotifierProduction(version)
  const content = getTwitchNotifierDevelopment('yourgithub/project-fork', 'develop');
  eval(content);
  const twitchNotifier = new TwitchNotifier(CONFIGS);
  return twitchNotifier;
}

function getTwitchNotifierProduction(version) {
  return UrlFetchApp.fetch(`https://cdn.jsdelivr.net/npm/twitch-notifier@${version}`).getContentText();
}

function getTwitchNotifierDevelopment(repository, branch) {
  const filePath = 'dist/TwitchNotifier.min.js';
  const final_link = `https://api.github.com/repos/${repository}/contents/${filePath}${branch ? `?ref=${branch}` : ''}`;
  const response = UrlFetchApp.fetch(final_link, { method: 'get', contentType: 'application/json' });
  const base64Content = JSON.parse(response.toString()).content;
  const decodedArr = Utilities.base64Decode(base64Content);
  const decodedAsString = Utilities.newBlob(decodedArr).getDataAsString();
  return decodedAsString;
}

This will allow you to select the twitch-notifier source place (github repository or npm package) and specify the intended version.

Used technologies

This project uses the following thechnologies:

:books: About

Related

  • [x] esports-notifier: receive a daily email informing whenever at least one of your favorite esports teams has a match on the current date;
  • [x] gcal-sync: sync your github commits and ticktick tasks to your google calendar and track your work effortlessly;
  • [x] GAS docs: documentation related to triggering functions in Google Apps script.

License

This project is distributed under the terms of the MIT License Version 2.0. A complete version of the license is available in the LICENSE file in this repository. Any contribution made to this project will be licensed under the MIT License Version 2.0.

Feedback

If you have any questions or suggestions you are welcome to discuss it on github issues or, if you prefer, you can reach me in my social media provided bellow.