Skip to main content

Bestdori-Render

⭐ Bestdori chart rendering tool written in Python ⭐

English | 中文

Features

Supports negative BPM, almost any number of lanes, SP green bar rendering, rhythm color vision assistance, and many other features.

Configuration

Parameter Name Type Default Value Description
EXPECT_HEIGHT int 1500 Expected image height
BG_COLOR tuple (16, 16, 16) Background color
SLICE_HEIGHT int 3360 + 24 Length of the split track, it is best to be a multiple of PPS ± NOTE_SIZE[2], otherwise the note is likely to be cut
X_SEP int 80 Width of the empty space next to the track
FRAME_WIDTH int 16 Track border width
SEP_LINE_WIDTH int 4 Track separation line width
LANE_WIDTH int 50 Track spacing
LANE_RANGE tuple (None, None) Track range, when (None, None) the track range will be automatically calculated
LANE_NUM int None Number of tracks, when None the number of tracks will be automatically calculated
FONT ImageFont.ImageFont ImageFont.truetype("fonts/TT-Shin Go M.ttf", size=24) Font for drawing BPM, duration, and note count
FRAME_COLOR tuple (0, 77, 77, 255) Track border color
SEP_LINE_COLOR tuple (19, 119, 151, 50) Track separation line color
DOUBLE_BEAT_LINE_COLOR tuple (220, 220, 220) Double beat line color
BPM_LINE_LIGHT_COLOR tuple (255, 51, 119, 224) Highlighted measure line color (first measure line after BPM change)
BPM_LINE_COLOR tuple (240, 240, 240, 100) Measure line color
BPM_TEXT_COLOR tuple (255, 51, 119) Color for drawing BPM
TIME_TEXT_COLOR tuple (255, 255, 255) Color for drawing duration
NOTE_NUM_COLOR tuple (255, 255, 255) Color for drawing note count
COLOR_LIGHT_VALUE int 60 Color brightness increase value
X_OFFSET int 4 Note offset
PPS int 480 Pixel per Second
SKIN str "skin00_rip" Skin
BLUE_WHITE_TAP bool True Blue-white key (rhythm color vision assistance)
FLICK_OFFSET int 9 Flick note vertical offset
DIRECTIONAL_OFFSET int 4 Directional note horizontal offset
DIRECTIONAL_ARROW_OFFSET int -6 Directional note arrow horizontal offset
NOTE_SIZE tuple (60, 24) Note size
DOUBLE_BEAT_LINE_WIDTH int 2 Double beat line width
BPM_LINE_WIDTH int 2 Measure line thickness

Usage

import requests
from bestdori.render import render

url = "https://bestdori.com/api/post/details?id=101566"
response = requests.get(url)
data = response.json()

chart_img = render(data["post"]["chart"])
# `chart_img` is a `PIL.Image.Image`
chart_img.show()
chart_img.save("101566.png")

Skins

The project only includes one set of skin00_rip skins. If you want to use other skins, you can download them from Bestdori, use Tools for Cutting Unity Sprites to cut them, rename them, place them in the resources folder, and change the value of SKIN to the folder name.

Acknowledgements

Bestdori: The largest third-party website for BanG Dream
Tools for Cutting Unity Sprites: Although I didn't use this project to cut, it looks quite useful

Thanks to LingMiao, WindowsSov8, and kumoSleeping for their ideas and inspiration on the negative BPM issue.

Metadata

Release files for bestdori-render 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bestdori-render 0.1.3
File Size Uploaded Provenance Actions
bestdori_render-0.1.3.tar.gz 2.1 MB Without provenance Details for bestdori_render-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bestdori-render 0.1.3
File Interpreter ABI Platform Actions
bestdori_render-0.1.3-py3-none-any.whl Python 3 none any Details for bestdori_render-0.1.3-py3-none-any.whl

Total release size: 4.3 MB

Release files / bestdori_render-0.1.3.tar.gz

Download URL bestdori_render-0.1.3.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
1f761c15ef5f7b7e6ebd3bc295c714523b911aee1a09de87b127e9c0a756b0f1
BLAKE2b-256 checksum
How to use checksums
78f8157424cda90932c368856de15ecffc257726979531882b724b356741c208
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.25.5 CPython/3.12.3 Linux/6.11.0-1018-azure

Release files / bestdori_render-0.1.3-py3-none-any.whl

Download URL bestdori_render-0.1.3-py3-none-any.whl
Size 2.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
df5e8f8f1452a196204efc2b9b70357e7fee58393e5885daac095cbc2581a94a
BLAKE2b-256 checksum
How to use checksums
239f197acebac20db9e87b298e7397deef165403c2238bb6cc217192ae906d02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.25.5 CPython/3.12.3 Linux/6.11.0-1018-azure

Security for bestdori-render 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page