X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;ds=sidebyside;f=search-tags.py;h=d1bc93ef697cc40a9593e9a58bb0c39e6e7818a7;hb=3d1095e88653ea5e0c999ba65ad6406163ecc447;hp=8e047e1b400fb46fdd79bb1c0f5652f249091433;hpb=5c8f53a810fb2d55ff9381810dd1427ed7201949;p=phdru.name%2Fcgi-bin%2Fblog-ru%2Fsearch-tags.git
diff --git a/search-tags.py b/search-tags.py
index 8e047e1..d1bc93e 100755
--- a/search-tags.py
+++ b/search-tags.py
@@ -38,5 +38,17 @@ else:
status = "404 Tag not found"
title = "ïÛÉÂËÁ!"
body = "ôÅÇ %s ÎÅ ÓÕÝÅÓÔ×ÕÅÔ!" % tag
+ else: # Process tree
+ from tags import find_tags
+ posts = find_tags(tree)
+ status = None
+ title = "úÁÐÉÓÉ, ÎÁÊÄÅÎÎÙÅ ÄÌÑ ×ÙÒÁÖÅÎÉÑ " + q
+ if posts:
+ _posts = []
+ for suburl, title in posts:
+ _posts.append('%s' % (suburl, title))
+ body = "
\n".join(_posts)
+ else:
+ body = "îÅ ÎÁÊÄÅÎÏ ÎÉ ÏÄÎÏÊ ÚÁÐÉÓÉ."
response(title, body, status)