Week 9: XML to YAML Converter

As planned for Week 9, an XML to YAML generator has been added to the modtool. A new CLI command, update, has been added to the existing modtool commands that serves the purpose of conversion of XML scripts to YAML scripts. The functionality can also be achieved through the API class, ModToolUpdate. I would like to thank my mentors and Håkon Vågsether for helping me throughout.

The feature of XML to YAML conversion of grc scripts has been achieved by using the existing grc converter. The conversion utilises the functional definition load_block_xml of the class Converter of the grc converter.

The command update also comes with a special option --all that converts all the existing XML scripts to YAML. There is also a feature for auto-completion of candidates for conversion. The list of candidates is generated by traversing the grc directory of the module. There are proper checks on the existence of blockname entered by the user. The blockname is a mandatory argument unless --all option is specified (there are no checks on the blockname in this particular case). The mandatory changes in the CMakeLists.txt is also handled by the core ModTool class ModToolUpdate​ with proper warnings on more than 1 or 0 substitutions.

In the meantime, I also worked on learning PyQt5 for the GUI of the modtool. I learned about the various QtWidgets​, layouts, setting up connections, creating menu bar, etc.  I also worked on the basic GUI design on paper.

Tasks for Week 10

  1. Work on the GUI of the ModTool.
  2. Bug fixes of the PR, if any.

I have updated the GitHub project and the code can be followed in the forked repository yaml branch.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s