Is something like p.a.theming diazo.debug possible with diazo standalone?

152 Views Asked by At

With p.a.theming it is possible to use diazo.debug to get an overlay containing your annotated rules. See https://pypi.python.org/pypi/plone.app.theming#theme-debugging

Example of the info shown when using diazo.debug=1

The overlay shows what rules are matched when performing a transform of a specific page of your content - see the image above.

Is something similar possible when running diazo standalone with paster? That is, is it possible to show info about matched rules when doing a transform?

The diazo command line tools (diazocompiler, diazopreprocessor, diazorun) only show info about compiling your rules to xslt as far as I know - or is more possible?

1

There are 1 best solutions below

1
SteveM On

If you pip install diazo (I'd use a virtualenv), you'll get three command-line scripts:

  • diazocompiler
  • diazopreprocessor
  • diazorun

that will allow you to run all the diazo operations from the command line. You''ll be most interested in diazorun with the runtrace command-line option which will allow you to annotate a rules file with the results of a transformation. It will tell you all you want to know -- and more.