grip(1) | grip(1) |
grip - Preview GitHub Markdown files like Readme locally
grip [options] [PATH] [ADDRESS]
Grip is a command-line server application written in Python that uses the GitHub markdown API to render a local readme file. The styles come directly from GitHub, so you'll know exactly how it will appear. Changes you make to the Readme will be instantly reflected in the browser without requiring a page refresh.
PATH is a file to render or a directory containing README.md. Use - for stdin.
ADDRESS is what to listen on, of the form HOST[:PORT], or just PORT
To render the readme of a repository:
Now open a browser and visit http://localhost:6419. Or run with -b and Grip will open a new browser tab for you.
$ grip
You can also specify a port:
Or an explicit file:
$ grip 80
Alternatively, you could just run grip and visit http://localhost:6419/AUTHORS.md since Grip supports relative URLs.
$ grip AUTHORS.md
You can combine the previous examples:
Or specify a hostname instead of a port.:
$ grip AUTHORS.md 80
Or provide both:
$ grip CHANGES.md 0.0.0.0
You can even bypass the server and export to a single HTML file, with all the styles and assets inlined:
$ grip . 0.0.0.0:80
Control the output name with the second argument:
$ grip --export
If you're exporting a bunch of files, you can prevent styles from being inlined to save space with --no-inline:
$ grip README.md --export readme.html
Reading from stdin:
$ grip README.md --export --no-inline introduction.html
Writing to stdout:
$ cat README.md | grip -
And both is also supported, allowing you to use Grip with other programs:
$ grip AUTHORS.md --export - | bcat
Rendering as user-content like comments and issues is also supported, with an optional repository context for linking to issues:
$ cat README.md | grip --export - | less
$ grip --user-content --context=joeyespo/grip
Bugs should be reported as issues at the project's GitHub page: <https://github.com/joeyespo/grip/issues>
Grip is developed by Joe Esposito <joe@joeyespo.com>.
This man page was written by Tiago Ilieve <tiago.myhro@gmail.com> for the Debian distribution (but it may be used by others).
03 July 2016 |