mirror of
https://github.com/TrentSPalmer/hugo_themes_report.git
synced 2024-12-04 16:41:31 -08:00
new get_vnum_stripped_string function
This commit is contained in:
parent
45099f8405
commit
891a8fe4e3
@ -190,18 +190,7 @@ def parse_gitlab_hugo_themes_list():
|
||||
|
||||
|
||||
def get_corrected_url(x):
|
||||
if "neofeed-theme" in x:
|
||||
return x.rstrip("/v2")
|
||||
elif "salinger-theme" in x:
|
||||
return x.rstrip("/v2")
|
||||
elif "docuapi" in x:
|
||||
return x.rstrip("/v2")
|
||||
elif "bilberry-hugo-theme" in x:
|
||||
return x.rstrip("/v3")
|
||||
elif "hugo-liftoff" in x:
|
||||
return x.rstrip("/v3")
|
||||
else:
|
||||
return x
|
||||
return get_vnum_stripped_string(x)
|
||||
|
||||
|
||||
def parse_hugo_themes_list():
|
||||
@ -236,22 +225,12 @@ def get_gitlab_project_ids():
|
||||
|
||||
|
||||
def get_corrected_theme_name(x):
|
||||
if "neofeed-theme" in x:
|
||||
return x.rstrip("/v2")
|
||||
elif "docuapi" in x:
|
||||
return x.rstrip("/v2")
|
||||
elif "hugo-theme-zen" in x:
|
||||
return x.rstrip("/v2")
|
||||
elif "salinger-theme" in x:
|
||||
return x.rstrip("/v2")
|
||||
elif "osprey-delight" in x:
|
||||
return x.rstrip("/v5")
|
||||
elif "bilberry-hugo-theme" in x:
|
||||
return x.rstrip("/v3")
|
||||
elif "hugo-theme-stack" in x:
|
||||
return x.rstrip("/v3")
|
||||
elif "hugo-liftoff" in x:
|
||||
return x.rstrip("/v3")
|
||||
return get_vnum_stripped_string(x)
|
||||
|
||||
|
||||
def get_vnum_stripped_string(x):
|
||||
if x[-3:] in ("/v2", "/v3", "/v4", "/v5"):
|
||||
return x[0:-3]
|
||||
else:
|
||||
return x
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user