mirror of
https://github.com/Justuser3310/ss14_chemistry_site.git
synced 2025-02-08 01:01:18 +00:00
Добавление парсинга ftl
This commit is contained in:
parent
5c6917e40e
commit
6b80c415ff
@ -7,7 +7,11 @@ def parse_yml(url = 'https://raw.githubusercontent.com/SerbiaStrong-220/space-st
|
|||||||
|
|
||||||
def parse_ftl(url = 'https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/Resources/Locale/ru-RU/reagents/meta/medicine.ftl'):
|
def parse_ftl(url = 'https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/Resources/Locale/ru-RU/reagents/meta/medicine.ftl'):
|
||||||
raw = get(url).content.decode('utf-8')
|
raw = get(url).content.decode('utf-8')
|
||||||
print(raw)
|
locales = {}
|
||||||
|
for i in raw.splitlines():
|
||||||
|
if 'name' in i:
|
||||||
parse_ftl()
|
splitted = i.split()
|
||||||
|
name = splitted[0][13:]
|
||||||
|
locale = splitted[2]
|
||||||
|
locales[name] = locale
|
||||||
|
return locales
|
||||||
|
Loading…
Reference in New Issue
Block a user