2022-07-06 19:35:44 +00:00
|
|
|
import asyncio
|
|
|
|
import logging
|
|
|
|
import os
|
|
|
|
import json
|
2022-07-19 05:26:54 +00:00
|
|
|
import sys
|
2022-07-06 19:35:44 +00:00
|
|
|
|
|
|
|
from dotenv import load_dotenv
|
|
|
|
|
|
|
|
from utils import (
|
|
|
|
request,
|
|
|
|
download_json,
|
2022-07-07 09:04:32 +00:00
|
|
|
push_to_github,
|
2022-07-06 19:35:44 +00:00
|
|
|
load_commit_local,
|
|
|
|
save_commit_local,
|
|
|
|
save_data
|
|
|
|
)
|
|
|
|
|
|
|
|
# Load .env file
|
|
|
|
load_dotenv()
|
|
|
|
|
|
|
|
# API GitHub
|
2022-07-07 09:04:32 +00:00
|
|
|
GITHUB_SITE = "https://github.com/{PATH}"
|
2022-07-06 19:35:44 +00:00
|
|
|
GITHUB = "https://api.github.com/{PATH}"
|
|
|
|
RAW_GITHUB = "https://raw.githubusercontent.com/{PATH}"
|
|
|
|
|
|
|
|
# Logging
|
|
|
|
logging.basicConfig(level=logging.DEBUG)
|
|
|
|
LOGGER = logging.getLogger(__name__)
|
|
|
|
|
|
|
|
# GITHUB
|
|
|
|
USERNAME = os.getenv('GITHUB_USERNAME')
|
|
|
|
REPOSITORY = os.getenv('GITHUB_REPOSITORY')
|
|
|
|
|
2022-07-19 05:26:54 +00:00
|
|
|
# Check is DEV_MODE
|
|
|
|
DEVMODE = sys.argv[1] == "dev" if len(sys.argv) > 1 else False
|
2022-08-03 06:44:35 +00:00
|
|
|
BYPASS = sys.argv[2] == "bypass" if len(sys.argv) > 2 else False
|
|
|
|
SKIP_DOWNLOAD = sys.argv[3] == "skip_download" if len(sys.argv) > 3 else False
|
2022-07-19 05:26:54 +00:00
|
|
|
|
2022-07-06 19:35:44 +00:00
|
|
|
# ENV
|
|
|
|
ENVKEY = [
|
|
|
|
"AVATAR",
|
|
|
|
"SKILLDEPOT",
|
|
|
|
"SKILLS",
|
|
|
|
"TALENTS",
|
|
|
|
"ARTIFACTS",
|
|
|
|
"WEAPONS",
|
|
|
|
"FIGHT_PROPS",
|
2022-07-18 19:03:33 +00:00
|
|
|
"NAMECARDS",
|
2022-08-03 06:44:35 +00:00
|
|
|
"ARTIFACTS_SETS",
|
|
|
|
"COSTUME"
|
2022-07-06 19:35:44 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
LANGS = {}
|
|
|
|
DATA = {}
|
|
|
|
SKILLS_DEPOT = {}
|
|
|
|
|
|
|
|
async def create_lang(data: dict, filename: str = "", has_key_name_hash: bool = True):
|
|
|
|
DATA = {}
|
|
|
|
for key in data:
|
|
|
|
hash_map = str(data[key]["nameTextMapHash"])
|
|
|
|
hashKey = key if not has_key_name_hash else hash_map
|
|
|
|
|
|
|
|
for lang in LANGS:
|
|
|
|
if hash_map in LANGS[lang]:
|
|
|
|
if hashKey not in DATA:
|
|
|
|
DATA[hashKey] = {}
|
|
|
|
DATA[hashKey][lang] = LANGS[lang][hash_map]
|
|
|
|
else:
|
|
|
|
if hash_map not in DATA:
|
|
|
|
DATA[hashKey] = {}
|
|
|
|
DATA[hashKey][lang] = ""
|
|
|
|
|
2022-07-12 18:31:33 +00:00
|
|
|
with open(os.path.join("exports", "langs", filename), "w", encoding="utf-8") as f:
|
2022-07-06 19:35:44 +00:00
|
|
|
f.write(json.dumps(DATA, ensure_ascii=False, indent=4))
|
|
|
|
|
|
|
|
async def main():
|
2022-07-07 08:53:31 +00:00
|
|
|
EXPORT_DATA = {}
|
|
|
|
|
2022-07-06 19:35:44 +00:00
|
|
|
LOGGER.debug(f"Fetching commits from GitHub [{USERNAME}/{REPOSITORY}]")
|
|
|
|
response = await request(GITHUB.format(PATH=f"repos/{USERNAME}/{REPOSITORY}/commits"))
|
|
|
|
|
|
|
|
# Check SHA of last commit
|
|
|
|
LOGGER.debug(f"Checking last commit on GitHub...")
|
|
|
|
if len(response) > 0:
|
|
|
|
last_commit = response[0]["sha"]
|
2022-07-07 09:04:32 +00:00
|
|
|
last_message = response[0]["commit"]["message"]
|
2022-07-06 19:35:44 +00:00
|
|
|
LOGGER.debug(f"Last commit on GitHub: {last_commit}")
|
|
|
|
else:
|
|
|
|
LOGGER.debug("No commits found on GitHub...")
|
|
|
|
last_commit = ""
|
|
|
|
|
|
|
|
LOGGER.debug(f"Checking last commit on local...")
|
|
|
|
last_commit_local = await load_commit_local()
|
2022-08-03 06:44:35 +00:00
|
|
|
if last_commit_local == last_commit and not BYPASS :
|
2022-07-06 19:35:44 +00:00
|
|
|
LOGGER.debug(f"Not updated... exiting...")
|
|
|
|
return
|
|
|
|
|
|
|
|
LOGGER.debug(f"New commit found on GitHub")
|
|
|
|
|
2022-08-03 06:44:35 +00:00
|
|
|
if not SKIP_DOWNLOAD:
|
|
|
|
for key in ENVKEY:
|
|
|
|
filename = os.getenv(key)
|
|
|
|
if not filename:
|
|
|
|
LOGGER.error(f"{key} not found in .env")
|
|
|
|
continue
|
2022-07-06 19:35:44 +00:00
|
|
|
|
2022-08-03 06:44:35 +00:00
|
|
|
await download_json(
|
|
|
|
url=RAW_GITHUB.format(PATH=f"{USERNAME}/{REPOSITORY}/master/{os.getenv('FOLDER')}/{filename}"),
|
|
|
|
filename=filename,
|
|
|
|
path=os.path.join("raw", "data")
|
|
|
|
)
|
2022-07-06 19:35:44 +00:00
|
|
|
|
2022-07-07 09:04:32 +00:00
|
|
|
await asyncio.sleep(1)
|
2022-07-06 19:35:44 +00:00
|
|
|
|
2022-08-03 06:44:35 +00:00
|
|
|
if not SKIP_DOWNLOAD:
|
|
|
|
langPath = await request(GITHUB.format(PATH=f"repos/{USERNAME}/{REPOSITORY}/contents/{os.getenv('LANG_FOLDER')}"))
|
|
|
|
for lang in langPath:
|
|
|
|
await download_json(
|
|
|
|
url=lang["download_url"],
|
|
|
|
filename=lang["name"],
|
|
|
|
path=os.path.join("raw", "langs")
|
|
|
|
)
|
2022-07-06 19:35:44 +00:00
|
|
|
|
|
|
|
# Load langs
|
2022-07-12 18:31:33 +00:00
|
|
|
for lang in os.listdir(os.path.join("raw", "langs")):
|
2022-07-07 08:53:31 +00:00
|
|
|
if lang.endswith(".json"):
|
2022-07-12 18:31:33 +00:00
|
|
|
with open(os.path.join("raw", "langs", lang), "r", encoding="utf-8") as f:
|
2022-07-07 08:53:31 +00:00
|
|
|
_lang = lang.split(".")[0].replace("TextMap", "")
|
|
|
|
LOGGER.debug(f"Loading lang ({_lang})...")
|
|
|
|
LANGS[_lang] = json.loads(f.read())
|
2022-07-06 19:35:44 +00:00
|
|
|
|
|
|
|
# Load data
|
|
|
|
for data in os.listdir(os.path.join("raw", "data")):
|
2022-07-07 08:53:31 +00:00
|
|
|
if data.endswith(".json"):
|
|
|
|
with open(os.path.join("raw", "data", data), "r", encoding="utf-8") as f:
|
|
|
|
_key = data.split(".")[0]
|
|
|
|
LOGGER.debug(f"Loading data ({_key})...")
|
|
|
|
DATA[data.split(".")[0]] = json.loads(f.read())
|
2022-07-06 19:35:44 +00:00
|
|
|
|
|
|
|
# Load skills data
|
|
|
|
for skillData in DATA["AvatarSkillExcelConfigData"]:
|
|
|
|
LOGGER.debug(f"Getting skill data {skillData['id']}...")
|
|
|
|
if skillData["skillIcon"] == "":
|
|
|
|
LOGGER.debug(f"Skill {skillData['id']} has no icon... Skipping...")
|
|
|
|
continue
|
|
|
|
|
2022-07-07 08:53:31 +00:00
|
|
|
if not "skills" in EXPORT_DATA:
|
|
|
|
EXPORT_DATA["skills"] = {}
|
|
|
|
|
|
|
|
EXPORT_DATA["skills"][skillData["id"]] = {
|
2022-07-06 19:35:44 +00:00
|
|
|
"nameTextMapHash": skillData["nameTextMapHash"],
|
|
|
|
"skillIcon": skillData["skillIcon"],
|
|
|
|
"costElemType": skillData.get("costElemType", ""),
|
|
|
|
}
|
|
|
|
|
|
|
|
# Load constellations
|
|
|
|
for talent in DATA["AvatarTalentExcelConfigData"]:
|
|
|
|
LOGGER.debug(f"Getting constellations {talent['talentId']}...")
|
2022-07-07 08:53:31 +00:00
|
|
|
|
|
|
|
if not "constellations" in EXPORT_DATA:
|
|
|
|
EXPORT_DATA["constellations"] = {}
|
2022-07-06 19:35:44 +00:00
|
|
|
|
2022-07-07 08:53:31 +00:00
|
|
|
EXPORT_DATA["constellations"][talent["talentId"]] = {
|
2022-07-06 19:35:44 +00:00
|
|
|
"nameTextMapHash": talent["nameTextMapHash"],
|
|
|
|
"icon": talent["icon"]
|
|
|
|
}
|
|
|
|
|
|
|
|
# Load artifacts
|
|
|
|
for artifact in DATA["ReliquaryExcelConfigData"]:
|
|
|
|
LOGGER.debug(f"Getting artifact {artifact['id']}...")
|
|
|
|
|
2022-07-07 08:53:31 +00:00
|
|
|
if not "artifacts" in EXPORT_DATA:
|
|
|
|
EXPORT_DATA["artifacts"] = {}
|
|
|
|
|
|
|
|
EXPORT_DATA["artifacts"][artifact["id"]] = {
|
2022-07-06 19:35:44 +00:00
|
|
|
"nameTextMapHash": artifact["nameTextMapHash"],
|
|
|
|
"itemType": artifact["itemType"],
|
|
|
|
"equipType": artifact["equipType"],
|
|
|
|
"icon": artifact["icon"],
|
|
|
|
"rankLevel": artifact["rankLevel"],
|
|
|
|
"mainPropDepotId": artifact["mainPropDepotId"],
|
|
|
|
"appendPropDepotId": artifact["appendPropDepotId"],
|
|
|
|
}
|
2022-07-18 19:03:33 +00:00
|
|
|
|
|
|
|
# Load artifacts sets
|
|
|
|
for artifactSet in DATA["EquipAffixExcelConfigData"]:
|
2022-07-19 05:23:09 +00:00
|
|
|
LOGGER.debug(f"Getting artifact set {artifactSet['affixId']}...")
|
2022-07-18 19:03:33 +00:00
|
|
|
if not "artifact_sets" in EXPORT_DATA:
|
|
|
|
EXPORT_DATA["artifact_sets"] = {}
|
|
|
|
|
2022-07-19 05:50:53 +00:00
|
|
|
if artifactSet["openConfig"].startswith("Relic_") or \
|
|
|
|
artifactSet["openConfig"].startswith("Relci_"):
|
2022-07-19 05:23:09 +00:00
|
|
|
EXPORT_DATA["artifact_sets"][artifactSet["affixId"]] = {
|
2022-07-18 19:03:33 +00:00
|
|
|
"affixId": artifactSet["affixId"],
|
|
|
|
"nameTextMapHash": artifactSet["nameTextMapHash"],
|
|
|
|
}
|
2022-07-07 08:53:31 +00:00
|
|
|
|
2022-07-06 19:35:44 +00:00
|
|
|
# Load weapons
|
|
|
|
for weapon in DATA["WeaponExcelConfigData"]:
|
|
|
|
LOGGER.debug(f"Getting weapon {weapon['id']}...")
|
|
|
|
|
2022-07-07 08:53:31 +00:00
|
|
|
if not "weapons" in EXPORT_DATA:
|
|
|
|
EXPORT_DATA["weapons"] = {}
|
|
|
|
|
|
|
|
EXPORT_DATA["weapons"][weapon["id"]] = {
|
2022-07-06 19:35:44 +00:00
|
|
|
"nameTextMapHash": weapon["nameTextMapHash"],
|
|
|
|
"icon": weapon["icon"],
|
|
|
|
"awakenIcon": weapon["awakenIcon"],
|
|
|
|
"rankLevel": weapon["rankLevel"]
|
|
|
|
}
|
|
|
|
|
|
|
|
# Load namecard
|
|
|
|
for namecard in filter(lambda a: "materialType" in a and a["materialType"] == "MATERIAL_NAMECARD", DATA["MaterialExcelConfigData"]):
|
|
|
|
LOGGER.debug(f"Getting namecard {namecard['id']}...")
|
|
|
|
|
2022-07-07 08:53:31 +00:00
|
|
|
if not "namecards" in EXPORT_DATA:
|
|
|
|
EXPORT_DATA["namecards"] = {}
|
|
|
|
|
|
|
|
EXPORT_DATA["namecards"][namecard["id"]] = {
|
2022-07-06 19:35:44 +00:00
|
|
|
"nameTextMapHash": namecard["nameTextMapHash"],
|
|
|
|
"icon": namecard["icon"],
|
|
|
|
"picPath": namecard["picPath"],
|
|
|
|
"rankLevel": namecard["rankLevel"],
|
|
|
|
"materialType": namecard["materialType"],
|
|
|
|
}
|
|
|
|
|
|
|
|
# Load fight props
|
|
|
|
for fight_prop in filter(lambda a: a['textMapId'].startswith("FIGHT_PROP"), DATA["ManualTextMapConfigData"]):
|
|
|
|
LOGGER.debug(f"Getting FIGHT_PROP {fight_prop['textMapId']}...")
|
2022-07-07 08:53:31 +00:00
|
|
|
|
2022-07-12 18:33:21 +00:00
|
|
|
if not "fight_props" in EXPORT_DATA:
|
|
|
|
EXPORT_DATA["fight_props"] = {}
|
2022-07-07 08:53:31 +00:00
|
|
|
|
2022-07-12 18:33:21 +00:00
|
|
|
EXPORT_DATA["fight_props"][fight_prop["textMapId"]] = {
|
2022-07-06 19:35:44 +00:00
|
|
|
"nameTextMapHash": fight_prop["textMapContentTextMapHash"],
|
|
|
|
}
|
|
|
|
|
|
|
|
# Prepare data (Create language)
|
|
|
|
for skillDepot in DATA["AvatarSkillDepotExcelConfigData"]:
|
|
|
|
LOGGER.debug(f"Getting skill depot: {skillDepot['id']}...")
|
|
|
|
SKILLS_DEPOT[skillDepot["id"]] = skillDepot
|
2022-07-07 08:53:31 +00:00
|
|
|
|
2022-08-03 06:44:35 +00:00
|
|
|
# Characters costumes
|
2022-08-22 09:56:29 +00:00
|
|
|
_key = {
|
|
|
|
"costumeId": "",
|
|
|
|
"iconName": ""
|
|
|
|
}
|
2022-08-03 06:44:35 +00:00
|
|
|
for costume in DATA["AvatarCostumeExcelConfigData"]:
|
2022-08-22 09:56:29 +00:00
|
|
|
if _key["costumeId"] == "" or _key["iconName"] == "":
|
|
|
|
# Find key costumeId
|
|
|
|
LOGGER.debug("Find key 'costumeId' and 'iconName'")
|
|
|
|
for key in costume:
|
|
|
|
_valstr = str(costume[key])
|
|
|
|
if _valstr.startswith("2") and len(_valstr) == 6:
|
|
|
|
LOGGER.debug(f"Get key 'costumeId' is: {key}")
|
|
|
|
_key["costumeId"] = key
|
|
|
|
continue
|
|
|
|
|
|
|
|
if _valstr.startswith("UI_AvatarIcon_"):
|
|
|
|
LOGGER.debug(f"Get key 'iconName' is: {key}")
|
|
|
|
_key["iconName"] = key
|
|
|
|
continue
|
|
|
|
|
|
|
|
LOGGER.debug(f"Getting character costume: {costume[_key['costumeId']]}...")
|
2022-08-03 06:44:35 +00:00
|
|
|
if not "costumes" in EXPORT_DATA:
|
|
|
|
EXPORT_DATA["costumes"] = {}
|
|
|
|
|
2022-08-22 09:56:29 +00:00
|
|
|
if not _key['iconName'] in costume:
|
|
|
|
LOGGER.debug(f"Character costume {costume[_key['costumeId']]} has no data... Skpping...")
|
2022-08-03 06:44:35 +00:00
|
|
|
continue
|
|
|
|
|
2022-08-22 09:56:29 +00:00
|
|
|
EXPORT_DATA["costumes"][costume[_key['costumeId']]] = {
|
|
|
|
"iconName": costume[_key['iconName']],
|
2022-08-03 06:44:35 +00:00
|
|
|
"sideIconName": costume["sideIconName"],
|
|
|
|
"nameTextMapHash": costume["nameTextMapHash"],
|
|
|
|
}
|
|
|
|
|
2022-07-06 19:35:44 +00:00
|
|
|
# Link data (Avatar)
|
|
|
|
for avatar in DATA["AvatarExcelConfigData"]:
|
|
|
|
AVATAR = {}
|
|
|
|
LOGGER.debug(f"Processing {avatar['id']}...")
|
2022-08-22 09:56:29 +00:00
|
|
|
if avatar["skillDepotId"] == 101 or \
|
2022-07-18 19:03:33 +00:00
|
|
|
avatar["iconName"].endswith("_Kate") or \
|
|
|
|
str(avatar['id'])[:2] == "11": # 11 is test character mode
|
2022-07-06 19:35:44 +00:00
|
|
|
LOGGER.debug(f"Skipping {avatar['id']}...")
|
|
|
|
continue
|
|
|
|
|
2022-08-03 06:44:35 +00:00
|
|
|
if not "characters" in EXPORT_DATA:
|
|
|
|
EXPORT_DATA["characters"] = {}
|
|
|
|
|
2022-07-06 19:35:44 +00:00
|
|
|
AVATAR.update({
|
|
|
|
"nameTextMapHash": avatar["nameTextMapHash"],
|
|
|
|
"iconName": avatar["iconName"],
|
|
|
|
"sideIconName": avatar["sideIconName"],
|
|
|
|
"qualityType": avatar["qualityType"],
|
|
|
|
"costElemType": "",
|
|
|
|
"skills": [],
|
2022-08-03 06:44:35 +00:00
|
|
|
"talents": []
|
2022-07-06 19:35:44 +00:00
|
|
|
})
|
2022-07-17 19:05:06 +00:00
|
|
|
|
2022-08-03 06:44:35 +00:00
|
|
|
if avatar["iconName"].endswith("_PlayerBoy") or \
|
|
|
|
avatar["iconName"].endswith("_PlayerGirl"):
|
|
|
|
LOGGER.debug("Getting skill (candSkillDepotIds): {}...".format(avatar["candSkillDepotIds"]))
|
2022-07-06 19:35:44 +00:00
|
|
|
|
2022-08-03 06:44:35 +00:00
|
|
|
for cand_depot in avatar["candSkillDepotIds"]:
|
2022-07-06 19:35:44 +00:00
|
|
|
AVATAR.update({
|
2022-08-03 06:44:35 +00:00
|
|
|
"skills": [],
|
|
|
|
"talents": []
|
2022-07-06 19:35:44 +00:00
|
|
|
})
|
|
|
|
|
2022-08-03 06:44:35 +00:00
|
|
|
depot = SKILLS_DEPOT.get(cand_depot)
|
|
|
|
if depot and depot["id"] != 101:
|
|
|
|
for skill in depot["skills"]:
|
|
|
|
if skill <= 0:
|
|
|
|
continue
|
2022-07-06 19:35:44 +00:00
|
|
|
|
2022-08-03 06:44:35 +00:00
|
|
|
AVATAR["skills"].append(skill)
|
2022-07-07 08:53:31 +00:00
|
|
|
|
2022-08-22 09:56:29 +00:00
|
|
|
energry = EXPORT_DATA["skills"].get(depot.get("energySkill"))
|
|
|
|
|
|
|
|
if energry:
|
|
|
|
LOGGER.debug(f"Getting skills element {depot.get('energySkill')}")
|
|
|
|
AVATAR.update({
|
|
|
|
"costElemType": energry["costElemType"]
|
|
|
|
})
|
|
|
|
AVATAR["skills"].append(int(depot.get('energySkill')))
|
|
|
|
|
2022-08-03 06:44:35 +00:00
|
|
|
AVATAR.update({
|
2022-08-22 09:56:29 +00:00
|
|
|
"talents": [x for x in depot["talents"] if x > 0],
|
2022-08-03 06:44:35 +00:00
|
|
|
})
|
|
|
|
|
2022-08-22 09:56:29 +00:00
|
|
|
EXPORT_DATA["characters"][str(avatar["id"]) + "-" + str(depot["id"])] = AVATAR.copy()
|
2022-08-03 07:21:34 +00:00
|
|
|
|
|
|
|
AVATAR.update({
|
|
|
|
"skills": [],
|
|
|
|
"talents": []
|
|
|
|
})
|
|
|
|
|
|
|
|
EXPORT_DATA["characters"][str(avatar["id"])] = AVATAR.copy()
|
|
|
|
|
2022-08-03 06:44:35 +00:00
|
|
|
else:
|
|
|
|
LOGGER.debug(f"Getting skills {avatar['skillDepotId']}")
|
|
|
|
depot = SKILLS_DEPOT.get(avatar["skillDepotId"])
|
|
|
|
if depot and depot["id"] != 101:
|
|
|
|
for skill in depot["skills"]:
|
|
|
|
if skill <= 0:
|
|
|
|
continue
|
|
|
|
|
|
|
|
AVATAR["skills"].append(skill)
|
|
|
|
|
|
|
|
energry = EXPORT_DATA["skills"].get(depot.get("energySkill"))
|
|
|
|
|
|
|
|
if energry:
|
|
|
|
LOGGER.debug(f"Getting skills element {depot.get('energySkill')}")
|
|
|
|
AVATAR.update({
|
|
|
|
"costElemType": energry["costElemType"]
|
|
|
|
})
|
|
|
|
AVATAR["skills"].append(int(depot.get('energySkill')))
|
|
|
|
|
|
|
|
|
|
|
|
AVATAR.update({
|
|
|
|
"talents": [x for x in depot["talents"] if x > 0],
|
|
|
|
})
|
2022-07-06 19:35:44 +00:00
|
|
|
|
2022-08-03 06:44:35 +00:00
|
|
|
EXPORT_DATA["characters"][avatar["id"]] = AVATAR
|
2022-07-07 08:53:31 +00:00
|
|
|
|
|
|
|
LOGGER.debug("Exporting data...")
|
|
|
|
for key in EXPORT_DATA:
|
|
|
|
_delKey = []
|
|
|
|
if key == "skills":
|
|
|
|
_delKey.append("costElemType")
|
|
|
|
|
|
|
|
LOGGER.debug(f"Exporting {key}...")
|
|
|
|
await save_data(EXPORT_DATA[key], f"{key}.json", _delKey)
|
2022-07-12 18:33:21 +00:00
|
|
|
await create_lang(EXPORT_DATA[key], f"{key}.json", False if key in ["fight_props"] else True)
|
2022-07-06 19:35:44 +00:00
|
|
|
|
2022-07-12 17:57:13 +00:00
|
|
|
# Push to github
|
2022-07-19 05:26:54 +00:00
|
|
|
if not DEVMODE:
|
|
|
|
await push_to_github(f"""{last_message}
|
|
|
|
- SHA: {last_commit}
|
|
|
|
- URL: {GITHUB_SITE.format(PATH=f"{USERNAME}/{REPOSITORY}/commit/{last_commit}")}
|
|
|
|
""")
|
2022-07-06 19:35:44 +00:00
|
|
|
|
2022-07-12 17:55:27 +00:00
|
|
|
# Save lastest commit
|
|
|
|
LOGGER.debug(f"Saving lastest commit...")
|
|
|
|
await save_commit_local(last_commit)
|
2022-07-06 19:35:44 +00:00
|
|
|
|
2022-07-12 17:55:27 +00:00
|
|
|
LOGGER.debug(f"Done!")
|
2022-07-06 19:35:44 +00:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
loop = asyncio.get_event_loop()
|
|
|
|
loop.run_until_complete(main())
|