BIS fnc exportFunctionsToWiki: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(First parameter is an array, using previous version of examples would lead to a script error and the default value of exporting every function to your clipboard.)
m (Text replacement - "{{Feature|Warning|" to "{{Feature|warning|")
 
(31 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma3
____________________________________________________________________________________________
|version1= 1.00


| arma3 |= Game name
|gr1= Diagnostic


|1.00|= Game version
|descr= Export function descriptions to Community Wiki. Exported text will be copied to clipboard in XML format.<br>
____________________________________________________________________________________________
'''Wiki Admins''' can import them using '''[[Special:Import]]'''.<br>
If the page already exists, it will be replaced only when ''timestamp'' is newer.
{{Feature|warning|<div style{{=}}"font-weight: bold; padding: 2em; text-align: center">This function should no longer be used to mass-import functions since the template for function pages has changed drastically!</div>}}


| <pre>/*
|s1= [filter, timestamp] spawn [[BIS_fnc_exportFunctionsToWiki]]


Description:
|p1= filter: [[Array]] - (Optional, default <sqf inline>[]</sqf>) functions filter in format [tags, categories, functions]:
Export function descriptions to Community Wiki.
* tags: [[String]] or [[Array]] of [[String]]s - CfgFunctions tags (e.g., "A3_Oldman"). Use empty string for all of them
Exported text will be copied to clipboard in XML format.
* categories: [[String]] or [[Array]] of [[String]]s - categories (e.g., "Debug"). Use empty string for all of them
Import it to wiki using https://community.bistudio.com/wiki?title=Special:Import
* functions: [[String]] or [[Array]] of [[String]]s - specific function names (e.g., "BIS_fnc_log"). Use empty string for all of them
If the page already exists, it will be replaced only when timestamp is newer.


Parameter(s):
|p2= timestamp: [[String]] - (Optional, default "2006-04-03T17:42:00Z") in format "2013-09-12T16:00:00Z"
0: ARRAY - functions filter in format [<tags>,<categories>,<functions>]
tags: STRING or ARRAY of STRINGs - CfgFunctions tags (e.g., "BIS"). Use empty string for all of them.
categories: STRING or ARRAY of STRINGs - categories (e.g., "Debug"). Use empty string for all of them.
functions: STRING or ARRAY of STRINGs - specific function names (e.g., "BIS_fnc_log"). Use empty string for all of them.
1 (Optional) STRING - timestamp in format "2013-09-12T16:00:00Z"


Returns:
|r1= [[String]] - exported text
STRING - exported text


Example:
|x1= <sqf>[] spawn BIS_fnc_exportFunctionsToWiki; // export all functions</sqf>
Export all functions: [] spawn bis_fnc_exportFunctionsToWiki;
Export all Array functions: [["","Arrays"]] spawn bis_fnc_exportFunctionsToWiki;
Export specific functions: [["","",["BIS_fnc_log","BIS_fnc_param"]]] spawn bis_fnc_exportFunctionsToWiki;
*/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|x2= <sqf>[["", "Arrays"]] spawn BIS_fnc_exportFunctionsToWiki; // export all Array functions</sqf>
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_exportFunctionsToWiki]]; --> |= Syntax
|x3= <sqf>[["", "", ["BIS_fnc_log", "BIS_fnc_param"]]] spawn BIS_fnc_exportFunctionsToWiki; // export specific functions</sqf>


|p1= |= Parameter 1
|exec= spawn
 
| |= Return value
____________________________________________________________________________________________
 
|x1= <code></code> |=
____________________________________________________________________________________________
 
| |= See also


|seealso= [[BIS_fnc_diagWiki]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Diagnostic|{{uc:exportFunctionsToWiki}}]]
[[Category:Functions|{{uc:exportFunctionsToWiki}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:exportFunctionsToWiki}}]]

Latest revision as of 00:25, 2 February 2024

Hover & click on the images for description

Description

Description:
Export function descriptions to Community Wiki. Exported text will be copied to clipboard in XML format.
Wiki Admins can import them using Special:Import.
If the page already exists, it will be replaced only when timestamp is newer.
This function should no longer be used to mass-import functions since the template for function pages has changed drastically!
Execution:
spawn
Groups:
Diagnostic

Syntax

Syntax:
[filter, timestamp] spawn BIS_fnc_exportFunctionsToWiki
Parameters:
filter: Array - (Optional, default []) functions filter in format [tags, categories, functions]:
  • tags: String or Array of Strings - CfgFunctions tags (e.g., "A3_Oldman"). Use empty string for all of them
  • categories: String or Array of Strings - categories (e.g., "Debug"). Use empty string for all of them
  • functions: String or Array of Strings - specific function names (e.g., "BIS_fnc_log"). Use empty string for all of them
timestamp: String - (Optional, default "2006-04-03T17:42:00Z") in format "2013-09-12T16:00:00Z"
Return Value:
String - exported text

Examples

Example 1:
[] spawn BIS_fnc_exportFunctionsToWiki; // export all functions
Example 2:
[["", "Arrays"]] spawn BIS_fnc_exportFunctionsToWiki; // export all Array functions
Example 3:
[["", "", ["BIS_fnc_log", "BIS_fnc_param"]]] spawn BIS_fnc_exportFunctionsToWiki; // export specific functions

Additional Information

See also:
BIS_fnc_diagWiki

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note