AmosNimos / mview

This Bash script converts a Markdown file to HTML using a sed command, opens the HTML file in Firefox, waits for Firefox to close, and then deletes the temporary HTML file. It provides a fast way to view Markdown files in Firefox without relying on slower conversion tools like pandoc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MView.sh 👁️‍🗨️

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.

Usage

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:

  1. Create the bin directory in your home directory:
mkdir ~/bin
  1. Add the following line to your ~/.profile or ~/.bashrc file to include the bin directory in your PATH:
export PATH="$HOME/bin:$PATH"
  1. Close and reopen your terminal, or run the following command to apply the changes:
source ~/.profile

Requirements

MView.sh requires Bash and Firefox to be installed on your system.

About

This Bash script converts a Markdown file to HTML using a sed command, opens the HTML file in Firefox, waits for Firefox to close, and then deletes the temporary HTML file. It provides a fast way to view Markdown files in Firefox without relying on slower conversion tools like pandoc.


Languages

Language:Shell 62.1%Language:Roff 37.9%