mirror of
https://github.com/cucumber-sp/yandex-music-linux.git
synced 2024-12-24 14:34:39 +03:00
Refactor code to improve readability
This commit is contained in:
parent
4ac238a00c
commit
dbcf4e76f4
@ -8,6 +8,7 @@ if len(sys.argv) < 3:
|
|||||||
file_name = sys.argv[1]
|
file_name = sys.argv[1]
|
||||||
save_file_name = sys.argv[2]
|
save_file_name = sys.argv[2]
|
||||||
|
|
||||||
|
|
||||||
def build_html(data, first_launch=False):
|
def build_html(data, first_launch=False):
|
||||||
html = ""
|
html = ""
|
||||||
for i, element in enumerate(data):
|
for i, element in enumerate(data):
|
||||||
@ -23,6 +24,7 @@ def build_html(data, first_launch=False):
|
|||||||
html += f"<{element['value']}>{build_html(element['children'])}</{element['value']}>"
|
html += f"<{element['value']}>{build_html(element['children'])}</{element['value']}>"
|
||||||
return html
|
return html
|
||||||
|
|
||||||
|
|
||||||
with open(file_name, "r", encoding='utf-8') as file:
|
with open(file_name, "r", encoding='utf-8') as file:
|
||||||
translation = json.load(file)
|
translation = json.load(file)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user