# Args of Custom Processor

#### johseb

03 Jun, 2019 11:31 AM

I'm using Pandoc as my Custom Processor and I'm facing the following (minor) issues:

1. My list of args/filters is quite long and moving left/right to read or modify the string is a hassle
2. 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

My proposal is to have a "modular" approach:
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.

1. Support Staff Posted by Brett on 03 Jun, 2019 10:10 PM

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.

To use a shell script, just create a processor.sh file (with whatever name) and include something like:

#/bin/bash

cat | /usr/local/bin/pandoc -all -my -arguments


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 cat), 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...

Hope that helps!

-Brett

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.

2. Posted by johseb on 03 Jun, 2019 11:01 PM

I'll try them out asap.

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

### »

#### Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

# Keyboard shortcuts

### Generic

? Show this help Blurs the current field

### Comment Form

r Focus the comment reply box Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

## Recent Discussions

 11 Nov, 2019 10:16 AM Add org mode support 06 Nov, 2019 04:09 PM Marked 2 is asking me to reregister after catalina upgrade 05 Nov, 2019 12:40 AM Pre-formatted text blocks rendering as italic 04 Nov, 2019 08:26 PM Marked 2 - Bear Preview 02 Nov, 2019 09:12 PM Crashes too often when editing MathJax

## Recent Articles

 Using JavaScript in Marked Custom CSS: Writing custom CSS for Marked License code has already been utilized Highlight sentences longer than a certain number of words How do I retrieve a lost license (direct version)