diff --git a/justfile b/justfile new file mode 100644 index 0000000..d88c769 --- /dev/null +++ b/justfile @@ -0,0 +1,2 @@ +main: + ./xbsjsonedit --jsonbackup ~/Downloads/xbs_backup_20241109104310.json --print -n diff --git a/xbsjsonedit b/xbsjsonedit index 0007372..67f6b8c 100755 --- a/xbsjsonedit +++ b/xbsjsonedit @@ -383,7 +383,10 @@ def digin(parent, parent_id, path, search_term, operation, commit=False, indent= for tag in item["tags"]: tags += tag + ", " - print ("{:<4} - {}{} [{}]".format(item["id"], indent, item["title"], tags[:-2])) + + t = item.get("title", "").replace("[", "(").replace("]", ")") + u = item.get("url", "") + print(f"- [{t}]({u})") if operation == "DupURLs": log_urls (item["url"], path, item["id"], parent, parent_id, item_index)