Check Yo Self CLI

Check Yo Self CLI

  • Introduction
  • API
  • Usage
  • Examples
  • GitHub
  • Blog

›Recent Posts

Recent Posts

  • Retiring Options to Roll Out an MVP
  • Spellcheck Module is a Go
  • Fleshing Out v.0.1

Retiring Options to Roll Out an MVP

September 9, 2018

Tiffany White

Tiffany White

One of the things that is hardest for me is knowing when I should ship something; I will add features and continue to add them and not ship a finished product. The important projects on my GitHub are actively worked on but not finished.

I know I could have had all these things finished in a couple months but instead I added a new feature, or decided I wanted to implement something else. This does not look good for prospective employers, the very people I am trying to show how I work.

Real Artists Ship

So the saying goes.

This means I am going to retire the separate grammar and spelling options in commander and just have a user load the file and have the spelling and grammar checked at the same time.

This Isn't the End of the Different Options, However

I just want to ship something. The more I add features or think about what I want to do or build, the more I become overwhelmed and stop working on things. One thing at a time, an MVP that I can iterate over over time.

Spellcheck Module is a Go

August 15, 2018

Tiffany White

Tiffany White

Thanks to some help from the CodeNewbie Slack, I was able to get some clarification on my gnawing sense that the mess I had in the spellcheck.js module was unnecessary. I didn't really need to create or pass an array into the spell.check() function; I could just pass the input directly into that function.

In the end, I was given a better answer to my suspicion:

const spell = require('spell-checker-js');

module.exports = spellCheck = (input) => {
  spell.load('en');
  return spell.check(input);
};

module.exports.markdown = require('./lib/strip-markdown');

This is just feeding whatever text that is input into the spell checker library.

Another Point

Another thing mentioned was escaping all the markdown characters. I have a library for that from Remark called strip-markdown. Incorporating this bit into the library is straightforward:

const remark = require('remark');
const strip = require('strip-markdown');

remark()
  .use(strip)
  .process('Some _emphasis_, **importance**, and `code`.', function(err, file) {
    if (err) { throw err; }
    console.log(String(file));
  });

This is example code, but you can see that is pretty straightforward: chain some methods onto the remark instance method and go from there. I am still working out how I am going to process some of the text with this but it shouldn't be that hard.

Fleshing Out v.0.1

July 20, 2018

Tiffany White

Tiffany White

Version 0.1 is still being written. I don't have a timeline for its completion. Still learning and reading the docs of the libraries I've used, and reasoning about ways to build this thing with three separate libraries.

Building my first OS command line tool has proven to be fun, difficult, yet satisfying.

I'm basically working with vanilla JS here, and my code looks awful. I'm sure I'm doing something wrong however it's early and I am still building it.

I've got small framework:

commander.js:

#!/usr/bin/env node

const program = require('commander');
program
  .version(package.version)
    .command('check <file ...>')
    .alias('c')
    .description('checkyoself-cli is a grammar and spelling checker for your markdown blog posts.')
    .option('-s --spell <module>',
      'just check the spelling. '
    )
    .option('-g --grammar',
    'just check the grammar'
    )
.program.parse(process.argv);

spellcheck.js:

const spell = require('spell-checker-js');


module.exports = function spellcheck(text) {
  spell.load('en');
  const input = [];
  input.push(text);
  const check = spell.check(input);
  return check;
};

module.exports.markdown = require('./lib/remove-markdown');

The spellcheck.js file was the most straightforward to build however I'm not really sure this is going to work and I have a very minimal sketch of the tool itself.

An interesting conundrum, when all your fundamentals go out the window.

But doing a bit of Google never hurts anyone. So thus, I continue.

Check Yo Self CLI
Docs
Getting Started (or other categories)Guides (or other categories)API Reference (or other categories)
More
BlogGitHub
Copyright © 2018 Tiffany White