Fic stats
\n") totalfics = [] totalwords = 0 for yearstats in full: for fic in yearstats["janfics"]: totalfics.append(fic) for fic in yearstats["febfics"]: totalfics.append(fic) for fic in yearstats["marfics"]: totalfics.append(fic) for fic in yearstats["aprfics"]: totalfics.append(fic) for fic in yearstats["mayfics"]: totalfics.append(fic) for fic in yearstats["junfics"]: totalfics.append(fic) for fic in yearstats["julfics"]: totalfics.append(fic) for fic in yearstats["augfics"]: totalfics.append(fic) for fic in yearstats["sepfics"]: totalfics.append(fic) for fic in yearstats["octfics"]: totalfics.append(fic) for fic in yearstats["novfics"]: totalfics.append(fic) for fic in yearstats["decfics"]: totalfics.append(fic) totalwords += yearstats["janwords"] totalwords += yearstats["febwords"] totalwords += yearstats["marwords"] totalwords += yearstats["aprwords"] totalwords += yearstats["maywords"] totalwords += yearstats["junwords"] totalwords += yearstats["julwords"] totalwords += yearstats["augwords"] totalwords += yearstats["sepwords"] totalwords += yearstats["octwords"] totalwords += yearstats["novwords"] totalwords += yearstats["decwords"] totalfics = sorted(list(dict.fromkeys(totalfics))) statspage.write("- \n
- Total fics: " + str(f"{len(totalfics):,}") + " \n
- Total words: " + str(f"{totalwords:,}") + " \n
" + str(year["words"]) + " words |
- \n")
for year in yearsum:
statspage.write("
- " + str(year["year"]) + ": " + str(f'{year["fics"]:,}') + " fic") if year["fics"] > 1: statspage.write("s") statspage.write(", " + str(f'{year["words"]:,}') + " words \n") statspage.write("
" + str(fandom["words"]) + " words |
- \n")
for fandom in fandomsum:
if fandom["words"] > 0:
statspage.write("
- " + str(fandom["name"]) + ": " + str(f'{fandom["fics"]:,}') + " fic") if fandom["fics"] > 1: statspage.write("s") statspage.write(", " + str(f'{fandom["words"]:,}') + " words \n") statspage.write("
" + str(yearstats["year"]) + " | \n") challengefics = len(sorted(list(dict.fromkeys(yearstats["challengefics"])))) exchangefics = len(sorted(list(dict.fromkeys(yearstats["exchangefics"])))) promptfics = len(sorted(list(dict.fromkeys(yearstats["promptfics"])))) unpromptedfics = len(sorted(list(dict.fromkeys(yearstats["unpromptedfics"])))) statspage.write("" + str(yearstats["unpromptedwords"]) + " wordsUnprompted: " + str(unpromptedfics) + " fic") if unpromptedfics > 1: statspage.write("s") statspage.write(", " + str(f'{yearstats["unpromptedwords"]:,}') + " words | \n") if challengefics > 0: statspage.write("" + str(yearstats["challengewords"]) + " wordsChallenges: " + str(challengefics) + " fic") if challengefics > 1: statspage.write("s") statspage.write(", " + str(f'{yearstats["challengewords"]:,}') + " words | \n") if exchangefics > 0: statspage.write("" + str(yearstats["exchangewords"]) + " wordsExchanges: " + str(exchangefics) + " fic") if exchangefics > 1: statspage.write("s") statspage.write(", " + str(f'{yearstats["exchangewords"]:,}') + " words | \n") if promptfics > 0: statspage.write("" + str(yearstats["promptwords"]) + " wordsPrompt events: " + str(promptfics) + " fic") if promptfics > 1: statspage.write("s") statspage.write(", " + str(f'{yearstats["promptwords"]:,}') + " words | \n") statspage.write("
---|
" + str(yearstats["year"]) + " | \n") for fandom in yearfandoms: if fandom["words"] > 0: statspage.write("" + str(fandom["words"]) + " words" + fandom["name"] + ": " + str(len(fandom["fics"])) + " fic") if len(fandom["fics"]) > 1: statspage.write("s") statspage.write(", " + str(f'{fandom["words"]:,}') + " words | \n") statspage.write("
---|
" + month["month"] + " | " + str(month["words"]) + " words" + month["month"] + ": " + str(month["fics"]) + " fic") if month["fics"] > 1: statspage.write("s") statspage.write(", " + str(f'{month["words"]:,}') + " words |
---|
With assistance from Charts.css. Colour scheme inexpertly taken from here.
\n