On Wed, 5 Mar 2014 15:22:33 +0100 Martin Vidner <mvidner@suse.cz> wrote:
On Wed, Mar 05, 2014 at 10:15:55AM +0100, Julian Zwickl wrote:
Hi,
did you have a documentation about the YaST Wizard(UI) for Ruby?
We have the main site https://en.opensuse.org/openSUSE:YaST_development referencing the UI bits https://en.opensuse.org/openSUSE:YaST:_UI,_User_Interface_Library
Sadly, that documents the YCP bindings, which we currently use with only a slight translation to Ruby. There have been prototypes of a Rubyish UI code, but we are not using that in production https://github.com/libyui/ruby-ui
To add something in ruby, you can check examples - https://github.com/yast/yast-yast2/tree/master/library/wizard/doc/examples ( but it is translated ruby, so not nice, but you should get at least idea how it is called. I will gladly help you review your code to check it.
And how can I parse .ini configs? Does YaST have a special method?
Um, YaST does have a special method, and it will scare you away. For an example,
$ grep -r sssd_conf /usr/share/YaST2
Please design your desired API and let's work together to fit in on existing YaST libraries.
If you need only parse it and not write, then there is option to read it via agent for string read and then parse it with a ini parser in ruby. But it will add dependencies for your module. Josef