Installation: If you are on Windows: install Python2.7 from here.
Put the script in any folder you like. Let's say, inside C:\Python27\ itself. Open up cmd, go to this folder with: cd C:\Python27 and first run pip install requests pip install beautifulsoup4 pip install fuzzywuzzy pip install python-Levenshtein
After pip installs these libraries you can run the script: python fish_ladder.py
Other commands: python fish_ladder.py -pls <-- gives alphabetically sorted list of all known BW players python fish_ladder.py -t 10 <-- gives you top 10 fish ladder ranking with fish ids revealed. python fish_ladder.py -p Sea <-- gives you all fish ids for "Sea" and also stats for each fish id. python fish_ladder.py -p moksaeggi <-- tells you who is it given the fish id, can be lowecase or uppercase. python fish_ladder.py -u <-- fetch the recent stats and player names from fish and tl.wiki.
The simplest GUI version, for all those who prefer a mouse. To run, just double-click on the file.
On March 24 2016 04:51 Shield wrote: Nice! How did you convert data into json? Was it just BeautifulSoup?
Json can save/load python dict without any problems json.dump(dictionary).
Yes, I use BeautifulSoup to scap data from web pages and create a two dictionaries that are dumped with json into json files. This is done to speed up things. When run first time, the script queries tl.wiki and fish server web pages, creates dictionaries and saves them as jsons on disk. Next time when you start it, it uses these files. In order to update the files you need to python2 fish_ladder.py -u.
On March 24 2016 05:09 toriak wrote: nice does it auto update ? shared IDs might lead to crashes tho
No, you need to do it manually python2 fish_ladder.py -u because quering web sites each time takes time, especially fish server, even a few secs is annoying.
Yes, if somebody decides to change tl.wiki page or fish page and renames html elements the script will surely crash. But as long as the player lists are updated with new entries only, it will work just all right. The more nicknames we have on tl.wiki the better fish ladder will be decoded. Having saved jsons on disk, protects you from pulling malformed data after all.
On March 24 2016 15:52 toriak wrote: where to write that commands ? do i need to use python ?
Yes, if you are on Windows: install Python2.7 from here.
Put the script in any folder you like. Let's say, inside C:\Python27\ itself. Open up cmd, go to this folder with: cd C:\Python27 and first run pip install requests pip install beautifulsoup4
After pip installs these libraries you can run the script: python fish_ladder.py
Other commands: python fish_ladder.py -pls <-- gives alphabetically sorted list of all known BW players python fish_ladder.py -t 10 <-- gives you top 10 fish ladder ranking with fish ids revealed. python fish_ladder.py -p Sea <-- gives you all fish ids for "Sea" and also stats for each fish id. python fish_ladder.py -p moksaeggi <-- tells you who is it given the fish id, can be lowecase or uppercase. python fish_ladder.py -u <-- fetch the recent stats and player names from fish and tl.wiki.
I would recommend to use Google Docs(Spread Sheet). Easy to excess for anyone. less difficulty of organizing players' aka and stats, and so on.
I also realized that Marcin Nowak did this before on August 20th, 2015. Updating this spread sheet every once a week sounds okay to me(a few people should have access with this changes).
If people would agree with this previous idea that had used, I'll make and do it for y'all.
i worked with soemthing similiar for iccup in the past. Idea was to check my opponent stats in a game. Like best rank with stats, and current stats (iccup only shows rank). This often works but not always, you can check it in 1/1 games , after 2 minutes in a game with just /stat command. Could you do something similiar for a iccup?
@LaStScan Yes, for the sake of simplicity you can use google docs. Google docs approach is good for fish id revealing only. However, I want to have the latest info on each player and see what they were doing during the week by accessing fish ladder stats. Also, it is just faster than to look through the list.
@mca64Launcher_ If you need the same thing that fish_ladder.py does but for iccup then it is possible. I am not familiar how you can do this in the game though. And looks like this is what you mean.
I can write a GUI for the script but only if I am sure that there are enough ppl who will actually use it. Right now, scripts are good enough ;D
On March 25 2016 16:49 mca64Launcher_ wrote: Problem with this is that you are using python. Users dont likes install extra stuff. Should be all just native, just click and use.
Yes, unfortunately using scripts is still a skill of an advanced user (thank you Windows). Python is as cross platform as possible these days. If you mean "exe" file, I am not really into that stuff, it just requires more work.