Misplaced Pages

Module:Params/doc/link to the code/doc: Difference between revisions

Article snapshot taken from[REDACTED] with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
< Module:Params | doc | link to the code Browse history interactively← Previous editContent deleted Content addedVisualWikitext
Revision as of 12:48, 27 May 2024 editGrufo (talk | contribs)Extended confirmed users4,609 edits Updating the list: New section← Previous edit Latest revision as of 18:56, 1 October 2024 edit undoGrufo (talk | contribs)Extended confirmed users4,609 edits Update the list of functions 
(12 intermediate revisions by 2 users not shown)
Line 2: Line 2:


== Usage == == Usage ==

* <syntaxhighlight lang="wikitext" inline>{{module:params/doc/link to the code|squeezing}}</syntaxhighlight>
*: {{module:params/doc/link to the code|squeezing}} * {{demo inline|<nowiki>{{module:params/doc/link to the code|squeezing}}</nowiki>}}
* <syntaxhighlight lang="wikitext" inline>{{module:params/doc/link to the code|cutting|Lorem ipsum}}</syntaxhighlight> * {{demo inline|<nowiki>{{module:params/doc/link to the code|cutting|Lorem ipsum}}</nowiki>}}
*: ↳ {{module:params/doc/link to the code|cutting|Lorem ipsum}}


== Complete list of the links generated == == Complete list of the links generated ==
Line 11: Line 10:
* <code>{{module:params/doc/link to the code|non-sequential}}</code> * <code>{{module:params/doc/link to the code|non-sequential}}</code>
* <code>{{module:params/doc/link to the code|all_sorted}}</code> * <code>{{module:params/doc/link to the code|all_sorted}}</code>
* <code>{{module:params/doc/link to the code|reassorted}}</code>
* <code>{{module:params/doc/link to the code|setting}}</code> * <code>{{module:params/doc/link to the code|setting}}</code>
* <code>{{module:params/doc/link to the code|squeezing}}</code> * <code>{{module:params/doc/link to the code|squeezing}}</code>
Line 21: Line 21:
* <code>{{module:params/doc/link to the code|rotating}}</code> * <code>{{module:params/doc/link to the code|rotating}}</code>
* <code>{{module:params/doc/link to the code|sorting_sequential_values}}</code> * <code>{{module:params/doc/link to the code|sorting_sequential_values}}</code>
* <code>{{module:params/doc/link to the code|imposing}}</code>
* <code>{{module:params/doc/link to the code|providing}}</code>
* <code>{{module:params/doc/link to the code|discarding}}</code>
* <code>{{module:params/doc/link to the code|with_name_matching}}</code> * <code>{{module:params/doc/link to the code|with_name_matching}}</code>
* <code>{{module:params/doc/link to the code|with_name_not_matching}}</code> * <code>{{module:params/doc/link to the code|with_name_not_matching}}</code>
Line 28: Line 31:
* <code>{{module:params/doc/link to the code|mapping_by_calling}}</code> * <code>{{module:params/doc/link to the code|mapping_by_calling}}</code>
* <code>{{module:params/doc/link to the code|mapping_by_invoking}}</code> * <code>{{module:params/doc/link to the code|mapping_by_invoking}}</code>
* <code>{{module:params/doc/link to the code|mapping_blindly_by_calling}}</code> * <code>{{module:params/doc/link to the code|mapping_by_magic}}</code>
* <code>{{module:params/doc/link to the code|mapping_blindly_by_invoking}}</code> * <code>{{module:params/doc/link to the code|renaming_by_calling}}</code>
* <code>{{module:params/doc/link to the code|renaming_blindly_by_calling}}</code> * <code>{{module:params/doc/link to the code|renaming_by_replacing}}</code>
* <code>{{module:params/doc/link to the code|renaming_blindly_by_invoking}}</code> * <code>{{module:params/doc/link to the code|renaming_by_invoking}}</code>
* <code>{{module:params/doc/link to the code|renaming_by_magic}}</code>
* <code>{{module:params/doc/link to the code|renaming_by_replacing}}</code>
* <code>{{module:params/doc/link to the code|grouping_by_calling}}</code>
* <code>{{module:params/doc/link to the code|count}}</code> * <code>{{module:params/doc/link to the code|count}}</code>
* <code>{{module:params/doc/link to the code|concat_and_call}}</code> * <code>{{module:params/doc/link to the code|concat_and_call}}</code>
* <code>{{module:params/doc/link to the code|concat_and_invoke}}</code> * <code>{{module:params/doc/link to the code|concat_and_invoke}}</code>
* <code>{{module:params/doc/link to the code|concat_and_magic}}</code> * <code>{{module:params/doc/link to the code|renaming_by_magic}}</code>
* <code>{{module:params/doc/link to the code|value_of}}</code> * <code>{{module:params/doc/link to the code|value_of}}</code>
* <code>{{module:params/doc/link to the code|list}}</code> * <code>{{module:params/doc/link to the code|list}}</code>
Line 52: Line 58:
After each update in the code of ] the list of line numbers stored in this template needs to be updated. If you use ] or other ] operating systems you can do that automatically by launching: After each update in the code of ] the list of line numbers stored in this template needs to be updated. If you use ] or other ] operating systems you can do that automatically by launching:


<syntaxhighlight lang="sh">cat params.lua | grep -n '^library.\|^iface.self' | sed 's/\(library\|iface\)\(\.\|\\|\s*=\s*function(\+)//g;s/^\(\+\):\(.\+\)$/ | \2 = L-\1/g'</syntaxhighlight> <syntaxhighlight lang="sh">grep -n '^library.\|^static_iface.' params.lua | sed 's/\(library\|static_iface\)\(\.\|\\|\s*=\s*function\s*(\+)//g;s/^\(\+\):\(.\+\)$/ | \2 = L-\1/g'</syntaxhighlight>


<includeonly>{{Sandbox other|| <includeonly>{{Sandbox other||

Latest revision as of 18:56, 1 October 2024

This is a helper template for the documentation of Module:Params that creates a link to the line in the Lua code where a function or a modifier is declared.

Usage

  • {{module:params/doc/link to the code|squeezing}}squeezing
  • {{module:params/doc/link to the code|cutting|Lorem ipsum}}Lorem ipsum

Complete list of the links generated

Updating the list

After each update in the code of Module:Params the list of line numbers stored in this template needs to be updated. If you use GNU or other Unix-like operating systems you can do that automatically by launching:

grep -n '^library.\|^static_iface.' params.lua | sed 's/\(library\|static_iface\)\(\.\|\\|\s*=\s*function\s*(\+)//g;s/^\(\+\):\(.\+\)$/		| \2 = L-\1/g'


Module:Params/doc/link to the code/doc: Difference between revisions Add topic