More actions
m →Parameters: typo |
m moved How to Edit type info over to Help:Contributing to Patch Notes |
||
(42 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=Overview= | =Overview= | ||
Generates | Generates lines of changes for all data pages. See <nowiki>[[Category:Changelog Dates]]</nowiki> for the dates of all changelogs, and [[Changelogs]] for list of all the data pages that contain a Changelog. | ||
= | =Functions= | ||
All of these functions are callable by wikitext, i.e. <code><nowiki>{{#invoke|Changelog|invokable_name|param1|paramN}}</nowiki></code> | |||
== | ==write_changelog_by_tag== | ||
The main invokable that will be used. Given a specific tag, it outputs all relevant changelogs from all dates in a [[Template:Update history table]]. | |||
= | ===Parameters=== | ||
* '''tag''' - Tag to search relevant changelogs for. Should be localized, i.e. Abrams for hero_atlas in english. | |||
* '''num_dates''' - (OPTIONAL) Number of dates to add, recommend 3 for articles. If unprovided, defaults to all. | |||
===Examples=== | |||
For use on [[Pocket/Update history]]: | |||
<code><nowiki>{{#invoke:Changelog|write_changelog_by_tag|Pocket}}</nowiki></code> | |||
Outputs | |||
{{#invoke:Changelog|write_changelog_by_tag|Pocket}} | |||
For use on [[Pocket#Update history]]: | |||
<code><nowiki>{{#invoke:Changelog|write_changelog_by_tag|Pocket|3}}</nowiki></code> | |||
Outputs | |||
{{#invoke:Changelog|write_changelog_by_tag|Pocket|3}} | |||
==write_changelog_by_date_id== | |||
Write's a specific date's changelog, as opposed to a specific tag's changelog. | |||
===Parameters=== | |||
* '''date_id_to_write''' - Date-id to write, format yyyy-mm-dd, view all at <nowiki>[[Category:Changelog Dates]]</nowiki> | |||
===Examples=== | |||
For a non-herolab patch page<br> | |||
<code><nowiki>{{#invoke:Changelog|write_changelog_by_date_id|2024-05-03}}</nowiki></code> | |||
{{#invoke:Changelog|write_changelog_by_date_id|2024-05-03}} | |||
For a herolab patch page<br> | |||
<code><nowiki>{{#invoke:Changelog|write_changelog_by_date_id|2024-12-06_HeroLab}}</nowiki></code> | |||
{{#invoke:Changelog|write_changelog_by_date_id|2024-12-06_HeroLab}} | |||
==write_data_pages_list== | |||
Writes list of all changelog data pages using the list of patches at [[Data:ChangelogConfigs.json]]. Used on <nowiki>[[Category:Changelog Dates]]</nowiki>. | |||
===Parameters=== | |||
None | |||
===Examples=== | |||
<code><nowiki>{{#invoke:Changelog|write_data_pages_list}}</nowiki></code> | |||
Outputs | |||
{{#invoke:Changelog|write_data_pages_list}} | |||
== | ==get_last_updated== | ||
Retrieve the last (or first) date that a tag was updated on. Planned to be used on a given tag's page, i.e. [[Abrams]]'s infobox could mention that it was last updated on 2024-05-03, or that Mirage was released on 2024-05-03, etc. | |||
===Parameters=== | ===Parameters=== | ||
* ''' | * '''tag''' - Tag to search | ||
* '''last_or_first''' - Named optional - Must be ''last'' or ''first'' - defaults to ''last'' - Retrieves last or first date | |||
===Examples=== | ===Examples=== | ||
Example using ''last'' | |||
<code><nowiki>{{#invoke:Changelog|get_last_updated|Basic Magazine}}</nowiki></code> | |||
Outputs | Outputs | ||
{{#invoke:Changelog| | {{#invoke:Changelog|get_last_updated|Basic Magazine}} | ||
Example using ''first'' | |||
<code><nowiki>{{#invoke:Changelog|get_last_updated|Basic Magazine|last_or_first=first}}</nowiki></code> | |||
Outputs | |||
= | {{#invoke:Changelog|get_last_updated|Basic Magazine|last_or_first=first}} | ||