Forum Archive

API to perform 'Show HTML' directly from Python?

emkay

Hello,

I like to develop my workflows purely in Python (so, I can write unit tests for them on my Mac (using mocks for editor, workflow, etc), get the plugin working, then wrap it in json and deploy to Editorial).

Anyway, I was wondering if the 'Show HTML' workflow action was available as a call from Python? This would enable my latest workflow to be pure Python (and makes wrapping up the json easier, rather than have to add the 'Show HTML" action as a special case).

Thanks

Martin

MartinPacker

As another Martin :-) I'd like to take HTML generated and post-process it (also in Python) in the same workflow.

This page shows how to take Markdown (not MultiMarkdown) and convert it:

markdown.markdown()

but I'd really rather have MMD.

So I guess it's a case of building a multipart workflow. :-(

omz

No, the Show HTML action doesn't have a Python equivalent, sorry.

MartinPacker

As a matter of interest how would people suggest I post-process the HTML that is generated? Some kind of XML parser? Or just use regular expression matching?