User:Rizbot: Difference between revisions

From Rhythm Game Wiki
Jump to navigation Jump to search
Created page with "A bot created by User:TadeLn that automatically updates ''Rizline:Rizline'' data on the wiki. == Functionality == This bot is a work-in-progress. Currently there is no functionality, but in the future, the bot is planned to update parts of the following pages automatically: * Rizline:List of songs * Pages in Category:Rizline songs ** RizlineSongInfoBox templates ** Song statistics - note counts, colors, etc. ** Asset tables The sections that the bot..."
 
 
(32 intermediate revisions by 2 users not shown)
Line 1: Line 1:
A bot created by [[User:TadeLn]] that automatically updates ''[[Rizline:Rizline|Rizline]]'' data on the wiki.
{{WikiBotInfoBox
| name = Rizbot
| description = A bot that automatically updates Rizline pages with game data.
| creator = [[User:TadeLn]]
| source = [https://gitlab.com/TadeLn/mediawiki-rizbot GitLab]
| license = [https://gitlab.com/TadeLn/mediawiki-rizbot/-/raw/main/LICENSE GNU General Public License v3.0]
}}


== Functionality ==
A bot created by [[User:TadeLn]] that automatically updates ''[[Rizline:Rizline|Rizline]]'' data on the wiki. Source code is available on [https://gitlab.com/TadeLn/mediawiki-rizbot GitLab].


This bot is a work-in-progress. Currently there is no functionality, but in the future, the bot is planned to update parts of the following pages automatically:
== Status ==


* [[Rizline:List of songs]]
=== Last login ===
* Pages in [[:Category:Rizline songs]]
{{/login}}
** RizlineSongInfoBox templates
** Song statistics - note counts, colors, etc.
** Asset tables


The sections that the bot should edit are marked with special tags within HTML comments:
=== Latest processing results ===
* <code><nowiki><!-- ##</nowiki> RIZ<nowiki/>BOT <nowiki/> BEGIN section_type <nowiki>## --></nowiki></code>, and
{{/results short}}
* <code><nowiki><!-- ##</nowiki> RIZ<nowiki/>BOT <nowiki/> END section_type <nowiki>## --></nowiki></code>,
 
where <code>section_type</code> is the type of the section that the bot should generate (for example, <code>rizline_song_info_box</code>, or <code>rizline_song_stats</code>).
== Functionality and scope ==
 
This bot is a work-in-progress. Currently not all functionality is implemented.
 
=== Input ===
The bot fetches JSON data from the following pages (in the <code>Rhythm Game Wiki:</code> namespace) to generate blocks of wikitext:
{{Special:PrefixIndex/Rhythm Game Wiki:Rizbot/data}}
 
Input JSON files can be divided into two main categories: '''basic data''' and '''extra data'''.
* '''Basic data''' is data that is stored directly in the game files. JSON input files with ''basic data'' can be easily recreated by converting game data into JSON; no additional information is required. For example: [[Rhythm Game Wiki:Rizbot/data/rizline_song_data.json]], which contains a list of songs, can easily be generated from the [[Rizline:AssetList|AssetList]] file, located inside ''[[Rizline:Rizline|Rizline]]''<nowiki/>'s game files.
* '''Extra data''' is data that usually provides additional information about items in ''basic data''. The data inside ''extra data'' input JSON files is not stored anywhere in the game, or is stored in places such that it is not easy to extract it automatically. ''Extra data'' is created manually and cannot be recreated from the game files by themselves. For example: [[Rhythm Game Wiki:Rizbot/data/rizline_extra_song_data.json]] contains additional song metadata such as: song price, release version, and additional requirements for obtaining the song in [[wikipedia:wikitext|wikitext]]. Some of the data in ''extra data'' files (such as wikitext descriptions of items) is only useful within the context of this wiki.
 
Both types of data files are used together to generate Rizbot blocks. The data is divided in this way to allow for easier automatic updating and generation of ''basic data'' when the game updates, while preserving  the ''extra data'' which cannot be easily generated from the game files.
 
=== Output ===
When run, the bot automatically updates:
* The list of achievements (using the [[#rizline_achievement_list]] command)
** [[Rizline:Bio]]
* The list of non-achievement bio tags (using the [[#rizline_bio_list]] command)
** [[Rizline:Bio]]
* Instances of [[Template:RizlineSongInfoBox|RizlineSongInfoBox]] templates (using the [[#rizline_song_info_box]] command), which are in all pages contained in [[:Category:Rizline songs]].
* Lists of songs (using the [[#rizline_song_list]] command), which are in the following pages:
** [[Rizline:List of songs]]
** [[Rizline:Disc 1]]
** [[Rizline:Disc 2]]
** [[Rizline:Disc EX]]
** [[Rizline:Coin]]
* The list of sound effects (using the [[#rizline_sound_list]] command)
** [[Rizline:Sound effects]]
 
Planned functionality includes automatic updating and generation of:
* Song statistics - note counts, colors, etc.
* Asset tables for songs
 
== Usage ==
 
When run, the bot searches the wiki for specific markers within HTML comments (described below), and finds the appropriate function to use. It then replaces the text between the <code>BEGIN</code> and <code>END</code> markers with generated content. If the content is different from what it was originally, the bot makes an edit and saves the new version of the page.
 
Currently the bot is ran manually by [[User:TadeLn]]. If you need the bot to be ran, you can ask [[User:TadeLn]] to do so, by sending a message on Discord, or sending an e-mail via the wiki.
 
The sections that the bot should edit are indicated manually with markers:
* <code><nowiki><!-- ##</nowiki> RIZ<nowiki/>BOT <nowiki/> BEGIN <nowiki>## command_name [arg1 [arg2...]] --></nowiki></code>, and
* <code><nowiki><!-- ##</nowiki> RIZ<nowiki/>BOT <nowiki/> END <nowiki>## command_name --></nowiki></code>,
where <code>command_name</code> is the type of the section that the bot should generate (for example, <code>rizline_song_info_box</code>, or <code>rizline_song_stats</code>). All command names are described below. Additional space-separated arguments may be added after the <code>section_type</code> in the <code>BEGIN</code> marker.
 
'''Warning:''' It is important to remember that anything that is between the <code>BEGIN</code> and <code>END</code> markers will be overwritten. Manual changes to the content in-between the markers will be lost when the bot will be launched again.
 
== Commands ==
 
=== rizline_achievement_list ===
 
To generate a list of achievements using Rizbot, use the following syntax:
<pre>
<nowiki><!-- ##</nowiki> RIZ<nowiki>BOT</nowiki> BEGIN <nowiki>## rizline_achievement_list --></nowiki>
<nowiki><!-- ##</nowiki> RIZ<nowiki>BOT</nowiki> END <nowiki>## rizline_achievement_list --></nowiki>
</pre>
 
This command takes in no additional arguments.
 
 
=== rizline_bio_list ===
 
To generate a list of purchasable bio tags using Rizbot, use the following syntax:
<pre>
<nowiki><!-- ##</nowiki> RIZ<nowiki>BOT</nowiki> BEGIN <nowiki>## rizline_bio_list --></nowiki>
<nowiki><!-- ##</nowiki> RIZ<nowiki>BOT</nowiki> END <nowiki>## rizline_bio_list --></nowiki>
</pre>
 
This command takes in no additional arguments.
 
 
=== rizline_song_info_box ===
 
To generate a song info box using Rizbot, use the following syntax:
<pre>
<nowiki><!-- ##</nowiki> RIZ<nowiki>BOT</nowiki> BEGIN <nowiki>## rizline_song_info_box RizlineLevelID --></nowiki>
<nowiki><!-- ##</nowiki> RIZ<nowiki>BOT</nowiki> END <nowiki>## rizline_song_info_box --></nowiki>
</pre>
 
* <code>RizlineLevelID</code> - Internal ID of the level for which to generate the info box.
** For example: <code>PastelLines.RekuMochizuki.0</code> - Generate a song info box for Pastel Lines. Used in: [[Rizline:Pastel Lines]].
** If song data associated with this ID cannot be found, an error will occur.
 
 
=== rizline_song_list ===
 
To generate a list of songs using Rizbot, use the following syntax:
<pre>
<nowiki><!-- ##</nowiki> RIZ<nowiki>BOT</nowiki> BEGIN <nowiki>## rizline_song_list ListType --></nowiki>
<nowiki><!-- ##</nowiki> RIZ<nowiki>BOT</nowiki> END <nowiki>## rizline_song_list --></nowiki>
</pre>
 
* <code>ListType</code> - One of the values below, indicating the type of the list.
** <code>all</code> - Generate a list of all songs. Used in: [[Rizline:List of songs]].
** <code>disc_1</code> - Generate a list of songs in Disc 1. Used in: [[Rizline:Disc 1]].
** <code>disc_2</code> - Generate a list of songs in Disc 2. Used in: [[Rizline:Disc 2]].
** <code>disc_ex</code> - Generate a list of songs in Disc EX. Used in: [[Rizline:Disc EX]].
** <code>coin</code> - Generate a list of songs purchasable with coins. Used in: [[Rizline:Coin]].
** Any other value will cause an error.
 
 
=== rizline_sound_list ===
 
To generate a list of sound effects using Rizbot, use the following syntax:
<pre>
<nowiki><!-- ##</nowiki> RIZ<nowiki>BOT</nowiki> BEGIN <nowiki>## rizline_sound_list --></nowiki>
<nowiki><!-- ##</nowiki> RIZ<nowiki>BOT</nowiki> END <nowiki>## rizline_sound_list --></nowiki>
</pre>
 
This command takes in no additional arguments.

Latest revision as of 11:26, 8 March 2025

Rizbot
File:WikiBot Rizbot Image.png
Description A bot that automatically updates Rizline pages with game data.
Creator User:TadeLn
Source code GitLab
License GNU General Public License v3.0

A bot created by User:TadeLn that automatically updates Rizline data on the wiki. Source code is available on GitLab.

Status

[edit | edit source]

Last login

[edit | edit source]

Last login to Rizbot occurred at: 2025-01-10T18:35:41.947939211Z (using mediawiki-rizbot)

Latest processing results

[edit | edit source]

Results from 2025-01-09T17:19:14.600911289Z:

87 total | 87 successful, 0 errors | 1 updated pages, 86 unchanged pages

Rizline:Bio - Page edited successfully

Rizline:NightTheater - Page unchanged

Rizline:Grimheart - Page unchanged

Rizline:SAtElLites - Page unchanged

Rizline:Relieve - Page unchanged

Rizline:Power Attack - Page unchanged

Rizline:Intruder - Page unchanged

Rizline:Restricted Access - Page unchanged

Rizline:Turning POINT - Page unchanged

Rizline:天灵灵地灵灵 - Page unchanged


(... see all 87 entries)

Functionality and scope

[edit | edit source]

This bot is a work-in-progress. Currently not all functionality is implemented.

Input

[edit | edit source]

The bot fetches JSON data from the following pages (in the Rhythm Game Wiki: namespace) to generate blocks of wikitext:

Input JSON files can be divided into two main categories: basic data and extra data.

  • Basic data is data that is stored directly in the game files. JSON input files with basic data can be easily recreated by converting game data into JSON; no additional information is required. For example: Rhythm Game Wiki:Rizbot/data/rizline_song_data.json, which contains a list of songs, can easily be generated from the AssetList file, located inside Rizline's game files.
  • Extra data is data that usually provides additional information about items in basic data. The data inside extra data input JSON files is not stored anywhere in the game, or is stored in places such that it is not easy to extract it automatically. Extra data is created manually and cannot be recreated from the game files by themselves. For example: Rhythm Game Wiki:Rizbot/data/rizline_extra_song_data.json contains additional song metadata such as: song price, release version, and additional requirements for obtaining the song in wikitext. Some of the data in extra data files (such as wikitext descriptions of items) is only useful within the context of this wiki.

Both types of data files are used together to generate Rizbot blocks. The data is divided in this way to allow for easier automatic updating and generation of basic data when the game updates, while preserving the extra data which cannot be easily generated from the game files.

Output

[edit | edit source]

When run, the bot automatically updates:

Planned functionality includes automatic updating and generation of:

  • Song statistics - note counts, colors, etc.
  • Asset tables for songs

Usage

[edit | edit source]

When run, the bot searches the wiki for specific markers within HTML comments (described below), and finds the appropriate function to use. It then replaces the text between the BEGIN and END markers with generated content. If the content is different from what it was originally, the bot makes an edit and saves the new version of the page.

Currently the bot is ran manually by User:TadeLn. If you need the bot to be ran, you can ask User:TadeLn to do so, by sending a message on Discord, or sending an e-mail via the wiki.

The sections that the bot should edit are indicated manually with markers:

  • <!-- ## RIZBOT BEGIN ## command_name [arg1 [arg2...]] -->, and
  • <!-- ## RIZBOT END ## command_name -->,

where command_name is the type of the section that the bot should generate (for example, rizline_song_info_box, or rizline_song_stats). All command names are described below. Additional space-separated arguments may be added after the section_type in the BEGIN marker.

Warning: It is important to remember that anything that is between the BEGIN and END markers will be overwritten. Manual changes to the content in-between the markers will be lost when the bot will be launched again.

Commands

[edit | edit source]

rizline_achievement_list

[edit | edit source]

To generate a list of achievements using Rizbot, use the following syntax:

<!-- ## RIZBOT BEGIN ## rizline_achievement_list -->
<!-- ## RIZBOT END ## rizline_achievement_list -->

This command takes in no additional arguments.


rizline_bio_list

[edit | edit source]

To generate a list of purchasable bio tags using Rizbot, use the following syntax:

<!-- ## RIZBOT BEGIN ## rizline_bio_list -->
<!-- ## RIZBOT END ## rizline_bio_list -->

This command takes in no additional arguments.


rizline_song_info_box

[edit | edit source]

To generate a song info box using Rizbot, use the following syntax:

<!-- ## RIZBOT BEGIN ## rizline_song_info_box RizlineLevelID -->
<!-- ## RIZBOT END ## rizline_song_info_box -->
  • RizlineLevelID - Internal ID of the level for which to generate the info box.
    • For example: PastelLines.RekuMochizuki.0 - Generate a song info box for Pastel Lines. Used in: Rizline:Pastel Lines.
    • If song data associated with this ID cannot be found, an error will occur.


rizline_song_list

[edit | edit source]

To generate a list of songs using Rizbot, use the following syntax:

<!-- ## RIZBOT BEGIN ## rizline_song_list ListType -->
<!-- ## RIZBOT END ## rizline_song_list -->
  • ListType - One of the values below, indicating the type of the list.
    • all - Generate a list of all songs. Used in: Rizline:List of songs.
    • disc_1 - Generate a list of songs in Disc 1. Used in: Rizline:Disc 1.
    • disc_2 - Generate a list of songs in Disc 2. Used in: Rizline:Disc 2.
    • disc_ex - Generate a list of songs in Disc EX. Used in: Rizline:Disc EX.
    • coin - Generate a list of songs purchasable with coins. Used in: Rizline:Coin.
    • Any other value will cause an error.


rizline_sound_list

[edit | edit source]

To generate a list of sound effects using Rizbot, use the following syntax:

<!-- ## RIZBOT BEGIN ## rizline_sound_list -->
<!-- ## RIZBOT END ## rizline_sound_list -->

This command takes in no additional arguments.