Closed linpengcheng closed 8 months ago
The PreProcessorExe
and PostProcessorExe
can be any commandline program.
Maybe the documention is not clear enough about that point.
Actually your configration should work when the python executable accepts the parameters in that order.
Thank you for your reply and work!
According to NppMarkdownPanel.ini, it can choose a different ProcessorExe configuration based on the file extension, just like Preview HTML's Filters.ini, right?
From the default [Filter0] of NppMarkdownPanel.ini, it seems that the configuration name is a bit different.
NppMarkdownPanel.ini
; [Filter0]
; Extensions=.pl,.pm
; Program=pod2html.bat
; Arguments=--css C:\notepad++\plugins\NppMarkdownPanel\style.css
[Filter1]
Extensions=.xyz
Arguments=--css C:\notepad++\plugins\NppMarkdownPanel\style.css
PreProcessorExe=C:\python.exe
PreProcessorArguments=C:\ConvertxxxTOxxx.py %inputfile% %outputfile%
PostProcessorExe=C:\python.exe
PostProcessorArguments=C:\ConvertyyyTOyyy.py %inputfile% %outputfile%
[Filter2]
Extension=.hiccup, .hip
;Program=C:\dev\Notepad++\tools\comrak\comrak.exe
;bb.exe from https://github.com/babashka/babashka
PreProcessorExe=C:\Notepad++\tools\clj\bb.exe
PreProcessorArguments=C:\Notepad++\tools\clj\hiccup2html.clj %inputfile% %outputfile%
hiccup2html.clj
(use 'hiccup.core)
(let [[inputfile outputfile] *command-line-args*
f #(spit outputfile % :encoding "utf-8")]
(->> inputfile
slurp
read-string
eval
html
f))
test.hiccup
[:p
[:h1 "List"]
[:ul
(for [x (range 1 4)]
[:li x])]
[:p "Hello, world!"]]
preview is wrong
[:p[:h1 "List"] [:ul (for [x (range 1 4)] [:li x])] [:p "Hello, world!"]]
update01:
NppMarkdwonPanel and PreviewHTML both work fine under win7, but not under win11. It may be a problem with npp or OS.
Here is the configuration that works under win7:
NppMarkdownPanel.ini
[Options]
CssFileName=style.css
CssDarkModeFileName=style-dark.css
ZoomLevel=301
HtmlFileName=
ShowToolbar=True
ShowStatusbar=True
SupportedFileExt=md,mkd,mdwn,mdown,mdtxt,markdown,text,hiccup
AutoShowPanel=False
SyncViewWithCaretPosition=0
SyncWithFirstVisibleLine=0
PreProcessorExe=C:\Notepad++\tools\clj\bb.exe
PreProcessorArguments=C:\Notepad++\tools\clj\hiccup2html_mdpanel.clj %inputfile% %outputfile%
hiccup2html_mdpanel.clj
(use 'hiccup.core)
(let [[inputfile outputfile] *command-line-args*
f #(spit outputfile % :encoding "utf-8")]
(->> inputfile
slurp
read-string
eval
html
f))
test.hiccup
[:p
[:h1 "List"]
[:ul
(for [x (range 1 4)]
[:li x])]
[:p "Hello, world!"]]
I'm working with Win11 and have no problems so far. Please specify your problem.
Microsoft is phasing out IE in Windows 11, so some Windows 11 users cannot use the IE kernel-based notepad++ plugin.
Would you get ProcessorExe to support scripts? The script is simpler, more flexible and more practical.
For example: