SimHoc/SimHoc.py

42 lines
1.4 KiB
Python
Raw Normal View History

2024-08-15 01:10:18 +00:00
import os, player, time, skillContests, random, itertools, json
from cohost.models.user import User
from cohost.models.block import AttachmentBlock, MarkdownBlock
from attributes import normalDis
2022-01-11 18:50:30 +00:00
from hocTests import AttributeTest, TestGame
2022-01-11 17:29:18 +00:00
from hocUtils import RinkGraph
2024-08-15 01:10:18 +00:00
from player import Player
2022-01-11 17:29:18 +00:00
2024-08-15 01:10:18 +00:00
def auzh():
"""
returns login cookie
"""
with open("./Data/auth.txt", "r") as file:
return file.readline().strip()
2022-01-11 17:29:18 +00:00
2022-01-02 17:07:55 +00:00
if __name__ == "__main__":
#for name in ["Vivi", "Artemis", "Laika", "Sharks", "Dragons", "Melua", "Sabriina", "Jorts (Buttered)", "Jorts (Unbuttered)"]:
# plyr = player.Player(name)
# print(f"{name}:")
# for atr in plyr.attributes:
# print(atr)
# print("----------")
2024-08-15 01:10:18 +00:00
#g = TestGame()
#g.faceoffTest()
cookie = auzh()
user = User.loginWithCookie(cookie)
project = user.getProject('ashl')
#zhisPlayer = Player("Abyss",16)
#blocks = [MarkdownBlock("Testing new version of API shares")]
#newPost = project.post('', blocks, tags=['dont make fun of me', 'zis is hard'], shareOfPostId=7294245)
#blocks = [
#AttachmentBlock('pybug.png'), # References image file pybug.png
#MarkdownBlock(zhisPlayer.statsString()) # Example of markdown / text block
#MarkdownBlock("did i break not-shares?")
#]
#newPost = project.post('', blocks, tags=['nope good job'])