Closed oschwab closed 7 years ago
That's exactly the sort of info I want to produce, but is way ahead of where I am. If you want to work them onto your fork, I'd be happy to pull.
Please have a look to the source code. https://gist.github.com/oschwab/44457ef480825ad1acb4a097ae45aa7c
We can discuss then how you see the thing :)
If you want to test it, put the py file on the root of dcss install folder.
Jealous, though I guess one day I'll be able to make my code as clean.
Suggest you simply add yours as a module, add an import, then we can run functions as required. Also avoids mixing in the code with the original two files, which I intend to rip apart and make into clean, functional code this weekend :0)
OK that's fine , there's just one point to fix later : morgue file parsing ; My actual strategy (reading file one by one and construct global stat from each read) or yours (concatenate the whole morgue in one file) ?
If we leave as-it-is then it means that morgue files might be parsed twice (maybe not really an issue).
Here's the plan on my side : I'll create a python class , that you can use from your side , or from my side in the main() of the py file.
Your way is best. I definitely want to parse one at a time, because then I can refer to specific stats -- Spellcasting in file 01 etc. -- but I just didn't/don't know how to. That's the only reason for the big concatenate. I was planning to learn how to make a "MorgueFiles" class and have each file be an object with a attribute for each menaingful stat. It's on my "to learn" list!
Just did it during my lunch break
https://github.com/oschwab/dcss-morgue-analyser/blob/master/dcss_morgue_analyser/death_stats.py
Files are integrated in fork. next step is to call them from main program.
Niiice. Unfortunately parenting took my weekend over and I didn't get a chance to do anything. Hoping I'll get to look in on this in the week.
Hi,
My own python script for stats can give me these information :
We could consider merging it into your project.