That was quick! – Thanks echo select * from tables order bv 1 desc | sqlformatter.exe
works in the command shell, and I get reformatted text back out onto the console of select * from tables order by 1 desc I was hoping to keep this simple without having to write parsers for wiki text! Thx Graham From: Jaap Karssenberg [mailto:jaap.karssenb...@gmail.com] Sent: 30 April 2015 12:45 To: Graham Foster Cc: Zim Subject: Re: [Zim-wiki] Getting external tools to work? Hi Graham, The custom tool really only takes a command, not a shell expression. So in your example "echo %t | sqlformatter.exe" the "|" doesn't do what you think it does - instead it is just passed on as a literal to the "echo" command. What you should do is put the commands in a ".bat" file, then use that ".bat" file as a custom command. I would advice to go the "%f" route and use a custom script to extract the sql and run it through the formatter. The "%t" might not work at all in combination with the code blocks plugin - at least, I have not tested that. Hope this helps, Jaap On Thu, Apr 30, 2015 at 1:38 PM, Graham Foster <gandalfmeis...@gmail.com <mailto:gandalfmeis...@gmail.com> > wrote: Hi I do a lot of SQL and use Zim for keeping notes on client issues / the SQL used to investigate issues. I have the source code plugin, which does nice highlighting, but I would like to do reformatting too. I have a command line reformatter, but it expects SQL text in – not wiki format text. I tried passing selected text, but that doesn’t work. I can make it work like a filter for simple SQL, but although I use %t as parameter – it still doesn’t work. echo %t | sqlformatter.exe - fails command notfound?? sqlformatter.exe %f - fails – chokes on the wiki text Any suggestions as to how to get this to work please? Graham _______________________________________________ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net <mailto:zim-wiki@lists.launchpad.net> Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
_______________________________________________ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp