grip: A github-like markdown viewer in your computer
Introduction¶
grip is a cli tool that you run in a directory from the terminal. He can parse you mardown files like github do.
But How that works and how to use it ?
He access (endpoint based) all files from the repo and parse markdown files after sending them to github unless you use the offline renderer.
Alternatives¶
- VScode Extension markdown preview enhanced: not working on ubuntu (see ref to solution), i use grip
Prereqsites¶
- python: you can install the latest version
Installation¶
Install it with pip install grip
As simple as that !
Usage¶
- run readme.md as web app
- or run another file
Exports¶
export to pdf or html¶
You can export you file to pdf or html. To use this feature, add --export option followed by the filename (with html or pdf extension)
troubleshots
- he can export with
grip my-file-name.md --export inut.pdfbut there is a bug - so i installed with
sudo apt install gripbut it takes forever - anyway, the web view is cool. And if i neeeed pdf, from this discussion, i can use:
- windows: the extension
markdown preview enhancedworks there fine - mardown-pdf from npm
- print the page from the webview and select non-empty pages. The pb is the ref links: the ref inside text to biblio will try to lead the grip webview that will not be open if not run on cli
rate limiting¶
grip have a rate limit of 60 requests/hour. So each time you save your work and the grip server is running, you lose one request. And it you use VSCode auto-save, you're kind of screwed. Prefer either
- not to save, unless you finish modifications
- not to run grip while editing
- or add a
--norefreshoption
You can have 5000 requests/hour if you add option --user with your credentials like this
Offline renderer¶
Note
There is an offline renderer but it didn't make 2.0 release.
When it will be available, it quite is useful if
- you don't have internet connection
- or have have issue about sending your sensitive files to github-microsoft You can use it like this
Cool features¶
- add
-bif you want it to open a browser tab for you --quietto avoid printing in the terminal Use--helpto see more of this