Skip to content
Snippets Groups Projects
Commit 85988181 authored by Aaron Carlisle's avatar Aaron Carlisle
Browse files

Tools: Update RNA/Manual Reference for sphobjinv 2.0

parent 281c6315
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,7 @@
# URL is the: url_manual_prefix + url_manual_mapping[#id]
import os
import sphobjinv
import sphobjinv as soi
import urllib.request
# Download the objects.inv file
......@@ -47,11 +47,11 @@ urlretrieve = urllib.request.urlretrieve
urlretrieve("https://docs.blender.org/manual/en/dev/objects.inv", "objects.inv")
# Decode objects.inv
objects = sphobjinv.readfile('objects.inv')
objects_data = sphobjinv.decode(objects)
sphobjinv.writefile('objects.tmp', objects_data) # TODO leave in memory
os.remove("objects.inv")
inv = soi.Inventory('objects.inv')
objects_data = inv.data_file()
soi.writebytes('objects.tmp', objects_data) # TODO leave in memory
os.remove("objects.inv")
# Write the fire
filepath = os.path.join("rna_manual_reference.py")
......@@ -98,7 +98,6 @@ fw("if LANG is not None:\n")
fw(" url_manual_prefix = url_manual_prefix.replace(\"manual/en\", \"manual/\" + LANG)\n\n")
fw("url_manual_mapping = (\n")
# Logic to manipulate strings from objects.inv
with open("objects.tmp", encoding="utf8") as obj_tmp:
lines = [l for l in obj_tmp if (l.startswith("bpy.types") or l.startswith("bpy.ops"))]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment