O$8.1.x: JSON and Git and Automation

Grzegorz (Greg) Pasternak gpasternak at cogeco.ca
Sat Aug 25 11:57:41 EDT 2018


Alex;

Thanks for the explanation, I hope somebody from Omnis is reading our emails and makes notes, documentation is important yet always pushed aside.

I did in fact email Omnis support re: automation of json import and yet didn't receive any response, probably will get one on Mon.

One last question, is it fair to assume that building lbs from json will work using Omnis runtime?
(I can probably find out by myself later but if you already know please let me know)

Thanks again,

Greg


On Aug 24, 2018, at 5:43 PM, Alex Clay via omnisdev-en <omnisdev-en at lists.omnis-dev.com> wrote:

> Hi Greg,
> 
> The 8.1 beta releases had very nice documentation on these methods. However, I believe those beta release are under an NDA. For some reason, the documentation on the import and export JSON methods never made it to the final release.
> 
> I can't fathom why this documentation should be hidden. I recommend emailing Omnis Support to see if they can share the docs with you or, even better, add them to the standard documentation.
> 
> pfrErrors pfrWarnings are both parameter field references. If you look at oCICLI.$cli_import_json you'll see where these lists are used to output errors and warning. The list definition could be determined from that code.
> 
> Alex
> 
>> On Aug 24, 2018, at 17:32, Grzegorz (Greg) Pasternak <gpasternak at cogeco.ca> wrote:
>> 
>> Alex;
>> 
>> OK, so the whole thing is pretty simple:
>> Assuming that my JSONTOLBS.LBS was exported via IDE into 'C:\MyGit\jsontolbs'  I can use following code to generate "outjson.lbs"
>> ;
>> Calculate vSrcPath as 'C:\MyGit\jsontolbs'
>> Calculate vDestPath as 'C:\MyGit\outjson.lbs'
>> Do $root.$importjson(vSrcPath,vDestPath,vErrLst,vWarnLst)
>> 
>> Pretty straight forward.
>> 
>> I am just not sure about vErrLst and vWarnLst (I assume these are my local list variables).
>> The manual says nothing about the parameters for $importjson.
>> Your naming convention (looking at the git ci project): lfrErrors, lfrWarnings is not telling me much as I am not familiar with it.
>> 
>> Anyway, I think I have what I need to get started, thanks.
>> 
>> Greg
>> 
>> 
>> 
>> On Aug 24, 2018, at 11:08 AM, Alex Clay via omnisdev-en <omnisdev-en at lists.omnis-dev.com> wrote:
>> 
>>> Hi Greg,
>>> 
>>> You can use $root.$importjson(). See my ci.lbs project for an example: https://github.com/omnis-ci/ci.lbs <https://github.com/omnis-ci/ci.lbs>
>>> 
>>> One caveat is that the $root.$importjson() and $root.$exportjson() commands don't show in Omnis by default. You need to set $root.$exportimportjsonoptions.$includenotationide to kTrue.
>>> 
>>> Alex
>>> 
>>>> On Aug 24, 2018, at 11:01, Grzegorz (Greg) Pasternak <gpasternak at cogeco.ca> wrote:
>>>> 
>>>> I need to automate the process of creating Omnis lbs file off Git repository.
>>>> Assuming that all JSON files are present on the local drive, how do I create the Omnis.lbs out of these files using Omnis code?
>>>> 
>>>> I want to create helper library that will take the location of JSON output and produce Omnis.lbs of that.
>>>> 
>>>> What do I need do do to make it happen?
>>>> 
>>>> Greg
>>>> _____________________________________________________________
>>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
>>> 
>>> _____________________________________________________________
>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
>> 
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
> 
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 




More information about the omnisdev-en mailing list