mirror of
https://github.com/simon987/opendirectories-bot-2.git
synced 2025-04-19 01:56:42 +00:00
slimmer search results formatting
This commit is contained in:
parent
fae9d8e82e
commit
9ffd2c141a
@ -1 +1 @@
|
|||||||
Subproject commit 1ff1e039f5aed3394cd9ff0f0e6e4b88d3b0618e
|
Subproject commit faeff701dee8b9660fd850a736593c40b4d89219
|
@ -107,18 +107,9 @@ class OdDatabase:
|
|||||||
else:
|
else:
|
||||||
hl_name = src["name"]
|
hl_name = src["name"]
|
||||||
|
|
||||||
# Path highlight
|
message += "[" + src["website_url"] + "](https://od-db.the-eye.eu/website/" + str(src["website_id"]) + "/).../"
|
||||||
if "path" in hit["highlight"]:
|
|
||||||
hl_path = format_highlight(hit["highlight"]["path"][0])
|
|
||||||
else:
|
|
||||||
hl_path = src["path"]
|
|
||||||
hl_path = truncate_path(hl_path, 35)
|
|
||||||
hl_path += "/" if hl_path else ""
|
|
||||||
|
|
||||||
message += "[" + src["website_url"] + "](https://od-db.the-eye.eu/website/" + str(src["website_id"]) + "/)" + hl_path
|
|
||||||
message += hl_name + ("." if src["ext"] else "") + src["ext"] + " | "
|
message += hl_name + ("." if src["ext"] else "") + src["ext"] + " | "
|
||||||
message += humanfriendly.format_size(src["size"]) + " | "
|
message += humanfriendly.format_size(src["size"]) + " \n"
|
||||||
message += time.strftime("%Y-%m-%d", time.gmtime(src["mtime"])) + " \n"
|
|
||||||
else:
|
else:
|
||||||
message += "\n"
|
message += "\n"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user