MView.sh is a Bash script that enables quick viewing of Markdown files in Firefox without the need for a slower conversion tool like pandoc.
To use MView.sh, simply run the script with a Markdown file as an argument:
./mview.sh <markdown_file>
This will convert the Markdown file to HTML using a sed command for speed, open the HTML file in Firefox, and delete the temporary HTML file once Firefox is closed.
Note: If you want to use MView.sh make it executable. You can do this by moving the script to your bin directory and making it executable using the following commands:
mv mview.sh ~/bin/mview
chmod +x ~/bin/mview
If you don't have a bin directory for your Bash scripts, you can create one and link it to your PATH. Here's how you can do it on Debian-based systems:
- Create the bin directory in your home directory:
mkdir ~/bin
- Add the following line to your ~/.profile or ~/.bashrc file to include the bin directory in your PATH:
export PATH="$HOME/bin:$PATH"
- Close and reopen your terminal, or run the following command to apply the changes:
source ~/.profile
MView.sh requires Bash and Firefox to be installed on your system.