From 8414ef5d421873a13c854bcd1584781176b10ea0 Mon Sep 17 00:00:00 2001 From: Trent Palmer Date: Wed, 28 Sep 2022 12:29:57 -0700 Subject: [PATCH] exclude inventory-hugo-theme malformed theme.toml --- rank_hugo_themes.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/rank_hugo_themes.py b/rank_hugo_themes.py index 2323959..ee04352 100755 --- a/rank_hugo_themes.py +++ b/rank_hugo_themes.py @@ -103,15 +103,17 @@ def get_hugo_themes_list(): for x in response.text.splitlines(): if "wowchemy-hugo-themes" not in x: """ + inventory-hugo-theme, alexa-portfolio, hugo-theme-ladder malformed themes.toml """ if "alexa-portfolio" not in x and "hugo-theme-ladder" not in x: - if x[0:10] == "gitlab.com" or x[0:10] == "github.com": - if x.lower() not in lower_case_themes_list: - if x[-1] == " " and "termishTheme" in x: - x = x[0:-1] - THEMESLIST.append(x) - lower_case_themes_list.append(x.lower()) + if "inventory-hugo-theme" not in x: + if x[0:10] == "gitlab.com" or x[0:10] == "github.com": + if x.lower() not in lower_case_themes_list: + if x[-1] == " " and "termishTheme" in x: + x = x[0:-1] + THEMESLIST.append(x) + lower_case_themes_list.append(x.lower()) print(response.status_code, get_hugo_themes_list.__name__)