slimmer search results formatting

This commit is contained in:
Simon 2018-08-09 21:03:30 -04:00
parent fae9d8e82e
commit 9ffd2c141a
2 changed files with 3 additions and 12 deletions

@ -1 +1 @@
Subproject commit 1ff1e039f5aed3394cd9ff0f0e6e4b88d3b0618e
Subproject commit faeff701dee8b9660fd850a736593c40b4d89219

View File

@ -107,18 +107,9 @@ class OdDatabase:
else:
hl_name = src["name"]
# Path highlight
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 += "[" + src["website_url"] + "](https://od-db.the-eye.eu/website/" + str(src["website_id"]) + "/).../"
message += hl_name + ("." if src["ext"] else "") + src["ext"] + " | "
message += humanfriendly.format_size(src["size"]) + " | "
message += time.strftime("%Y-%m-%d", time.gmtime(src["mtime"])) + " \n"
message += humanfriendly.format_size(src["size"]) + " \n"
else:
message += "\n"