nsnipt

0.1.0 • Public • Published

nsnipt

At its core, nsnipt is a Node CLI that interacts with Snipt.net. Currently however it only supports one operation; saving your snipts (code snippets) as text files in a location of your choosing.

I created nsnipt simply because I wanted a way to easily export my snipts for backup (and because I wanted to try writing a nodejs command-line app). As I or others find need I will definitely expand the functionality.

Command Line Options and Persistent Config

To use this client you'll need to provide two required pieces of information:

  1. Your Snipt username
  2. Your Snipt API key

These can be found in your Snipt.net account information.

You can set all options in a couple different ways.

Setting Options via the Command Line

All options can be set via command line options; for example:

nsnipt backup -u hereiznoy -a 123456ABCDEFG -d /some/where

Setting Options via the Config File

If you want to store your options (which you most likely will) you can do so by putting a config.json file in the config directory of your nsnipt install. Your config file should look something like this:

{
	"username": "hereiznoy",
	"apiKey": "123456ABCDEFG",
	"backup": {
		"backupDir": "/some/where"
	}
}

Notice the backupDir option is contained inside the backup JSON object; that is because it's an option specific to the backup command.

Default Options

If you do not set the required options via command line args or the config file, the client will not run.

Any optional options can be left off (such as the -d backup directory location option), in which case default values will be used (look at the config/config.js source file if you want to know what the defaults are).

Installation

npm install -g nsnipt

Running

Again, currently the only operational command the client supports is backup.

nsnipt backup -d /path/to/backup/dir

To get help:

nsnipt -h

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    2

Package Sidebar

Install

npm i nsnipt

Weekly Downloads

2

Version

0.1.0

License

none

Last publish

Collaborators

  • hereiznoy