Convert NOMADS file to XML (need IOLIST)

Started by pwhirley, March 13, 2024, 03:13:51 PM

Previous topic - Next topic

pwhirley

I am writing a utility to convert PVXPlus program and library files to text so that Beyond Compare (a compare utility from Scooter Software) can easily spot changes.  Converting the program to text is easy and done.  I've decided to convert the NOMADS library files to XML.  I can do this with made-up column names (i.e. Field1, Field2, etc), but I'd rather have the meaningful names that go with the columns.

Have any of you already written a conversion of NOMADS library files to XML that you'd be willing to share?

Where would I find the IOLIST for a NOMADS library file?

Thanks - Phil

P.S. I'll be happy to share my conversion program and the Beyond Compare configuration to anyone interested.  It's quite useful.
Philip Whirley
Freelance software developer
Ride the Lowcountry, LLC
phil@whirley.org

Loren Doornek

Search for "IOL=" in *winproc.dsp.  It is most likely line 8010 that has the IOList.

8010 IOLIST _obj_nme$,_obj_c,_obj_l,_obj_w,_obj_h,_obj_type$,init_text$,init_val$,_obj_tab,_obj_def$,_obj_dsp$,_obj_fcs$,_obj_sel$,_obj_msg$,_obj_hlp$,_obj_attr$,_obj_idx$,_obj_hotkey$,_obj_qry$,_obj_sec$,_obj_sts$,_obj_grp$,_obj_null$,_obj_tag$,_obj_tbl$,_obj_inp$,_obj_out$,_obj_valid$,_obj_class$,_obj_tip$,_obj_orig$,_obj_font$,_obj_color$,_obj_listbox_type$,_obj_sep$,_obj_scratch$,_obj_popup$,_obj_sizing$,_obj_logic1$,_obj_logic2$,_obj_popup_logic$,_obj_qry_bitmap$,_obj_qry_width,_obj_qry_tip$,_obj_qry_attr$,_obj_extension$,_obj_demand$,_obj_demand_logic$,_obj_background_logic$,_obj_persistence$,_obj_notes$,_obj_tbl_len,_obj_tvline_color$,_obj_autosz_width$,_obj_autosz_height$,_obj_automation_text$,_obj_hilight_colors$,_obj_props$,_obj_visual_class$

pwhirley

Thanks Loren!  That looks familiar. - Phil
Philip Whirley
Freelance software developer
Ride the Lowcountry, LLC
phil@whirley.org

Mike King

Actually you can get the IOLIST for the Nomads screen definition file from the Nomads object.

It can be accessed by IOL=%nomads'_lib_iol$

Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

Stéphane Devouard

Phil


When using the SVN interface from PxPlus, programs and Nomads libraries are converted to text when you commit changes to the repo. Each library becomes a folder and each Nomads object (panels, queries, file maintenance, menus) is converted to a text file.
The format of the exported file is not XML, it's more like an INI file format
I believe the conversion program can be called. You'd need to explore the *plus/proj folder to find out.


Hope this helps
Stéphane Devouard
Portfolio | Work

pwhirley

Thanks Mike and Stéphane,

I've written a quick and ugly XML conversion which is adequate, but I may look at the other option to make something prettier.  The way it's working now, I can easily see if the compared libraries have been changed, but identifying the changes adequately requires me to go back to NOMADS utilities.  Using the SVN utility may well work better, though it means another folder level.  However, that will help narrow down exactly where the change is, which should make things more efficient.

I know the NOMADS library IOLIST doesn't change very often, but grabbing the IOLIST from the object will insure that I get the correct columns for the version I'm working with.  That will be better.

Phil
Philip Whirley
Freelance software developer
Ride the Lowcountry, LLC
phil@whirley.org

Jane Raymond

A few things to consider:


It might be better to use the %nomads'lib_iol1$, as it uses all string fields which might be easier to use:
IOLIST OBJ_NME$,OBJ_C$,OBJ_L$,OBJ_W$,OBJ_H$,OBJ_TYPE$,OBJ_TXT$,OBJ_VAL$,OBJ_TAB,OBJ_DEF$,OBJ_DSP$,OBJ_FCS$,OBJ_SEL$,OBJ_MSG$,OBJ_HLP$,OBJ_ATTR$,OBJ_IDX$,OBJ_HOTKEY$,OBJ_QRY$,OBJ_SEC$,OBJ_STS$,OBJ_GRP$,OBJ_NULL$,OBJ_TAG$,OBJ_TBL$,OBJ_INP$,OBJ_OUT$,OBJ_VALID$,OBJ_CLASS$,OBJ_TIP$,OBJ_ORIG$,OBJ_FONT$,OBJ_COLOR$,OBJ_LISTBOX_TYPE$,OBJ_SEP$,OBJ_SCRATCH$,OBJ_POPUP$,OBJ_SIZING$,OBJ_LOGIC1$,OBJ_LOGIC2$,OBJ_POPUP_LOGIC$,OBJ_QRY_BITMAP$,OBJ_QRY_WIDTH,OBJ_QRY_TIP$,OBJ_QRY_ATTR$,OBJ_EXTENSION$,OBJ_DEMAND$,OBJ_DEMAND_LOGIC$,OBJ_BACKGROUND_LOGIC$,OBJ_PERSISTENCE$,OBJ_NOTES$,OBJ_TBL_LEN,OBJ_TVLINE_COLOR$,OBJ_AUTOSZ_WIDTH$,OBJ_AUTOSZ_HEIGHT$,OBJ_AUTOMATION_TEXT$,OBJ_HILIGHT_COLORS$,OBJ_PROPS$,OBJ_VISUAL_CLASS$,OBJ_INOMADS_CLASS$

There is a conversion program used by svn to convert an individual panel to a text file. (Attached is a sample columnwidth.txt). You could possibly take the program (*plus/proj/pxpnl) and alter it output to a single text file for all the panels.
Jane Raymond
Software Developer
PVX Plus Technologies Ltd.

Jane Raymond

If there are other data files you might want to compare, there is a tool to convert our data files to text files:
CALL "*tools/ConvertData;Binary_to_Text", binPath$, txtPath$ [, password$]
This works great if the file you want to convert has an embedded dictionary.
Jane Raymond
Software Developer
PVX Plus Technologies Ltd.

pwhirley

Thank you Jane!

I thought I had already replied to your post, but I don't see it.
I think the *plus/proj/pxpnl program looks promising to come up with a more readable comparison.  Thank you for the suggestion.

Phil
Philip Whirley
Freelance software developer
Ride the Lowcountry, LLC
phil@whirley.org

Patrick Denny

I'm going to be comparing multiple revised copies of Basic Programs (Line Numbers).
Are you still using Beyond Compare?
Does that work well for Basic Programs including Line Numbers?
You mention sharing a "configuration". Would that be needed for comparing program code?
Thanks in advance for any advice/recommendations.