Re: [Wikitech-l] Automating Main Page with Lua

2013-06-17 Thread Brian Wolff
On 2013-06-17 4:20 PM, "Paul Selitskas"  wrote:
>
> Turning back to the automating thing and the Main Page.
>
> I've got tired updating the Other Wikipedias section (congratulations to
> the Swedish Wikipedia!), so I wrote some code to automate the job.
>
> There is a bot that updates different statistics per wiki. I decided to
> parse the data page and push it through a mediawiki message to avoid
> hard-coded pieces of text inside.
>
> Here we have to expensive parts: getContent() for a template with
necessary
> data, and retrieving a message for the view. Is it OK to have expensives
at
> the Main Page?
>
> The module is placed here: 
>
> --
> З павагай,
> Павел Селіцкас/Pavel Selitskas
> Wizardist @ Wikimedia projects
> ___
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l

[Just personal opinion. Not an "official" answer] - main page is cached
like any other page. The expensive function is more a deterrent against
someone putting 1000 such calls on a page. A single getContent should not
be an issue, even on a widely viewed page.

-bawolff
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

[Wikitech-l] Automating Main Page with Lua

2013-06-17 Thread Paul Selitskas
Turning back to the automating thing and the Main Page.

I've got tired updating the Other Wikipedias section (congratulations to
the Swedish Wikipedia!), so I wrote some code to automate the job.

There is a bot that updates different statistics per wiki. I decided to
parse the data page and push it through a mediawiki message to avoid
hard-coded pieces of text inside.

Here we have to expensive parts: getContent() for a template with necessary
data, and retrieving a message for the view. Is it OK to have expensives at
the Main Page?

The module is placed here: 

-- 
З павагай,
Павел Селіцкас/Pavel Selitskas
Wizardist @ Wikimedia projects
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l