mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-01-20 05:19:32 +02:00
Merge branch 'main' of https://github.com/Bayselonarrend/OpenIntegrations
This commit is contained in:
commit
9f72167d86
File diff suppressed because it is too large
Load Diff
@ -2051,17 +2051,43 @@ Procedure WriteCLICall(Val Library, Val Method, Val Options)
|
|||||||
EndIf;
|
EndIf;
|
||||||
|
|
||||||
OptionsArray = New Array;
|
OptionsArray = New Array;
|
||||||
|
FindJSON = False;
|
||||||
|
|
||||||
For Each Option In Options Do
|
For Each Option In Options Do
|
||||||
|
|
||||||
|
If TypeOf(Option.Value) = Type("Structure")
|
||||||
|
Or TypeOf(Option.Value) = Type("Map") Then
|
||||||
|
|
||||||
|
FindJSON = True;
|
||||||
|
|
||||||
|
EndIf;
|
||||||
|
|
||||||
CurrentOption = FormOption(Option.Value, Option.Key);
|
CurrentOption = FormOption(Option.Value, Option.Key);
|
||||||
OptionsArray.Add(CurrentOption);
|
OptionsArray.Add(CurrentOption);
|
||||||
|
|
||||||
EndDo;
|
EndDo;
|
||||||
|
|
||||||
|
Start = "oint ";
|
||||||
|
|
||||||
|
If FindJSON Then
|
||||||
|
|
||||||
|
Information = "JSON data can also be passed as a path to a .json file";
|
||||||
|
|
||||||
|
StartBat = ":: " + Information + Chars.LF + Chars.LF + Start;
|
||||||
|
StartBash = "# " + Information + Chars.LF + Chars.LF + Start;
|
||||||
|
|
||||||
|
Else
|
||||||
|
|
||||||
|
StartBat = Start;
|
||||||
|
StartBash = Start;
|
||||||
|
|
||||||
|
EndIf;
|
||||||
|
|
||||||
BatSeparator = " ^" + Chars.LF + " ";
|
BatSeparator = " ^" + Chars.LF + " ";
|
||||||
BashSeparator = " \" + Chars.LF + " ";
|
BashSeparator = " \" + Chars.LF + " ";
|
||||||
|
|
||||||
BatString = "oint " + Library + " " + Method + BatSeparator + StrConcat(OptionsArray, BatSeparator);
|
BatString = StartBat + Library + " " + Method + BatSeparator + StrConcat(OptionsArray, BatSeparator);
|
||||||
BashString = "oint " + Library + " " + Method + BashSeparator + StrConcat(OptionsArray, BashSeparator);
|
BashString = StartBash + Library + " " + Method + BashSeparator + StrConcat(OptionsArray, BashSeparator);
|
||||||
|
|
||||||
GetBinaryDataFromString(BatString).Write(MethodCatalog + "/bat.txt");
|
GetBinaryDataFromString(BatString).Write(MethodCatalog + "/bat.txt");
|
||||||
GetBinaryDataFromString(BashString).Write(MethodCatalog + "/bash.txt");
|
GetBinaryDataFromString(BashString).Write(MethodCatalog + "/bash.txt");
|
||||||
|
@ -2051,17 +2051,43 @@ Procedure WriteCLICall(Val Library, Val Method, Val Options)
|
|||||||
EndIf;
|
EndIf;
|
||||||
|
|
||||||
OptionsArray = New Array;
|
OptionsArray = New Array;
|
||||||
|
FindJSON = False;
|
||||||
|
|
||||||
For Each Option In Options Do
|
For Each Option In Options Do
|
||||||
|
|
||||||
|
If TypeOf(Option.Value) = Type("Structure")
|
||||||
|
Or TypeOf(Option.Value) = Type("Map") Then
|
||||||
|
|
||||||
|
FindJSON = True;
|
||||||
|
|
||||||
|
EndIf;
|
||||||
|
|
||||||
CurrentOption = FormOption(Option.Value, Option.Key);
|
CurrentOption = FormOption(Option.Value, Option.Key);
|
||||||
OptionsArray.Add(CurrentOption);
|
OptionsArray.Add(CurrentOption);
|
||||||
|
|
||||||
EndDo;
|
EndDo;
|
||||||
|
|
||||||
|
Start = "oint ";
|
||||||
|
|
||||||
|
If FindJSON Then
|
||||||
|
|
||||||
|
Information = "JSON data can also be passed as a path to a .json file";
|
||||||
|
|
||||||
|
StartBat = ":: " + Information + Chars.LF + Chars.LF + Start;
|
||||||
|
StartBash = "# " + Information + Chars.LF + Chars.LF + Start;
|
||||||
|
|
||||||
|
Else
|
||||||
|
|
||||||
|
StartBat = Start;
|
||||||
|
StartBash = Start;
|
||||||
|
|
||||||
|
EndIf;
|
||||||
|
|
||||||
BatSeparator = " ^" + Chars.LF + " ";
|
BatSeparator = " ^" + Chars.LF + " ";
|
||||||
BashSeparator = " \" + Chars.LF + " ";
|
BashSeparator = " \" + Chars.LF + " ";
|
||||||
|
|
||||||
BatString = "oint " + Library + " " + Method + BatSeparator + StrConcat(OptionsArray, BatSeparator);
|
BatString = StartBat + Library + " " + Method + BatSeparator + StrConcat(OptionsArray, BatSeparator);
|
||||||
BashString = "oint " + Library + " " + Method + BashSeparator + StrConcat(OptionsArray, BashSeparator);
|
BashString = StartBash + Library + " " + Method + BashSeparator + StrConcat(OptionsArray, BashSeparator);
|
||||||
|
|
||||||
GetBinaryDataFromString(BatString).Write(MethodCatalog + "/bat.txt");
|
GetBinaryDataFromString(BatString).Write(MethodCatalog + "/bat.txt");
|
||||||
GetBinaryDataFromString(BashString).Write(MethodCatalog + "/bash.txt");
|
GetBinaryDataFromString(BashString).Write(MethodCatalog + "/bash.txt");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user