tag:support.markedapp.com,2011-09-11:/discussions/suggestions/46470-args-of-custom-processorMarked: Discussion 2019-06-03T23:01:30Ztag:support.markedapp.com,2011-09-11:Comment/473213772019-06-03T11:31:51Z2019-06-03T11:31:51ZArgs of Custom Processor<div><p>I'm using Pandoc as my Custom Processor and I'm facing the following (minor) issues:</p>
<ol>
<li>My list of args/filters is quite long and moving left/right to read or modify the string is a hassle<br></li>
<li>I often need to modify the string to include or exclude arguments and filters and now I have to search the arg and delete it, then I forget the syntax when its time to include it again, etc</li>
</ol>
<p>My proposal is to have a "modular" approach:<br>
include several "Args" fields which will be combined (space separated) by Marked 2 when launching the processor. Each of them will be complete of a checkmark to quickly enable/disable it.</p></div>johsebtag:support.markedapp.com,2011-09-11:Comment/473213772019-06-03T22:10:08Z2019-06-03T22:10:08ZArgs of Custom Processor<div><p>Thanks for the suggestion. It's a good solution to your problem, but I'm not sure it's needed by enough users to justify the extra interface. The easiest solution to long argument fields is to call a shell script instead, then edit the arguments in a text editor where you can see them all. I get that individually toggling arguments on and off would be handy if you're changing parameters frequently, but I just question whether enough users are in that position to make it a feature.</p>
<p>To use a shell script, just create a <code>processor.sh</code> file (with whatever name) and include something like:</p>
<pre>
<code>#/bin/bash
cat | /usr/local/bin/pandoc -all -my -arguments</code>
</pre>
<p>Make it executable and point Marked to that instead of Pandoc. You could even pass arguments to that from Marked and reference them as $1, $2, etc. (the actual content is passed via STDIN, thus the <code>cat</code>), so that the ones you change most often could be sent from Marked and all of the defaults would be automatic. It would at least save space in the text field...</p>
<p>Hope that helps!</p>
<p>-Brett</p>
<p>P.S. I do have hopes and dreams of fleshing out a much better custom processor interface, with multiple processors, each with their own config panels, and even a predicate builder that allows Marked to determine whether or not/which processor to run in different circumstances. Right now that's way down the line on the roadmap, but I'll keep the multi-field arguments idea in mind for that.</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/473213772019-06-03T23:01:29Z2019-06-03T23:01:29ZArgs of Custom Processor<div><p>Thanks for your reply and your suggestions.<br>
I'll try them out asap.</p></div>johseb