Le very basic osu! direct

Giuseppe Guerra d24ca02672 Add origin and mirror links to README 10 months ago
constants Initial commit 10 months ago
db Initial commit 10 months ago
objects Add tabs in default config file 10 months ago
utils Add game mode, ranked status and query filters 10 months ago
web Add /beatmap and /beatmapset api handlers 10 months ago
.gitignore Initial commit 10 months ago
LICENSE Add LICENSE, README.md and requriements.txt 10 months ago
README.md Add origin and mirror links to README 10 months ago
convert.py Open json files with utf-8 encoding, truncate child_beatmaps table when conversion starts 10 months ago
levbod.py Renamed tempmirror.py to levbod.py 10 months ago
requirements.txt Add LICENSE, README.md and requriements.txt 10 months ago
schema.sql Add db schema 10 months ago



Le very basic osu!direct

A temporary osu!direct api when bloodcat goes offline

  • Origin: https://git.zxq.co/ripple/levbod
  • Mirror: https://github.com/osuripple/levbod

This software is an api with osu!direct features that can be used with the ripple static mirror. index.json's content is saved in a MySQL database, for performance reasons, and info of single beatmaps is read from the json files in b/ mirror's data folder.



  • Make sure the mirror has downloaded all the beatmaps and it has created all the json files
  • Create an empty MySQL database (and user)
  • Import schema.sql in your database $ mysql -u levbod -p levbod < schema.sql
  • Install levbod's dependencies using pip $ pip install -r requirements.txt
  • Start levbod once to create a default config file and edit it $ python3 levbod.py $ nano config.json ...
  • Put index.json data in the database using convert.py (this might take a while depending on your disk speed) $ python3 convert.py
  • Start the api server $ python3 levbod.py

Nginx config

Optionally, you can configure nginx as a reverse proxy:

server {
    listen 80;
    server_name storage.ripple.moe;
    charset utf-8;

    # Ripple static mirror
    location ~ \.osz$ {
        add_header Content-Disposition 'attachment;filename="$basename";';

    # Levbod reverse proxy
    location /levbod {
        rewrite ^/levbod/(.*) /$1  break;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header Host $http_host;
        proxy_redirect off;

API Documentation


All code in this repository is licensed under the GNU AGPL 3 License. See the "LICENSE" file for more information