On Mon, Oct 19, 2020 at 6:11 PM Jim Schmitz <[email protected]> wrote:
> The documentation says I can "apply filters to specific posts or pages by > using the filters metadata field", like so: > > .. filters: filters.html_tidy_nowrap > > I can get that to work, but how do I do it if is my own custom filter? I > get the below error, which is the same error I get if set the filters > field to nonsense. I believe the problem is my filter just isn't found by > the code that runs the filters. How do I make it available? > > Custom filters in metadata seem to be limited to external tools. So, for example, if you have a script called "upperify" that turns everything into upper case and want to use that: .. filters: upperify %s I will do a MR clarifying the documentation. > PythonAction Error > Traceback (most recent call last): > File > "/home/jim/INSTALL/anaconda3/envs/py5/lib/python3.8/site-packages/doit/action.py", > line 437, in execute > returned_value = self.py_callable(*self.args, **kwargs) > File > "/home/jim/INSTALL/anaconda3/envs/py5/lib/python3.8/site-packages/nikola/utils.py", > line 968, in unlessLink > subprocess.check_call(action % target, shell=True) > TypeError: not all arguments converted during string formatting > > Thanks! > > -- > You received this message because you are subscribed to the Google Groups > "nikola-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/nikola-discuss/CAKUYxW%2Bc_w6QkLoZuooWG4T7yO%3DkVgRJ4vr13T3vn6aA7qRaNw%40mail.gmail.com > <https://groups.google.com/d/msgid/nikola-discuss/CAKUYxW%2Bc_w6QkLoZuooWG4T7yO%3DkVgRJ4vr13T3vn6aA7qRaNw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "nikola-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/CALXDAfojpMezsPJMXNmcnzShohOs-CXcGsS0DQtzMv%2BuWNsO%3Dw%40mail.gmail.com.
