Skip to content

HyDevelop/OsuBeatmapStudio

Repository files navigation



OsuBeatmapStudio

Read .osu files in Java / Kotlin




Maven / Gradle Import

1. Add Repository

Add JitPack's repository into your pom.xml first:

Maven

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

Gradle

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

2. Add Dependency

Add this dependency to your <dependencies> tag:

Maven

<dependency>
    <groupId>com.github.HyDevelop</groupId>
    <artifactId>OsuBeatmapParser</artifactId>
    <version>1.1.2.109</version>
</dependency>

Gradle

dependencies {
    implementation 'com.github.HyDevelop:OsuBeatmapParser:1.1.2.109'
}

The dependency would be ready once you reimport.

If you are not using maven or gradle, Import from Other Package Managers


Documentation

1. How to read a beatmap

Kotlin

val beatmap = BeatmapReader.parse(File("file_name.osu"))
// or
val beatmap = BeatmapReader.parse(beatmapText)

Java

Beatmap beatmap = BeatmapReader.parse(new File("file_name.osu"));
// or
Beatmap beatmap = BeatmapReader.parse(beatmapText);

2. How to save a beatmap

Kotlin

File("output.osu").writeText(beatmap.toString())

Java

PrintWriter out = new PrintWriter("output.osu");
out.print(beatmap);

3. What can you do with a beatmap

You can manipulate it like an object. Almost every property is parsed (except for color properties that I'm not sure about).
Read some code!
https://i.imgur.com/0wus8KB.png


Frequently Asked Questions:

Q: How are you?

I'm great, how are you?


License: MIT

Basically this means you can do whatever you want with this project but you have to include the license file and I'm not responsible for what you do.

MIT License

Copyright (c) 2020 - HyDEV -

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.