mirror of
https://github.com/TrentSPalmer/hugo_themes_report.git
synced 2024-12-04 08:41:29 -08:00
add get_corrected_min_ver() rank_hugo_themes.py
This commit is contained in:
parent
47563d3cef
commit
8730970956
@ -526,8 +526,9 @@ def parse_themes_toml_for_each_hugo_themes():
|
||||
else:
|
||||
if theme.theme_license is not None: theme.theme_license = None
|
||||
if 'min_version' in theme_toml:
|
||||
if theme.min_ver != theme_toml['min_version']:
|
||||
theme.min_ver = theme_toml['min_version']
|
||||
corrected_mv = get_corrected_min_ver(theme_toml['min_version'])
|
||||
if theme.min_ver != corrected_mv:
|
||||
theme.min_ver = corrected_mv
|
||||
else:
|
||||
if theme.min_ver is not None: theme.min_ver = None
|
||||
if 'description' in theme_toml:
|
||||
@ -552,6 +553,13 @@ def parse_themes_toml_for_each_hugo_themes():
|
||||
session.commit()
|
||||
|
||||
|
||||
def get_corrected_min_ver(x):
|
||||
if 'o' in str(x):
|
||||
return x.replace('o', '0')
|
||||
else:
|
||||
return x
|
||||
|
||||
|
||||
def generate_report():
|
||||
session = sessionmaker(bind=engine)()
|
||||
hugo_themes = [
|
||||
|
Loading…
Reference in New Issue
Block a user