Vocaloid Wiki
Vocaloid Wiki

An Unicorn disguised in Xingchen: the chibi on Tokikobot's template.

On VOCALOID Wiki we have several bot accounts. The two oldest ones are Tasks126, a bot account belonging to Xuanmien ; and Decembirth, belonging to Bunai. These two bots use the AWB program, an interface permitting for the bots to make many massive and repetitive tasks.

And I'm here to introduce you Tokikobot... It's been one year this little bot is running through the wiki every 10 days... But it's time to publicly tell what she is used for and her limits.

Introducing... Tokikobot

If you can give an alternative and "less pretty" name to Tokikobot, this would be the acronym VWVCU, or VOCALOID Wiki View Counts Update.

The name of Tokikobot is... Not a derivative of my name, but it's inspired by the name of Tokiko Zaizen in the game The iDOLM@STER Cinderella Girls. It's even her avatar. So, Tokiko Zaizen -> Tokiko -> Tokikobot. Here goes the logic.

These details aside, Tokikobot is not using AWB compared to her little comrades, but a JavaScript utility using npm. Tokikobot is thus using a script and not a proper interface. This script is run on a remote server (provided by Kocka, who coded her whole script) and requires about 4h to be completed. Tokikobot can be set on several parameters to determine the target account to use (here, this would be herself) and is set to update a certain number of pages containing the template Song box 2.

Before she existed...

View counts were approximate and had to be updated by hand. Later, administrative team decided the view counts to be exact, since the template for the view counts is already displaying an approximate for the current count, thus implying that a too rounded account can show a wrong count on the final template. There was still an issue, the task of updating the view counts itself.

VWVCU got coded by Kocka then used on his own bot account, KockaBot. So for a while, the wiki team had to ping Kocka every 10 days to run the bot. Then arrived the day Kocka had to take a break from Fandom, thus requiring the creation of a new bot account that could be accessed easily by one active staff member. Tokikobot was born.

Finally, after receiving her bot tag, the VWVCU task got transferred to Tokikobot, and since then, every 10 days, she runs through the whole wiki.

Typically, how the VWVCU bot works

There are some things to keep in mind with Tokikobot. She has a list of pages she creates each time, but there are things to be very careful about:

  • the first thing is that unlike her "masteress", Tokikobot doesn't have any special accesses. She can't edit the pages being sysop locked, thus requiring a manual update. The number of the concerned pages can be counted on a single hand though.
  • she has to see if there is a supported provider. Currently, she supports Niconico, bilibili, YouTube, piapro, Soundcloud, which are the main providers having view counts. Bandcamp doesn't have any view count so is not supported for example. 5Sing doesn't give view counts, AcFun went unsupported due to the view count being always rounded.
  • the links and the view counts must be in the same order. Imagine Tokikobot sees a template of links for NND, then YT, but the view counts are ordered as such: YT then NND. Tokikobot will just see the order of the templates and may put the NND view count to the YT video and same goes for the other... So be careful to the order!
  • the thousands, millions etc. separators have to be comas. If they are absent, or if they are dots ("."), Tokikobot will just ignore the view count... It won't block her, she just... Won't care.

Tokikobot will first see if the links given in the link templates are active. If they are, she will retrieve in their API the view count. She will compare the one on the page and the one she retrieved in the API. If they are different, she will update the counts. And finished!

Her limits

Dead links

The main issue with Tokikobot currently is the case of pages where at least one link is defunct. A video went private, got deleted, or went somewhere that can't be reached, and Tokikobot will throw an error in her logs... And jump off the page. This is one of the main cases of "bot failure". And a SINGLE link is enough to make her jump off the page.

To see why she is not updating a page, and that this page is not sysop locked, if you see one of the links being dead, you have the right to manually update the page.

The separators

As said earlier, if the separators for the thousands, the millions etc. are something else than "," , Tokikobot will ignore the view count.

For example:

  • 3,785 can be updated
  • 3.785 CAN NOT
  • 3785 NEITHER

YouTube API tricks

This issue appeared more recently than the two others. Google limits the API to a certain daily limit. The number of pages Tokikobot has to treat per full run goes over this limit.

At which point you may ask? For 7,000 pages, she can do a bit more than 6,000 correctly.

Before the issue got fixed, what happened is that if Tokikobot went over the daily limit of the YouTube API, if one page contained one YouTube link, she failed to update the page.

The issue got fixed only at the end of March 2020, implying Tokikobot to be run in a slightly different way. First, Tokikobot required a single run in a row. Now, she requires two sub-runs. The first sub-run is done at the same time as the former normal run would be. She stops this sub-run once she hits the API daily limit for YouTube, and saves all the page names she didn't treat yet in a list file. The next sub-run is done near 12h later, once the daily limit gets reset (at midnight PST), and with a slightly different command on npm (Tokikobot will run a sub-list).

Some cases she doesn't see the counts well?

If the page contains a tabber for the song infoboxes, check well that Tokikobot updates all counts, since in some cases she will only do a partial update (most of cases, first tabber tab only). If she does this update as such, think to finish her work off... :)

In which cases should we MANUALLY update the view counts?

  • The page contains a dead link in the song infobox
  • The page is locked at sysop level (call a mod or an admin)
  • The page is only partially updated but when manually checking, some counts difference is too flagrant (second tab of a tabber, "no" argument in v template...)

Cases where Tokikobot is used for other purposes

Tokikobot is also used in some cases, but in manual mode (the edits often have a special beacon such as "[HUMAN MODE]"):

  • sometimes I have huge and massive tasks to do, and for which an automation is too delicate or not done yet. One of the current ones is converting Derivatives to Derivative (and some other conversions at the same time). Doing this on my human account would just flood the activity's feed. So Tokikobot will be used to avoid this flood.
  • in most rare cases to hide some edits (full conversions on non-classical namespaces, or need to be hidden, for example)

In these cases there will always be an indication that this edit is not done by the script, such as "[HUMAN MODE]" or "(guided edit)". This means this is a human edit done on a bot account, most of times to hide the edit (risk of flooding the activity feed).

To retain!

Tokikobot is mainly used for updating the view counts on the whole wiki. Sometimes she may be used to hide some of the human edits of her masteress when the situation implies it (massive tasks). But she was born from the necessity of removing a huge task from any human editor.

Finished the times when you have to update the view counts! (unless Tokikobot can't do it by herself of course...)