dashing icon indicating copy to clipboard operation
dashing copied to clipboard

Add support for several regex replacements to the config

Open mojo2012 opened this issue 9 years ago • 3 comments

It would be nice to offer a way in the json config of the dashing tool to configure the preprocessing of the input data with several regex replacements instead of just one, and/or some shorthands for commons things like remove line feeds.

mojo2012 avatar Jan 08 '16 07:01 mojo2012

How would you envision that looking in the config? I think it's a good idea.

technosophos avatar Jan 11 '16 16:01 technosophos

Something like this:

{ "name": "BusyBox", "package": "busybox", "index": "BusyBox.html", "icon32x32": "busybox1.png", "selectors": { "dt a": "Command", "title": { "type": "Package", "replacements": [ { "string": " - The Swiss Army Knife of Embedded Linux", "replacement": "" }, { "regex": "\nTest", "replacement": "Test" } ] } }, "ignore": [ "ABOUT" ] }

It offers a plain string replacement, and the other option is to use a regex.

(sorry, markup syntax doesn't seem to work correctly.

mojo2012 avatar Jan 12 '16 08:01 mojo2012

I'm going to look into implementing this. It'll take me a while, because I'm buys with some other things, but I think this is a workable idea that would benefit a lot of users.

technosophos avatar Jan 12 '16 16:01 technosophos