From 2fab588efadf8e0b560f6ab532e8772f14d1d0de Mon Sep 17 00:00:00 2001 From: jyamihud Date: Sat, 2 Apr 2022 14:11:49 +0300 Subject: [PATCH] Open Source redirects to GNU.ORG page why 'Open Source' is a bad term. --- apps/librarian.json | 1 - modules/render.py | 9 ++++++++- modules/search.py | 1 - 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/librarian.json b/apps/librarian.json index d8e9518..fc4eacb 100644 --- a/apps/librarian.json +++ b/apps/librarian.json @@ -12,6 +12,5 @@ "formats_read":[], "formats_write":[], "generic_name":["LBRY Client", - "Publication", "Video Player", "Music Player"]} diff --git a/modules/render.py b/modules/render.py index 0c8f22c..ea9b382 100644 --- a/modules/render.py +++ b/modules/render.py @@ -23,7 +23,14 @@ def html(page, json): page = page + "" # Few words about it - page = page + "

"+json.get("comment","")+"

" + comment = json.get("comment","") + if "open source" in comment.lower(): + # Well... Here is a thing. Free Software, not open source. + where = comment.lower().find("open source") + os = comment[where:where+11] + comment = comment.replace(os, + ""+os+"") + page = page + "

"+comment+"

" # I want to show nothing else from if it's proprietary if not free: diff --git a/modules/search.py b/modules/search.py index 56275ed..a5054e3 100644 --- a/modules/search.py +++ b/modules/search.py @@ -77,7 +77,6 @@ def suggest(json_data): with open("apps/"+i) as json_file: idata = json.load(json_file) except Exception as e: - print("Error!", i, e) idata = {} all_apps.append(idata)