Hi Mark and Kevin,
I have just joined the BBEdit group, I've been using BBEdit for maybe 15 
years, but don't know much about it until recently.

This solution is really out of the box, but it works for me.  I use node.js 
a lot in my work and I created the following server to display my index.md 
file that I use BBEdit to create and edit.  Once the index.js server is 
running all I have to do is place: localhost:8095/index in Safari and it 
displays the html rendering.  A browser refresh after changing and saving 
the file and the results are shown in Safari.

index.js
-------------------------------------------------------------------------------------
var express = require("./node_modules/express");
var app = express();
var exec = require("child_process").exec;

app.get('/index', function (request, response) { index(request, response); 
});

var server = app.listen(8095, function(){ console.log(Date() + ": Server 
has started."); });

// To display the EHR Main Index Web Page.
function index(request, response)
  { 
cmdLine = "pandoc /home/biskate/gtm/doc/index.md --metadata title=\"GTM 
SERVICE OUTLINE\" -s";
    exec(cmdLine, {maxBuffer: 1024 * 3000}, function(error, stdout, stderr)
      { response.writeHead(200, {"Content-Type": "text/html"});
       response.write(stdout); response.end(); });
-------------------------------------------------------------------------------------

On Wednesday, May 24, 2023 at 3:57:53 PM UTC-4 Mark Mayberry wrote:

> Kevin,
>
> I hope you are successful in streamlining the process because what you 
> describe would be helpful to me also!
>
> Yours,
>
> Mark
>
> On 24 May 2023, at 14:43, KevinC wrote:
>
> Mark, 
>
> Thank you very much for your helpful script. I've been using a similar 
> setup with a makefile that I call from the terminal, which produces pretty 
> good results as well.
>
> I was just hoping to be able to take advantage of BBEdit's build-in 
> preview if possible. Or if not, at least find an easy way to call the 
> makefile from BBEdit instead of always needing to switch to the terminal.
>
> Thanks again!
>
> Kevin
>
> On Wednesday, May 24, 2023 at 6:37:20 AM UTC-6 Mark Mayberry wrote:
>
>> Kevin, 
>>
>> I know this is not exactly what you are asking, but I regularly create 
>> slide shows in a variety of formats using the following 
>> "Create-Slideshow.sh" file.  I proof examine the output by reviewing the 
>> HTML files in Safari, and then making needed changes in BBEdit. It's a 
>> "back-n-forth" process but I usually get a properly formatted slide show 
>> after a few attempts.  After each needed change, I saved the MD files in 
>> BBEdit, and re-run the terminal command, and then hit reload page in Safari.
>>
>> Yours,
>>
>> Mark
>>
>> #!/bin/bash
>> echo "Starting Create Slideshow script."
>> cd /Users/markmayberry/Documents/Pandoc-Processing/Conversions-Slideshows
>> pandoc Slideshow.md -f markdown -t html -s -o Slideshow-html.html
>> pandoc Slideshow.md -f markdown -t pdf 
>> --pdf-engine=/Library/TeX/texbin/pdflatex -s -o Slideshow-pdf.pdf
>> pandoc Slideshow.md -f markdown -t pptx -s -o Slideshow-pptx.pptx
>> pandoc Slideshow.md -f markdown -t s5 -s -o Slideshow-s5.html
>> pandoc Slideshow.md -f markdown -t slidy -s -o Slideshow-slidy.html
>> pandoc Slideshow.md -f markdown -t dzslides -s -o Slideshow-dzslides.html
>> pandoc Slideshow.md -f markdown -t revealjs -s -o Slideshow-revealjs.html
>> pandoc Slideshow.md -f markdown -t beamer 
>> --pdf-engine=/Library/TeX/texbin/pdflatex -s -o Slideshow-beamer.pdf
>> echo "Ending Create Slideshow script."
>>
>>
>>
>> On Tuesday, May 23, 2023 at 3:20:36 PM UTC-5 KevinC wrote:
>>
>>> Hello, 
>>>
>>> I understand how to customize default Markdown processor settings.
>>>
>>> However, I was wondering if it is possible to configure a specific 
>>> Markdown processor and specific command line arguments to use for a 
>>> specific project?
>>>
>>> As a use case, I'm currently working on a project that uses Pandoc to 
>>> create a slide show, and I would like to be able to adjust the preview 
>>> BBEdit creates without having to change the settings for other Markdown 
>>> files/projects that aren't slide shows.
>>>
>>> Any ideas?
>>>
>>> Thanks, Kevin
>>>
>> --
> This is the BBEdit Talk public discussion group. If you have a feature 
> request or need technical support, please email "sup...@barebones.com" 
> rather than posting here. Follow @bbedit on Twitter: <
> https://twitter.com/bbedit>
> ---
> You received this message because you are subscribed to the Google Groups 
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to bbedit+un...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/bbedit/8230e208-7360-4da7-a430-84ce185442c1n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/bbedit/8230e208-7360-4da7-a430-84ce185442c1n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/6ec83d72-3138-4b83-bfa3-5ba9c1906368n%40googlegroups.com.

Reply via email to