scriptName "fn_exportCfgFunctions";
/*
	Author: Tom_48_97

	Description:
	Exports list of functions for BIKI (https://community.bistudio.com/wiki/Arma_3_CfgFunctions)

	Parameter(s):
		None

	Returns:
	BOOL - true, when it's ended
*/
private ["_text","_list","_child"];
startloadingscreen [""];
_list = [];
_text = "";
_br = tostring [13,10];
diag_log "{| class='wikitable sortable' border='1' style='border-collapse:collapse; font-size:100%;' cellpadding='3px'";
_text = _text + "{| class='wikitable sortable' border='1' style='border-collapse:collapse; font-size:100%;' cellpadding='3px'" + _br;
_text = _text + "! Group" + _br;
_text = _text + "! Category" + _br;
_text = _text + "! Functions" + _br;
_text = _text + "|-" + _br;
{
	_child = configname _x;
	{
		_childChild = configname _x;
		diag_log format ['! %1', _child]; _text = _text + format ['! %1', _child] + _br;
		diag_log format ['! %1', _childChild]; _text = _text + format ['! %1', _childChild] + _br;
		diag_log "|"; _text = _text + "|" + _br;
		{
			[_list,configname _x] call bis_fnc_arrayPush;
			diag_log format [":[[BIS_fnc_%1]]",configname _x]; _text = _text + format [":[[BIS_fnc_%1]]",configname _x] + _br;
		} forEach ((configfile >> "cfgFunctions" >> _child >> _childChild) call bis_fnc_returnchildren);
			diag_log "|-"; _text = _text + "|-" + _br;
	} forEach ((configfile >> "cfgFunctions" >> _child) call bis_fnc_returnchildren);
} forEach ((configfile >> "cfgFunctions") call bis_fnc_returnchildren);
diag_log "|}"; _text = _text + "|}" + _br;
diag_log format [
	"<small style='color:grey;'>Generated by [[%1]] in [[%2]] version %3.%4 by ~~~~</small>",
	_fnc_scriptName,
	productversion select 0,
	(productversion select 2) * 0.01,
	productversion select 3
];
_text = _text + format ["<small style='color:grey;'>Generated by [[%1]] in [[%2]] version %3.%4 by ~~~~</small>", _fnc_scriptName, productversion select 0, (productversion select 2) * 0.01, productversion select 3 ] + _br;
_text = _text + "[[Category:Arma_3:_Editing]]" + _br;
copyToClipboard _text;
endloadingscreen;
true