I have been working on a small script in Python for some time now and I think some people would appreciate.
I have always, from when I first started playing osu, wanted to be up-to-date with all of the new maps that are available.
Keeping up with the beatmap packs is a bit of a hassle, and somehow people are still having issues with them.
What I've made is a auto-downloader that works through Bloodcat (my favorite beatmap mirror).
Just a quick explanation as to what it does.
I know the code isn't pretty or the best. I'm still learning Python, but it works on my side and wanted to share.
I've also gotten hold of the owner of bloodcat. "I'm very happy that people makes application with my site." -방성환
I just wanted to get the ok from the owner before posting the code for everyone to use.
Downloads
One thing you will need before running this script is either Python 2.7 or 3.4.
The current version of both are 2.7.8 and 3.4.1.
Now for the script.
The code for Python 2.7 can be either viewed of downloaded from here.
The code for Python 3.4 can be either viewed of downloaded from here.
This only includes the auto-download.py file. The Recent.num file will be created when you finish a download.
I am trying to learn how to make a GUI for it. I will update this page if/when I ever get finished with it.
I hope you enjoy it.
P.S.: Once started, you can minimize the window. It will run in the background and beep if there are any errors.
P.P.S.: As of Aug. 14, 2014, I've been taking my Advanced Systems Project class and started making a GUI application in Java. I will be learning more in depth about GUIs in the next few months.
Updates
I have always, from when I first started playing osu, wanted to be up-to-date with all of the new maps that are available.
Keeping up with the beatmap packs is a bit of a hassle, and somehow people are still having issues with them.
What I've made is a auto-downloader that works through Bloodcat (my favorite beatmap mirror).
Just a quick explanation as to what it does.
SPOILER
Upon starting the script, it asks where you would like to download the beatmaps to.
If you used my program before this update, it will compare the JSON info with the Recent.num file.
Once finished with the check and/or downloads, it will delete the Recent.num file, and save using the Recent.json file.
After all downloads are finished, it will then update Recent.json file again.
It will wait 5 minutes, then check the JSON data again in an endless loop until the command window is closed.
There is a 5 second timeout for checking the JSON data and a 5 minute timeout for downloads. If a timeout were to occur, the program will beep, wait 5 seconds and attempt to connect again.
If there are 5 failed attempts or more in a row, it will wait 5 minutes before trying again.
- This could be your downloads file, songs folder, anywhere on your computer.
- It will continue saving files this way until you close and reopen the script.
I just decided to add this option. Not really useful, but gives you an option.
Notice, not all songs use unicode characters.
If you used my program before this update, it will compare the JSON info with the Recent.num file.
Once finished with the check and/or downloads, it will delete the Recent.num file, and save using the Recent.json file.
- The Recent.json file contains the JSON data for the songs.
If you just updated to the newest version, it will check with the older Recent.num file, delete this and remake it as a Recent.json file instead.
If Recent.json doesn't exist, it will be created after the first download is complete, continue to update after every download, and update once more after all downloads are finished.
- Information about the song is displayed on the python command line as the download starts.
This will not cause the command line to pop-up. It's just to display more info if you just so happen to be looking at it.
Again, if Recent.json doesn't exists, it will download everything available, or if you have the older Recent.num file, it will check that first and replace the file with the newer Recent.json file.
A lot of these files seem to be updates to other songs already available.
After all downloads are finished, it will then update Recent.json file again.
It will wait 5 minutes, then check the JSON data again in an endless loop until the command window is closed.
There is a 5 second timeout for checking the JSON data and a 5 minute timeout for downloads. If a timeout were to occur, the program will beep, wait 5 seconds and attempt to connect again.
If there are 5 failed attempts or more in a row, it will wait 5 minutes before trying again.
- If connection errors still persist, the only thing I could think the problem would be that you cannot connect to bloodcat.com/osu/
If you can connect to bloodcat and still get errors, please message me the error message you are getting.
I know the code isn't pretty or the best. I'm still learning Python, but it works on my side and wanted to share.
I've also gotten hold of the owner of bloodcat. "I'm very happy that people makes application with my site." -방성환
I just wanted to get the ok from the owner before posting the code for everyone to use.
Downloads
One thing you will need before running this script is either Python 2.7 or 3.4.
The current version of both are 2.7.8 and 3.4.1.
Now for the script.
The code for Python 2.7 can be either viewed of downloaded from here.
The code for Python 3.4 can be either viewed of downloaded from here.
This only includes the auto-download.py file. The Recent.num file will be created when you finish a download.
I am trying to learn how to make a GUI for it. I will update this page if/when I ever get finished with it.
I hope you enjoy it.
P.S.: Once started, you can minimize the window. It will run in the background and beep if there are any errors.
P.P.S.: As of Aug. 14, 2014, I've been taking my Advanced Systems Project class and started making a GUI application in Java. I will be learning more in depth about GUIs in the next few months.
Updates
SPOILER
Mar. 9, 2016
- Fixed compatibility with updated JSON format from Bloodcat.
- Changed how itemInfo is displayed due to JSON change.
- Changed Recent.json formatting due to JSON change.
- Happy Miku Day! (i didn't plan on this, but o well)
Oct. 12, 2014
- Fixed error unicode in ASCII title.
- Use enumerate(to_download) instead of range(len(to_download))
(Just because i learned something new in python )
- Put beep method on two lines and a space.
(makes it easier to just edit what i have online instead of re-uploading the file and change the links here)
(mediafire kept changing the first tab as four spaces. Changed it to a space and it fixed this.)
Sep. 1, 2014
- Fixed error when updating code.
Aug. 27, 2014
- Slight download display.
(Shows song info only once.)
(Shows number of songs left to download (Ex. 2 of 5))
- Changed error messages to help with possible debugging.
- Changed and added functions.
Aug. 26, 2014
- Now checks 100 items
- Saves using JSON data in case of quick updates
- Added timeouts for connections and longer waits if multiple timeouts occur
- Added comments for anyone wanting to learn
- This may be my final python update. I am thinking of continuing this with Java.
June 6, 2014
- Fixed an issue displaying song info.
(bloodcat now stores all items as strings)
- Updated location to download Python. (new versions mentioned as well)
- Status code '8' added. For Qualified songs.
Apr. 27, 2014
- Fixed an issue trying to display the 'source' key.
(bloodcat no longer displays the source for the songs, which caused this issue)
Nov. 19, 2013
- I'll add my edits to this page in here.
- Added option to 2.7 code to save file with unicode characters.
- Uploaded 3.3 code.
- Change script explanation for added update.
- Fixed compatibility with updated JSON format from Bloodcat.
- Changed how itemInfo is displayed due to JSON change.
- Changed Recent.json formatting due to JSON change.
- Happy Miku Day! (i didn't plan on this, but o well)
Oct. 12, 2014
- Fixed error unicode in ASCII title.
- Use enumerate(to_download) instead of range(len(to_download))
(Just because i learned something new in python )
- Put beep method on two lines and a space.
(makes it easier to just edit what i have online instead of re-uploading the file and change the links here)
(mediafire kept changing the first tab as four spaces. Changed it to a space and it fixed this.)
Sep. 1, 2014
- Fixed error when updating code.
Aug. 27, 2014
- Slight download display.
(Shows song info only once.)
(Shows number of songs left to download (Ex. 2 of 5))
- Changed error messages to help with possible debugging.
- Changed and added functions.
Aug. 26, 2014
- Now checks 100 items
- Saves using JSON data in case of quick updates
- Added timeouts for connections and longer waits if multiple timeouts occur
- Added comments for anyone wanting to learn
- This may be my final python update. I am thinking of continuing this with Java.
June 6, 2014
- Fixed an issue displaying song info.
(bloodcat now stores all items as strings)
- Updated location to download Python. (new versions mentioned as well)
- Status code '8' added. For Qualified songs.
Apr. 27, 2014
- Fixed an issue trying to display the 'source' key.
(bloodcat no longer displays the source for the songs, which caused this issue)
Nov. 19, 2013
- I'll add my edits to this page in here.
- Added option to 2.7 code to save file with unicode characters.
- Uploaded 3.3 code.
- Change script explanation for added update.