Running a shell script on save in Kate

Dear Folks,

I write my blogs in Markdown and convert them to HTML using Pandoc. I do this by manually executing a shell script and then viewing the rendered HTML in my web browser.

It would be great if Kate could execute the shell script automatically when I save the Markdown page. I also want to view the rendered HTML in the Markdown Viewer KPart instead of having to switch to my browser to view the content. Many of my blogs have mathematics and tables that do not show up in the Markdown viewer correctly.

I tried the following:

  1. External tools but my added tool appeared greyed out in the menu and did not know how to activate it to run it on save.
  2. Build pane in Kate but could not figure out how to execute my shell script using it.

I hope someone here can help me figure this out.

Many thanks.