Initial commit
This commit is contained in:
31
pp/rxoppai/b3.py
Normal file
31
pp/rxoppai/b3.py
Normal file
@@ -0,0 +1,31 @@
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
|
||||
def runOppaiProcess(command):
|
||||
process = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
|
||||
output = json.loads(process.stdout.decode("utf-8", errors="ignore"))
|
||||
if "code" not in output or "errstr" not in output:
|
||||
print("oof")
|
||||
if output["code"] != 200:
|
||||
print("oof")
|
||||
if "pp" not in output or "stars" not in output:
|
||||
print("oof")
|
||||
pp = output["pp"]
|
||||
stars = output["stars"]
|
||||
|
||||
return pp, stars
|
||||
|
||||
command = "./oppai {}".format("../../.data/beatmaps/55.osu")
|
||||
command += " {acc:.2f}%".format(acc=99.6)
|
||||
command += " +{mods}".format(mods="HDHR")
|
||||
command += " {combo}x".format(combo=500)
|
||||
command += " {misses}xm".format(misses=1)
|
||||
command += " -ojson"
|
||||
|
||||
pp = 0.00
|
||||
stars = 0.00
|
||||
pp, stars = runOppaiProcess(command)
|
||||
print(pp)
|
BIN
pp/rxoppai/oppai
Normal file
BIN
pp/rxoppai/oppai
Normal file
Binary file not shown.
BIN
pp/rxoppai/oppai-old
Normal file
BIN
pp/rxoppai/oppai-old
Normal file
Binary file not shown.
1179
pp/rxoppai/yes.osu
Normal file
1179
pp/rxoppai/yes.osu
Normal file
File diff suppressed because it is too large
Load Diff
1179
pp/rxoppai/yes2.osu
Normal file
1179
pp/rxoppai/yes2.osu
Normal file
File diff suppressed because it is too large
Load Diff
2357
pp/rxoppai/yes3.osu
Normal file
2357
pp/rxoppai/yes3.osu
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user