X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=search-tags.py;h=afdd6c47823cf0aef61b6429c945758dcca6a349;hb=6b692a173291f4f217d99e4f73281bd2b4d1fa1f;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..afdd6c4 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)