[Zope] ever wanted to reverse the <!--#in--> tag?

Brian Hooper brian@garage.co.jp
Thu, 10 Jun 1999 19:52:07 +0900


--VGh1LCAxMCBKdW4gMTk5OSAxOTo1MjowNyArMDkwMA==
Content-Transfer-Encoding: 7bit
Content-Type: text/plain

i did!

so, here's a little patch to DT_In.py, which allows the use
of a reverse arg to the <!--#in--> tag, so that

<!--#in sequence reverse-->
...
<!--#/in-->

prints out a reversed version of

<!--#in sequence-->
...
<!--#/in-->

the patch is against Zope 1.10.2 but should also work with 2.0.0a1,
since not much has changed w/ DT_In since then.

i don't know if anyone else needs this, but it's useful for me
(my motivation - wanting to print out an unthreaded Confera topic
in newest-oldest order!)

--brian


--VGh1LCAxMCBKdW4gMTk5OSAxOTo1MjowNyArMDkwMA==
Content-Type: application/octet-stream; name="DT_In.patch"
Content-Disposition: attachment;
 filename="DT_In.patch"
Content-Transfer-Encoding: base64

ZGlmZiAtYXUgRG9jdW1lbnRUZW1wbGF0ZS9EVF9Jbi5weSBEb2N1bWVudFRlbXBsYXRlLm5ldy9E
VF9Jbi5weQotLS0gRG9jdW1lbnRUZW1wbGF0ZS9EVF9Jbi5weQlTdW4gTWFyIDE0IDAxOjIzOjU1
IDE5OTkKKysrIERvY3VtZW50VGVtcGxhdGUubmV3L0RUX0luLnB5CVRodSBKdW4gMTAgMDk6NDA6
MjYgMTk5OQpAQCAtNDEwLDE0ICs0MTAsMjAgQEAKICAgICAgICAgYXJncz1wYXJzZV9wYXJhbXMo
YXJncywgbmFtZT0nJywgc3RhcnQ9JzEnLGVuZD0nLTEnLHNpemU9JzEwJywKICAgICAgICAgICAg
ICAgICAgICAgICAgICAgb3JwaGFuPSczJyxvdmVybGFwPScxJyxtYXBwaW5nPTEsCiAgICAgICAg
ICAgICAgICAgICAgICAgICAgIHNraXBfdW5hdXRob3JpemVkPTEsCi0gICAgICAgICAgICAgICAg
ICAgICAgICAgIHByZXZpb3VzPTEsIG5leHQ9MSwgZXhwcj0nJywgc29ydD0nJykKKyAgICAgICAg
ICAgICAgICAgICAgICAgICAgcHJldmlvdXM9MSwgbmV4dD0xLCBleHByPScnLCBzb3J0PScnLCBy
ZXZlcnNlPTApCiAgICAgICAgIHNlbGYuYXJncz1hcmdzCiAgICAgICAgIGhhc19rZXk9YXJncy5o
YXNfa2V5CiAKICAgICAgICAgaWYgaGFzX2tleSgnc29ydCcpOgogICAgICAgICAgICAgc2VsZi5z
b3J0PXNvcnQ9YXJnc1snc29ydCddCiAgICAgICAgICAgICBpZiBzb3J0PT0nc2VxdWVuY2UtaXRl
bSc6IHNlbGYuc29ydD0nJwotICAgICAgICAgICAgCisKKyAgICAgICAgaWYgaGFzX2tleSgncmV2
ZXJzZScpOgorICAgICAgICAgICAgc2VsZi5yZXZlcnNlPTEKKyAgICAgICAgICAgIHNlbGYuc29y
dD0nJworICAgICAgICBlbHNlOgorICAgICAgICAgICAgc2VsZi5yZXZlcnNlPTAKKyAgICAgICAg
IAogICAgICAgICBpZiBoYXNfa2V5KCdtYXBwaW5nJyk6IHNlbGYubWFwcGluZz1hcmdzWydtYXBw
aW5nJ10KICAgICAgICAgZm9yIG4gaW4gJ3N0YXJ0JywgJ3NpemUnLCAnZW5kJzoKICAgICAgICAg
ICAgIGlmIGhhc19rZXkobik6IHNlbGYuYmF0Y2g9MQpAQCAtNzA5LDYgKzcxNSw4IEBACiAgICAg
ICAgICAgICBzLmFwcGVuZCgoayxjbGllbnQpKQogCiAgICAgICAgIHMuc29ydCgpCisgICAgICAg
IGlmIHNlbGYucmV2ZXJzZToKKyAgICAgICAgICAgIHMucmV2ZXJzZSgpCiAKICAgICAgICAgc2Vx
dWVuY2U9W10KICAgICAgICAgZm9yIGssIGNsaWVudCBpbiBzOiBzZXF1ZW5jZS5hcHBlbmQoY2xp
ZW50KQo=

--VGh1LCAxMCBKdW4gMTk5OSAxOTo1MjowNyArMDkwMA==--