Hey, here is my somewhat-working script i use to convert vibemate scripts to funscripts.
It needs Python 3.7+ and json library (should be built-in)
def parserRoutine(openPath):
lines = []
with open(openPath, "r") as fin:
lines = fin.readlines()
if len(lines) < 2:
lines = lines[0].split("#")
line_zero_data = lines[0].strip().split(";")
datadict = {"header": {}, "data": []}
for x in line_zero_data:
kv = x.split(":")
key = kv[0]
value = kv[1] if len(kv) > 1 else None
datadict["header"].update({key: value})
line_one_data = lines[1].strip().split(";")
for x in line_one_data:
idata = x.split(";")[0]
if idata != "":
elem = int(idata)
datadict["data"].append(elem)
count_elems = len(datadict["data"])
min_elem = None
max_elem = None
for e in datadict["data"]:
if min_elem is None or min_elem > e:
min_elem = e
if max_elem is None or max_elem < e:
max_elem = e
print("N: %s, M: %s, X: %s" % (count_elems, min_elem, max_elem))
reframe = {
"actions": [],
"inverted": False,
"metadata": {
"creator": "",
"description": "",
"duration": int(
(int(datadict["header"]["S"]) * count_elems) / 1000
),
"license": "",
"notes": "",
"performers": [],
"script_url": "",
"tags": [],
"title": "Script",
"type": "basic",
"video_url": "",
},
"range": 100, # max range
"version": "1.0",
}
target = openPath + ".funscript"
actions = []
idx = 0
for x in datadict["data"]:
level = 100 - (100 / max_elem * x)
if level > 99:
level = 99
if level < 0:
level = 0
at = idx * int(datadict["header"]["S"])
obj = {"at": at, "pos": int(level)}
idx += 1
actions.append(obj)
reframe["actions"] = actions
with open(target, "w+") as ofile:
json.dump(reframe, ofile, ensure_ascii=True, indent=0)
parserRoutine("PATH_TO_YOUR_FILE")
just put path to your file instead of PATH_TO_YOUR_FILE, save it as script.py and double-click
DISCLAIMER: This will try to create file with only .funscript added near the file you set path to. If it can write there and you already have that file it WILL try to overwrite that file. Also I have found it sometimes fails to parse lovense’s data due to stray comments or newlines so YMMV.
If you have a particular script file, even if you don’t have format specification and my script doesn’t work for you, you can link or send it to me and i can take a look to see if i can come up with conversion script.