Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Commit

Permalink
improved formatting, basically finished.
Browse files Browse the repository at this point in the history
  • Loading branch information
soopyc committed Mar 23, 2020
1 parent 1f9bd40 commit fae250c
Show file tree
Hide file tree
Showing 16 changed files with 62 additions and 34 deletions.
73 changes: 47 additions & 26 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 15 additions & 8 deletions counter.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ def main():
parser.add_argument('-s', '--save-only',
help='Only get the comments and store them in the session pickle file.',
action='store_true')
parser.add_argument('-a', '--show-me-the-nerds',
help="SHOW ME THE SPAM SHOW ME THE NERD SHOW ME EVERYTHING SO I CAN ~~ruin~~ MY SANITY AAAAAAA",
action='store_true')
args = parser.parse_args()
# Run functions if yes
if args.delete_comments:
Expand Down Expand Up @@ -280,11 +283,15 @@ def check_time(oldt: int, newt: int, deadline: int = 172800):
)
sayfill(f"Elapsed time: {round(time() - t, 3)}s")
count += 1 # add one to the counter, woo hoo!
vote_alph = return_vote_item(i.text.lower(), stats["votes"]["alphs"])
vote = vote_alph[-1]
vote_alph = return_vote_item(i.text.lower(), stats["alphs"])
try:
vote = vote_alph[-1]
except:
pass
if stats['video']['publishTStamp'] + config['deadline'] < i.published_at.timestamp():
stats['votes']['deadlined'] += 1 # Deadlined vote doesn't count.
if len(vote_alph) != 0 and vote in config['alphs']:
# noinspection PyUnboundLocalVariable
if len(vote_alph) != 0 and vote in stats['alphs']:
stats['votes']['characters'][vote]['deadlined'] += 1 # Add 1 to the deadline count for the character
stats['votes']['characters'][vote]['total'] += 1 # Add 1 to the character's total vote count.
continue
Expand Down Expand Up @@ -362,11 +369,11 @@ def check_time(oldt: int, newt: int, deadline: int = 172800):
sayfill("CHARACTERS")
fchar = stats["votes"]["characters"] # (UNOFFICIAL) Final character count
for i in fchar:
sayfill(f"{fchar[i]}\t"
f'{Fore.WHI:{fchar[i]["total"]}\t}'
f'{Fore.GREEN}Valid:{fchar[i]["valid"]}\t'
f'{Fore.YELLOW}Shiny:{fchar[i]["shiny"]}\t'
f'{Fore.RED}Dead.L:{fchar[i]["deadlined"]}\t')
sayfill(f"{fchar[i]['name']}".ljust(15) +
f'{Fore.WHITE}:{fchar[i]["total"]}'.ljust(15) +
f'{Fore.GREEN}Valid:{fchar[i]["valid"]}'.ljust(20) +
f'{Fore.YELLOW}Shiny:{fchar[i]["shiny"]}'.ljust(20) +
f'{Fore.RED}Dead.L:{fchar[i]["deadlined"]}')
############################################################
# End session monitorings
requests.post(
Expand Down
Binary file added sessions/session_0b018de256a9ce2c858b.pickle
Binary file not shown.
Binary file added sessions/session_0e147bf1fb38099ae172.pickle
Binary file not shown.
Binary file added sessions/session_3593b716af32498b482a.pickle
Binary file not shown.
Binary file added sessions/session_69644d999903b029dbf8.pickle
Binary file not shown.
Binary file added sessions/session_894cfaa7d0bf1bb7d044.pickle
Binary file not shown.
Binary file added sessions/session_b656d034c38b69d7b8ef.pickle
Binary file not shown.
Binary file added sessions/session_b9408e0ddd6a56d14d27.pickle
Binary file not shown.
Binary file added sessions/session_bbb75e347c898b406769.pickle
Binary file not shown.
Binary file added sessions/session_bcacca86f3035c9aefd8.pickle
Binary file not shown.
Binary file added sessions/session_d40ddf36eadad3e9e0c3.pickle
Binary file not shown.
Binary file added sessions/session_d83614f97421969673cc.pickle
Binary file not shown.
Binary file added sessions/session_e336e2579321a8f1ffee.pickle
Binary file not shown.
Binary file added sessions/session_f1218990279b23fd00f6.pickle
Binary file not shown.
Binary file added sessions/session_f476430fd2f5bb819376.pickle
Binary file not shown.

0 comments on commit fae250c

Please sign in to comment.