alexander-pick / MKMTool

MKMTool ist a helper application I wrote for tinkering around with optimization of sale processes on magiccardmarket.eu and the idea of automisation of some tasks most people wouldn’t be able to get done by pure manpower.
GNU Affero General Public License v3.0
65 stars 15 forks source link

Customizable update #4

Closed tomasjanak closed 6 years ago

tomasjanak commented 6 years ago

Hello, I have tried to use MKMTool, but the algorithm for updating prices often led to results I didn't want, mainly when there's one person with a weird price (either too high or too low), so I thought about doing some changes. It ended up in this "customizable price update". I added a window with various settings the user can change in the price updating algorithm - taking average from different number than 4, setting maximal allowed price change, some way to get rid of outliers etc. - you can see description in the readme and in general try it out from my fork (https://github.com/tomasjanak/MKMTool/tree/customizableUpdate) before deciding if you want to accept it. For now, I have kept it in a different branch anyway. There is also a way to save and load the settings to/from file, so it can easily be shared with other people. I have originally planned to prepare several different setting presets, but I will probably not, at least not for a while, so there is just one that shows some possible reasonable setting (+ the default one, which is just the way your algorithm behaved before). Hopefully somebody will start using it, play with it and come up with some perfect settings :) I also took the liberty of fixing a few bugs - your own items are no longer counted when computing the price; when item that is not a single card is iterated over, the price update no longer generates an exception. I have restructured the code a bit, just moving some inherently static methods from MKMBot to MKMHelpers. I hope I have managed to make all the GUI controls, files and API communication independent on the locale - I tried changing my decimal separator in Windows between '.' and ',' and everything seemed to be working for both cases, but maybe there is something I didn't think about. As you can probably tell, I am not exactly a GUI designer, so feel free to make changes. BTW, I tried to make a packaged release, but there seems to be some problem with the Sql update and in Release mode it always crashes at the start unless I copy the mkmtool.sqlite database to the Release folder. It's a bit strange because in Debug there was no problem, only in Release. If I understand correctly, it's still work in progress, so I didn't touch it for now. I bumped the version number to 0.6 since a new relatively large feature has been added, but if you have different rules for versioning, change it as you like. Let me know if there is something missing / unclear or anything.

Best Regards, Tomas

alexander-pick commented 6 years ago

Very nice contribution, thank you!

alexander-pick commented 6 years ago

I just tested it a bit, that is a very nice contribution. I fixed the issue with the sqlite, it isn't created properly as the bot new in the MainView.cs was too early. First the auth info needs to be present or the initial population of the inventory will fail.