|
Post by kirkwoodwest on Sept 4, 2020 12:05:27 GMT -5
Hey clyphx peeps!
I'm trying to use github to store my user actions and have multiple sets of user actions that I want in different repositories. The easiest way I can think of doing this is to put different repositories in subfolders in the _user_actions folder. Of course tho clyphx doesn't read this by default... so I'm wondering if there i a method around this?
Thanks! Kirkwood
|
|
bxn
New Member
Posts: 6
|
Post by bxn on Nov 4, 2020 9:15:27 GMT -5
Hi Kirkwood, Not sure if that's possible without at least one file at the root. I guess without looking at the clyphx code at least. Still I think you can do this in 2 ways : the easy way would be to have 1 file for all your projets like a dictionnary of "command names" => callable and forward these calls to modules in subfolders. You could wrap up your callables in a function that would execute action strings. That would probably look a lot like what I did : github.com/lebrunthibault/clyphx_pro_user_actions. I have only one repo but i guess you could make one by subfolder. Probably a better way could be to have just a small class at the root that would get instantiated by the clyphx code and you could from there instantiate your own subfolders action classes by importing each of them. I imagine each subfolder class would need to extend UserActionsBase and you would have to instantiate each one in the __init__ method of the root class. Then keep a reference of each subfolder class instance in root instance variables and forward the root call to create_actions to subfolder classes. With this method you would let the subfolder classes define their command names. Totally untested  Hope this works ! Thibault
|
|