{"id":16855140,"url":"https://github.com/stageguard/osumapsuggester","last_synced_at":"2025-07-17T02:12:42.917Z","repository":{"id":44389205,"uuid":"386711351","full_name":"StageGuard/OsuMapSuggester","owner":"StageGuard","description":"A OneBot bot that can provide osu!std players some appropriate beatmap (WIP)","archived":false,"fork":false,"pushed_at":"2025-02-27T11:35:53.000Z","size":10809,"stargazers_count":29,"open_issues_count":8,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-27T16:02:06.859Z","etag":null,"topics":["bot","java","kotlin","osu","osugame"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StageGuard.png","metadata":{"files":{"readme":"README-en.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-16T17:10:54.000Z","updated_at":"2025-02-27T11:35:57.000Z","dependencies_parsed_at":"2024-10-27T12:08:24.651Z","dependency_job_id":"cfa6d9e3-401f-4694-8b6b-37e1595794cc","html_url":"https://github.com/StageGuard/OsuMapSuggester","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StageGuard%2FOsuMapSuggester","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StageGuard%2FOsuMapSuggester/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StageGuard%2FOsuMapSuggester/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StageGuard%2FOsuMapSuggester/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StageGuard","download_url":"https://codeload.github.com/StageGuard/OsuMapSuggester/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243846976,"owners_count":20357294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","java","kotlin","osu","osugame"],"created_at":"2024-10-13T13:58:35.603Z","updated_at":"2025-03-17T05:32:16.692Z","avatar_url":"https://github.com/StageGuard.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OsuMapSuggester\n\nA [mirai-console](https://github.com/mamoe/mirai-console) plugin that can provide **osu!std** players some appropriate beatmap. (WIP)\n\n[![CI](https://github.com/StageGuard/OsuMapSuggester/actions/workflows/build.yml/badge.svg)](https://github.com/StageGuard/OsuMapSuggester/actions/workflows/build.yml) [![CodeFactor](https://www.codefactor.io/repository/github/stageguard/osumapsuggester/badge/main)](https://www.codefactor.io/repository/github/stageguard/osumapsuggester/overview/main)\n\nDevelop roadmap：[#1](https://github.com/StageGuard/OsuMapSuggester/issues/1)\n\n## Features\n\nIt can analyze player's **aim**, **speed** and **accuracy** skills of his best performances and [PerformancePlus](https://syrin.me/pp+/) and other factors to infer what type of the player he is.\n\nThen it can recommend specific beatmap for his shortcomings or other kind of beatmap.(not implemented)\n\nUsers can also define custom ruleset of beatmap type via [these properties](https://github.com/StageGuard/OsuMapSuggester/blob/main/src/main/kotlin/me/stageguard/obms/database/model/BeatmapSkill.dao.kt#L22) using JavaScript expression.\n\nThere are other features: \n\n- [x] Analyze player's skills(main function).\n- [x] Recommend specific beatmap(main function).\n- [x] Show your best performance picture.\n- [x] Best performance versus.\n- [x] Recalculate the best performance if all full combo.\n- [x] Show your skill attributes.\n- [x] query your recent score\n- [ ] ...\n\n## How plugin process OAuth request and bind account\n\nWhen users click OAuth link and confirm authorization. It will redirect to your callback URL with query parameters `state` and `code`. \n\nThe OsuMapSuggester plugin will open a frontend http server to process the parameters.\n\n## Deploy\n\nIt is easy to deploy this bot.\n\n#### Preparation: \n\n- A **MySQL** or **MariaDB** database, create a database for this plugin.\n\n- A server with public IP.\n\n- \u003cdetails\u003e \u003csummary\u003eMirai console runtime environment.\u003c/summary\u003e\n      Learn how to setup mirai console: \u003ca href=\"https://github.com/mamoe/mirai/blob/dev/docs/UserManual.md\"\u003ehttps://github.com/mamoe/mirai/blob/dev/docs/UserManual.md\u003c/a\u003e\n  \u003c/details\u003e\n\n- \u003cdetails\u003e \u003csummary\u003eosu! OAuth Application\u003c/summary\u003e\n\t\t1. Go to \u003ca href=\"https://osu.ppy.sh/home/account/edit\"\u003ehttps://osu.ppy.sh/home/account/edit\u003c/a\u003e\u003cbr\u003e\u003cbr\u003e\n      2. Click \u003cb\u003eNew OAuth Application\u003c/b\u003e\u003cbr\u003e\n      \u003cimg src=\"static/new_oauth_app_button.png\" alt=\"new_oauth_app_button\"/\u003e\u003cbr\u003e\u003cbr\u003e\n      3. Set \u003cb\u003eApplication Callback URL\u003c/b\u003e to \u003cb\u003ehttp://\u0026lt;your server ip or domain name\u0026gt;:port/authCallback\u003c/b\u003e\u003cbr\u003e\n      \u003cimg src=\"static/new_oauth_app.png\" height=\"200\" alt=\"new_oauth_app\"/\u003e\u003cbr\u003e\u003cbr\u003e\n      4. Copy \u003cb\u003eClient Id\u003c/b\u003e and \u003cb\u003eClient Secret\u003c/b\u003e.\u003cbr\u003e\n      \u003cimg src=\"static/oauth.png\" height=\"200\" alt=\"oauth\"/\u003e\n  \u003c/details\u003e\n  \n- \u003cdetails\u003e \u003csummary\u003eosu! v1 api key\u003c/summary\u003e\n      Request a new v1 api key: \u003ca href=\"https://osu.ppy.sh/p/api/\"\u003ehttps://osu.ppy.sh/p/api/\u003c/a\u003e\n  \u003c/details\u003e\n\n#### Run: \n\n1. Clone this project with submodule  (`git clone --recurse-submodules`)  and open with IntelliJ IDEA. Sync gradle project and run `mirai/buildPlugin` task to build the plugin binary file.\n\n\u003e You can also build via command line by running `chmod +x gradlew \u0026\u0026 ./gradlew buildPlugin` command if your IntelliJ IDEA is not installed. The output binary file is in `build/mirai`.\n\n2. Copy the output in `build/mirai/OsuMapSuggester-xxx.mirai.jar` to `\u003cconsole runtime\u003e/plugins/` folder, and start mirai console once, you may get this error log: \n\n```\n2021-07-26 20:22:37 E/OsuMapSuggester: Failed to connect database: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Access denied for user 'root'@'localhost' (using password: YES).\n2021-07-26 20:22:37 E/OsuMapSuggester: Retry to connect database in 10 seconds.\n```\n\n3. Close mirai console, edit `config/OsuMapSuggester/OsuMapSuggester.Config.yml`\n\n```yaml\nqq: 1234567890 # Enable the plugin for this bot\ndatabase: \n  address: localhost # Your database address\n  port: 3306 # Database port\n  user: root # Database user\n  password: testpwd # Database password\n  table: osu!beatmap suggester # Database name\n  maximumPoolSize: 10\nosuAuth: \n  clientId: 0 # The OAuth application client id you just created.\n  secret: '' # OAuth application client secret\n  authCallbackBaseUrl: 'http://localhost:8081' # callback base url, it is for generating OAuth link when users bind qq account, must be same with OAuth application callback base url(no \"/authCallback\").\n  v1ApiKey: '' # your v1 api key\nfrontend: # frontend is used to process oauth application callback\n  host: localhost # frontend host\n  port: 8081 # frontend port\n```\n\n4. Save config, rerun mirai console. If you see this log, it means everything works ok.\n\n```\n2021-07-26 20:34:27 I/OsuMapSuggester: Subscribed group and friend messages.\n```\n\n## Issues\n\nThis project is still working in progress, it is unstable and there are still many bugs.\n\nIf you suffer from fatal bug when running bot, please open an issue with `bug` to feedback.\n\nAlso, if you have any good idea, welcome to contribute to this project or open an issue with `feature` label.\n\n## Library\n\n- Mirai Framework: [mirai](https://github.com/mamoe/mirai/), [mirai-console](https://github.com/mamoe/mirai-console), [mirai-slf4j-bridge](https://github.com/project-mirai/mirai-slf4j-bridge)\n- Database: [Ktorm](https://github.com/kotlin-orm/ktorm), [HikariCP](https://github.com/brettwooldridge/HikariCP)\n- Web Server: [ktor](https://github.com/ktorio/ktor)\n- Graphics: [skija](https://github.com/JetBrains/skija)\n- osu! Related: [peace-performance](https://github.com/Pure-Peace/peace-performance), [pp+ algorithm](https://github.com/Syriiin/osu), [osuReplayAnalyzer](https://github.com/firedigger/osuReplayAnalyzer)\n- Utilities: apache utilities(commons-io, commons-math3, commons-compress), [xz](https://tukaani.org/xz/java.html)\n\n## LICENSE of this project and mirai\n\n```\nOsuMapSuggester\nCopyright (C) 2021 StageGuard\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as published\nby the Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License\nalong with this program.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n```\n\n```\nmirai\nCopyright (C) 2019-2021 Mamoe Technologies and contributors.\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as\npublished by the Free Software Foundation, either version 3 of the\nLicense, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License\nalong with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstageguard%2Fosumapsuggester","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstageguard%2Fosumapsuggester","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstageguard%2Fosumapsuggester/lists"}