Fair warning: These scripts will muck around with your osu! database files, but only edit_collections will attempt to write anything back. If you're a bit paranoid, I would recommend making copies of the database files and working on those.
---
I've put together a small set of parsing tools for reading the osu! database files. These will allow you to transform the files' packed binary data into a human-readable JSON format.
You can find the repository here:
https://github.com/chudooder/osutools
You'll need python 2.7+ to run the scripts.
Files
dbparse.py: contains functions that take a string as input and return a Python dictionary containing the parsed information; the function names should be self-explanatory.
edit_collections.py is an interactive program that lets you add collections based on filters (see below for full usage instructions).
Other stuff:
augdata.py combines a scores json with a beatmaps json; transform.py turns this into a csv. mine.py does some extra field generating. This is for the included data visualizer.
stats.html (and its linked files) is a data visualization experiment using d3.js that shows your scores and progression as a player on two plots.
Collections Editor
Note that no changes are written back until the user calls save or quit (with confirmation).
Available commands:
help : lists these commands.
remove <index> : removes the collection from the list.
quit: prompts the user to save, then exits
save [fp] : saves the collections file. If there is a second argument, saves at that location.
list <index> : lists the beatmaps in the given collection.
add : adds a new collection to the list via additional prompts.
Adding filters:
Each filter is a field to search on, an operator, and a value. A beatmap will end up in the collection if it passes the conditions in all of the filters. Once you're done adding filters, type "done" to exit.
Available filters:
=, ==, !=, >, <, >=, and <= are self-explanatory. ? is "contains", which is useful for searching tags. !? is "does not contain".
---
I've put together a small set of parsing tools for reading the osu! database files. These will allow you to transform the files' packed binary data into a human-readable JSON format.
You can find the repository here:
https://github.com/chudooder/osutools
You'll need python 2.7+ to run the scripts.
Files
dbparse.py: contains functions that take a string as input and return a Python dictionary containing the parsed information; the function names should be self-explanatory.
edit_collections.py is an interactive program that lets you add collections based on filters (see below for full usage instructions).
Other stuff:
augdata.py combines a scores json with a beatmaps json; transform.py turns this into a csv. mine.py does some extra field generating. This is for the included data visualizer.
stats.html (and its linked files) is a data visualization experiment using d3.js that shows your scores and progression as a player on two plots.
Collections Editor
Note that no changes are written back until the user calls save or quit (with confirmation).
Available commands:
help : lists these commands.
remove <index> : removes the collection from the list.
quit: prompts the user to save, then exits
save [fp] : saves the collections file. If there is a second argument, saves at that location.
list <index> : lists the beatmaps in the given collection.
add : adds a new collection to the list via additional prompts.
Adding filters:
Each filter is a field to search on, an operator, and a value. A beatmap will end up in the collection if it passes the conditions in all of the filters. Once you're done adding filters, type "done" to exit.
Available filters:
- OD: overall difficulty
- AR: approach rate
- CS: circle size, or the number of keys in mania
- HP: hp drain
- DRAIN: drain time
- LENGTH: total song length
- STARS: star difficulty
- SLIDERV: slider velocity
- BPM: main beats per minute
- MINBPM: the minimum bpm of the song
- MAXBPM: the maximum bpm of the song
- MODE: the mode of the beatmap. 0=std, 1=taiko, 2=ctb, 3=mania
- OBJECTS: total number of hit objects in the song
- CIRCLES: total number of hit circles, or taiko circles, or fruits, or key hit things
- SLIDERS: total number of sliders or your regional equivalent
- SPINNERS: total number of spinners or your regional equivalent
- RANKED: is the map ranked? 1 if true
- ARTIST: the artist of the song
- TITLE: the title of the song (not the unicode one)
- DIFFNAME: the name of the song difficulty (Easy, Insane, Skystar...)
- CREATOR: the name of the beatmap creator
- TAGS: tags in the beatmap
- TOPRANK: the rank of the highest score personally achieved on the beatmap. F = not played, D, B, C, A, S, SS all work otherwise
- TOPCOMBO: the combo of the highest score personally achieved on the beatmap
- PASSES: number of times the beatmap was passed
=, ==, !=, >, <, >=, and <= are self-explanatory. ? is "contains", which is useful for searching tags. !? is "does not contain".