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

oscscheduler

v0.0.4

Published

Sends osc actions on a schedule. Used to create a daily repeating show (eg. Christmas Lights Display)

Downloads

11

Readme

oscscheduler works by reading a schedule file written in json. This file specifies a start time and end time for the show which will be run each day.

The show itself is a series of osc actions that will be run in a loop until then end time.

'Usage'

var ShowScheduler = require("./lib/showScheduler");

//Load Show File
var show = require("./show.json");  // The Show File to Load - More details below


//set up show
var thisSchedule = new ShowScheduler(show);



thisSchedule.on("beforeStart", function(){
 	//If there are things that need be done before the show starts
	
})



thisSchedule.on("afterEnd", function(){
	

})

var currentTime = new Date();
currentTime.setHours(19, 59, 55, 0)
//Schedule the show to start - Optionally pass the current time for testing purposes

//This line schedules the show to start
thisSchedule.activate(currentTime);

`Format for Show File' - Comments are Not Allowed in Real JSON File show.json

{
	"servers" : { //One or more Servers
		"Server1" : {
			"Host" : "127.0.0.1",
			"Port" : 9876
		}
	},
	"startTime": "20:00", //Time to start the show
	"endTime": "20:01", //Time to end the show
	"length" : 30,  //Length of the show before it loops
	"schedule" : [ // The groups of commands to run 
		{"start": 10, "commands": [ //start is the number of seconds from the beginning of the loop
			{"server": "Server1", "action": "/CURRENT_VISUAL", "parameter": 0},
			{"server": "Server1", "action": "/CHANGE_GENERATOR_A", "parameter": 4},
			{"server": "PixelController", "action": "/CHANGE_ALL_OUTPUT_VISUAL", "parameter": 0}
		]},
		{"start": 20, "commands": [
			{"server": "PixelController", "action": "/CURRENT_VISUAL", "parameter": 1},
			{"server": "PixelController", "action": "/CHANGE_GENERATOR_A", "parameter": 2},
			{"server": "PixelController", "action": "/CHANGE_ALL_OUTPUT_VISUAL", "parameter": 1}
		]}
	],
	"onShowEnd" : {"commands":[ //This runs at the end Time to clean up the show
		{"server": "PixelController", "action": "/CURRENT_VISUAL", "parameter": 0},
		{"server": "PixelController", "action": "/CHANGE_GENERATOR_A", "parameter": 0},
		{"server": "PixelController", "action": "/CURRENT_COLORSET", "parameter": 1},
		{"server": "PixelController", "action": "/CHANGE_ALL_OUTPUT_VISUAL", "parameter": 0}
	]}

}