You can do what you want to do, I made some pretty complex output things from tiddlywiki to automatically generate some code for a job I did a while ago. You don't have to stick to the example used on
tiddlywiki.com so you can change the content of the renderContent macro to be whatever you want. This is a test I made on
tiddlywiki.com to make sure I remembered it correctly.
This works:
\define renderContent()
<$list filter="""$(exportFilter)$""">
<br>
<<currentTiddler>>
<br>
<$list filter='[tag<currentTiddler>]' template='$:/core/templates/plain-text-tiddler'/><br>
</$list>
\end
<<renderContent>>
Hopefully you can modify that to whatever format you want.