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

nightscout-ps1

v3.1.2

Published

Syncs the latest blood glucose reading from Nightscout to an eval file

Downloads

8

Readme

nightscout-ps1

Build Status

Syncs the latest two entries from Nightscout to a file the can be consumed by your command line prompt (a.k.a. $PS1).

Installation

Preferred installation is by downloading a pre-compiled binary for your platform:

If there is no binary for your platform, or you would simply like to install from source, you may install from the npm registry:

$ npm install -g nightscout-ps1

Usage

The flags for usage of nightscout-ps1 are listed here, however it is highly recommended that you set up the daemon as a "service" for your operating system.

$ nightscout-ps1 -n <Nightscout URL> -c ~/.nightscout-ps1.env

| Flag | Description | |---------------------|----------------------------------------------------------------------| | --cache-file/-c | Path to write the latest reading file.Must end in .env or .json, and may be specified more than once.Defaults to ~/.nightscout-ps1.env. | | --nightscout/-n | URL of your Nightscout deployment. |

Setup on macOS

cp service/io.n8.nightscout-ps1.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/io.n8.nightscout-ps1.plist

Then see Configuring your PS1 below.

Setup on Linux

cp service/nightscout-ps1.service /etc/systemd/system/
sudo systemd start nightscout-ps1
sudo systemd enable nightscout-ps1

Then see Configuring your PS1 below.

Setup on Windows

Check out this blog post by Scott Hanselman to setup as a Windows Service:

Visualizing your real-time blood sugar values AND a Git Prompt on Windows PowerShell and Linux Bash

Configuring your PS1

First, install import.

Second, add the following to your .bashrc file:

. "$(which import)"
import "tootallnate/[email protected]"

export PS1="\$(nightscout_ps1) \$ "

Be sure to add further customizations to your PS1 to your liking!

Formats

The --cache-file/-c flag determines how to format the output file based on the file extension. These are the supported format types:

.env

Formatted with key=value pairs that may be source or eval'd in a shell script (i.e. your .bashrc file). Example.

.json

Formatted as a JSON file, which may consumed by jq or other related tools. Example.