There are some vague things to create an add-on to Blender 2.8.
I can now figure out the following issues
・Item is not displayed in template_list
・Acquisition of operation history does not go well
for t in bpy.data.texts
if t.name.startswith(“Recent Reports”)
# make a report
return bpy.data.texts[“Recent Reports”].lines
Without more context (i.e. your code and or what you are trying to accomplish) it is nearly impossible to give a useful answer to your problems. However, I will give a few tips based on what I think you are trying to do.
There are many templates inside Blender’s text editor accessible from the menubar. Maybe look at those for the template_list.
What are you trying to attempt with the reports_to_textblock() call? Are you trying to get a list of all the recent operations into a list in your addon? To access each individual line you could loop over whatever bpy.data.texts[“Recent Reports”].lines returns and do something each line’s body
for line in lines:
some_function(line.body) # Use line.body to access the text
Hope some of that helps! Like I said above, more detailed questions will get more detailed responses.
Thank you for posting your code. I was trying to do something similar once I found out that the bpy.ops.ui.reports_to_textblock function was removed in Blender 2.8. But you already did all the hard work recreating the functionality. It is very much appreciated!