All Projects → mrflashstudio → OsuParsers

mrflashstudio / OsuParsers

Licence: MIT license
Library for parsing/writing files associated with osu!

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to OsuParsers

osuElements
A .NET framework for osu! (osu.ppy.sh) applications
Stars: ✭ 33 (-45%)
Mutual labels:  osu, beatmap, replay
dontsteal
Python 3 script to compare two osu! replays for similarities. (Kind of anti-cheat for replay stealing)
Stars: ✭ 13 (-78.33%)
Mutual labels:  osu, replay, osugame
OsuMapSuggester
A Mirai console plugin that can provide osu!std players some appropriate beatmap (WIP)
Stars: ✭ 29 (-51.67%)
Mutual labels:  osu, osugame
OppaiSharp
A C# port of oppai-ng
Stars: ✭ 16 (-73.33%)
Mutual labels:  osu, osugame
Osu-Ingame-Downloader
Just a simple Osu! ingame downloader
Stars: ✭ 31 (-48.33%)
Mutual labels:  osu, osugame
osu-difficulty-calculator
Processes raw beatmaps and saves difficulty attributes to a database backend
Stars: ✭ 66 (+10%)
Mutual labels:  osu, beatmap
tau
A customized osu! mode surrounding a paddle and some notes.
Stars: ✭ 150 (+150%)
Mutual labels:  osu, osugame
osumer
osu! beatmap express downloader
Stars: ✭ 77 (+28.33%)
Mutual labels:  osu, beatmap
fnf-osu-mania-skin
A Friday Night Funkin' skin for all osu! modes.
Stars: ✭ 45 (-25%)
Mutual labels:  osu, osugame
ultimate osu analyzer
Python rewrite of my old osu analyzer that aims to be a lot more useful
Stars: ✭ 26 (-56.67%)
Mutual labels:  osu, osugame
IngameOverlay
Overlay in-game
Stars: ✭ 21 (-65%)
Mutual labels:  osu, osugame
mappool-generator
A Mappool Generator for osu! Tournament Livestreams
Stars: ✭ 20 (-66.67%)
Mutual labels:  osu, osugame
storybrew
A storyboard editor for osu!
Stars: ✭ 119 (+98.33%)
Mutual labels:  storyboard, osu
Storyboard2codeapp
Mac app that converts an iOS storyboard into code. Work in progress.
Stars: ✭ 76 (+26.67%)
Mutual labels:  storyboard
Kwdrawercontroller
Drawer view controller that easy to use!
Stars: ✭ 154 (+156.67%)
Mutual labels:  storyboard
Natalie
Natalie - Storyboard Code Generator (for Swift)
Stars: ✭ 1,183 (+1871.67%)
Mutual labels:  storyboard
Storyline.js
Storyline - generic sequencer for JavaScript projects
Stars: ✭ 70 (+16.67%)
Mutual labels:  storyboard
Swinjectstoryboard
Swinject extension for automatic dependency injection via Storyboard
Stars: ✭ 211 (+251.67%)
Mutual labels:  storyboard
Swiftcolorgen
A tool that generate code for Swift projects, designed to improve the maintainability of UIColors
Stars: ✭ 152 (+153.33%)
Mutual labels:  storyboard
Capsuleview
An easy to use drop-in view to create a beautiful card style effect with a title placeholder and body content.
Stars: ✭ 68 (+13.33%)
Mutual labels:  storyboard

OsuParsers CodeFactor nuget

Library for parsing files associated with osu! written in C#

Feel free to use it and report any issues you might run into.
Cuz, you know, i might have broke something in the last few commits ;)

Navigation

Installation

Download latest version of parser from releases, then add the dll into your project references/dependencies.
Or you can just install NuGet package.

Package Manager

PM> Install-Package OsuParsers

.NET CLI

> dotnet add package OsuParsers

Building and Requirements

  • You need a desktop platform that can compile .NET 4.6.1 or higher.
  • Clone the repository git clone https://github.com/mrflashstudio/OsuParsers
  • And then you can build the project in your IDE.

Usage

Beatmap parser

using OsuParsers.Beatmaps;
using OsuParsers.Decoders;

namespace SomeNamespace
{
    class Program
    {
        public static void Main(string[] args)
        {
            Beatmap beatmap = BeatmapDecoder.Decode(@"beatmapPath.osu");
            
            //printing beatmap's title
            System.Console.WriteLine(beatmap.MetadataSection.TitleUnicode);
        }
    }
}

Storyboard parser

using OsuParsers.Decoders;
using OsuParsers.Storyboards;

namespace SomeNamespace
{
    class Program
    {
        public static void Main(string[] args)
        {
            Storyboard storyboard = StoryboardDecoder.Decode(@"storyboardPath.osb");
            
            //getting first object of foreground layer
            IStoryboardObject object = storyboard.ForegroundLayer[0];
        }
    }
}

Replay parser

using OsuParsers.Decoders;
using OsuParsers.Replays;

namespace SomeNamespace
{
    class Program
    {
        public static void Main(string[] args)
        {
            Replay replay = ReplayDecoder.Decode(@"replayPath.osr");
            
            //printing player's nickname
            System.Console.WriteLine(replay.PlayerName);
        }
    }
}

Database parser

using OsuParsers.Decoders;
using OsuParsers.Database;

namespace SomeNamespace
{
    class Program
    {
        public static void Main(string[] args)
        {
            //parsing all available databases
            OsuDatabase osuDb = DatabaseDecoder.DecodeOsu(@"osuDbPath.db");
            CollectionDatabase collectionDb = DatabaseDecoder.DecodeCollection(@"collectionDbPath.db");
            ScoresDatabase scoresDb = DatabaseDecoder.DecodeScores(@"scoresDbPath.db");
            PresenceDatabase presenceDb = DatabaseDecoder.DecodePresence(@"presenceDbPath.db");
            
            //printing player's nickname
            System.Console.WriteLine(osuDb.PlayerName);
            //printing collection count
            System.Console.WriteLine(collectionDb.CollectionCount);
            //printing beatmap's md5 hash of first score
            System.Console.WriteLine(scoresDb.Scores[0].Item1);
            //printing first player's nickname
            System.Console.WriteLine(presenceDb.Players[0].Username);
        }
    }
}

Beatmap writer

using OsuParsers.Beatmaps;
using OsuParsers.Decoders;

namespace SomeNamespace
{
    class Program
    {
        public static void Main(string[] args)
        {
            //getting console output text as the song's new title
            string newTitle = System.Console.ReadLine();
            //parsing beatmap
            Beatmap beatmap = BeatmapDecoder.Decode(@"pathToBeatmap.osu")
            
            //changing song title
            beatmap.MetadataSection.Title = newTitle;
            //writing beatmap to file
            beatmap.Save(@"pathToNewBeatmap.osu");
        }
    }
}

Storyboard writer

using OsuParsers.Decoders;
using OsuParsers.Storyboards;

namespace SomeNamespace
{
    class Program
    {
        public static void Main(string[] args)
        {
            //getting console output text as the object's new filepath
            string newFilePath = System.Console.ReadLine();
            //parsing storyboard
            Storyboard storyboard = StoryboardDecoder.Decode(@"pathToStoryboard.osb")
            
            //changing filepath of the first storyboard object in background layer
            storyboard.BackgroundLayer[0].FilePath = newFilePath;
            //writing storyboard to file
            beatmap.Save(@"pathToNewStoryboard.osb");
        }
    }
}

Replay writer

using OsuParsers.Decoders;
using OsuParsers.Replays;

namespace SomeNamespace
{
    class Program
    {
        public static void Main(string[] args)
        {
            //getting console output text as the new player's name
            string newPlayerName = System.Console.ReadLine();
            //parsing replay
            Replay replay = ReplayDecoder.Decode(@"pathToReplay.osr")
            
            //changing player name
            replay.PlayerName = newPlayerName;
            //writing replay to file
            replay.Save(@"pathToNewReplay.osr");
        }
    }
}

Database writer

using OsuParsers.Database;
using OsuParsers.Decoders;
using OsuParsers.Enums;

namespace SomeNamespace
{
    class Program
    {
        public static void Main(string[] args)
        {
            //parsing osu database
            OsuDatabase db = DatabaseDecoder.DecodeOsu(@"pathToOsuDb.db")
            
            //changing permissions
            db.Permissions = Permissions.Supporter;
            //writing database to file
            db.Save(@"pathToNewOsuDb.db");
        }
    }
}

Documentation

For detailed description of available methods and fields, see documentation.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].