GrandOrgue / OdfEdit

A tool for GrandOrgue ODF edition, and Hauptwerk to GrandOrgue ODF conversion.
GNU General Public License v3.0
9 stars 1 forks source link

Encapsulate the organ dictionary functionality for reuse #27

Closed rnditdev closed 10 months ago

rnditdev commented 1 year ago

Hello,

Firstly, thank you for this wonderful tool. I want to create different related tools, like a graphical console editor, and it would be great to encapsulate the organ dictionary under a separate module/class, so I can import and invoke a method like builddict (file path), end build upon the data structure.

Thank you!

rnditdev commented 1 year ago

Sorry, I checked the code and it seems that it is indeed pretty much encapsulated in classes, maybe you can divide the classes in different files, for easy importing? In any case, I think I could always import the py itself and use the needed classes without this change. Thank you.

eturpault commented 1 year ago

Hello, Yes with the class C_ODF_DATA you can load, change, link/unlink, rename, delete and save data of an ODF. For the moment I prefer to keep all the code in a single file, it is easier to navigate inside it.

eturpault commented 1 year ago

Don't hesitate to ask if you need clarifications on some parts of the code. I always try to comment the code as much as possible, it should be quite understandable.