Install
# Note: This package should be installed globally.
$ npm install -g elo-grep
About
This is a command line tool that will help you locate the directory that contains content for a specific Enabling Learning Objective (ELO). In order to search, you must copy the full text of the ELO and paste it at the prompt.
You can also decide how to open the content, whether it be in a text editor or directly on GitHub.
Usage
First ensure you are in the root of the codex, then just run the command elo
as well as any flags to specify how you want it to open. By default it will not open in any program, as you need to set that. There are two ways of doing that.
- Set a
ELO_EDITOR
variable by adding the following line in your.zshrc
or.bashrc
file. (somewhere in your$PATH
). You can chose any editor you have installed.# Set Sublime as Default Editor export ELO_EDITOR='subl'
- Or you can pass in a flag from below for how you want it to open.
-
$ elo -c
will open in Visual Studio Code -
$ elo -ga
will open in BOTH GitHub and Atom
-
Also, you can pass in a custom editor if you'd like. For instance if you wanted to open Emacs and you had the alias emacs
set up, you could do the following.
$ elo -o emacs
If you have the newline_catalog
CLI tool installed, you can also pass in -w
which will start an instance of the watcher, allowing you to preview any file from the ELO directory in your browser.
Once you run the elo
command, you'll be asked for the full text of any ELO. Have that copied and then paste it in and you'll be taken directly to the directory where all that content lives.
At anytime you can run elo -h
to view the help menu and see a current list of all the options:
$ elo -h
Usage: elo [options]
Options:
-h, --help output usage information
-V, --version output the version number
-g, --github Opens ELO on GitHub
-a, --atom Opens ELO in Atom
-s, --sublime Opens ELO in Sublime Text
-c, --code Opens ELO in VS Code
-o, --other <editor> Opens ELO in specified editor
-w, --watch <editor> Starts a Newline Watcher in the proper directory
Note: If you pass in a flag, it will bypass your ELO_EDITOR variable and only open in the flag(s) you passed in.