Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 1.06 KB

readme.md

File metadata and controls

31 lines (22 loc) · 1.06 KB

SnipShot

A CLI app to replace markdown code snippets with screenshots

CLI Usage

Note: Requires PhantomJS to be installed. If you're using OSX and have Homebrew installed, this can be done with $ brew install phantomjs

To use, run the following scripts from the root directory of any markdown file to parse:

First, pass the url to the markdown file you want to crawl..

# pass the url to the markdown file to parse as an argument
$ phantomjs app.js https://github.com/ga-wdi-lessons/activerecord-intro
# this will output screenshots in a directory /images

Then, replace the code snippets with screenshots in your markdown file...

# pass the name of the markdown file and redirect to the name of the file to create
$ node markdown.js readme.md > new_readme.md # creates a file called new_readme.md
# assumes you are in the same directory as the images directory

Bugs/Issues

Please file an issue on this repository or feel free to submit a pull request!