Skip to content

hexis-revival/hbxml

Repository files navigation

hbxml

This repository contains a golang module for parsing hexis beatmap xml (hbxml) files.

Installation

To install the library, use go get:

go get github.com/hexis-revival/hbxml

Usage

Parsing a Beatmap

package main

import (
    "os"
    "github.com/hexis-revival/hbxml"
)

func main() {
    file, err := os.Open("examples/Max Coveri - Running in the '90s (Francesco149) [Pro].hbxml")
    if err != nil {
        panic(err)
    }
    defer file.Close()

    beatmap, err := hbxml.NewBeatmap(file)
    if err != nil {
        panic(err)
    }

    // Use the beatmap object
    fmt.Println("Loaded beatmap:", beatmap.FormatName())
}

Serializing a Beatmap

package main

import (
    "os"
    "github.com/hexis-revival/hbxml"
)

func main() {
    beatmap := hbxml.Beatmap{
        Version: "1",
        // ...
    }

    file, err := os.Create("output.hbxml")
    if err != nil {
        panic(err)
    }
    defer file.Close()

    if err := beatmap.Serialize(file); err != nil {
        panic(err)
    }
}

About

A parser for the hexis beatmap xml format

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages