README
gimme-dat
Manage common text snippets via the command line
Background
gimme-dat
is a command-line tool for managing text snippets. It is heavily inspired by boom
, but focuses on rendering Handlebars templates to generate complex, commonly used text snippets.
Example
I find myself writing similar Markdown links for pull requests most days at work:
[JIRA-123](https://mysite.jira.com/JIRA-123)
gimme-dat
prevents repeating this process by creating a template:
$ gimme-dat set jira-link '[JIRA-{{0}}](https://mysite.jira.com/JIRA-{{0}})'
Where {{0}}
represents the JIRA ticket number I want to reference.
$ gimme-dat jira-link 123
Now [JIRA-123](https://mysite.jira.com/JIRA-123)
is copied to my clipboard, and I'm ready to paste to my heart's content. :heart:
Installation
$ npm install -g gimme-dat
Usage
gimme-dat set google https://google.com Sets google to https://google.com
gimme-dat google Copies https://google.com to the clipboard
gimme-dat set github https://github.com/{{0}}/{{1}} Sets github to a Handlebars indexed template
gimme-dat github nodejs node Renders Handlebars template with supplied args into https://github.com/nodejs/node
gimme-dat set github https://github.com/{{org}}/{{repo}} Sets github to a Handlebars named template
gimme-dat github "{org: 'nodejs', repo: 'node'}" Renders Handlebars template with named CSON/JSON args into https://github.com/nodejs/node
gimme-dat --open github nodejs node Opens https://github.com/nodejs/node in the default web browser
gimme-dat --print github nodejs node Prints https://github.com/nodejs/node to the terminal
gimme-dat delete github Deletes github key-value pair
gimme-dat list Lists all stored key-value pairs
Development
Hack around and run the tests.
$ npm test
Grunt commands:
# watches for file changes and reruns tests each time
$ grunt watch
# compiles to JavaScript for distribution
$ grunt build
# runs the tests
$ grunt test
# produces coverage report (needs explicit piping)
$ grunt cov
License
Copyright 2015 Macklin Underdown
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.