Page MenuHomePhabricator

Allow specifying what namespaces to generate sitemaps for, from the php command line
Open, LowestPublic

Description

There is no way to specify what namespaces to generate sitemaps for
from the command line.

One ends up having e.g.,

$wgSitemapNamespaces=array(NS_MAIN,NS_TALK,NS_USER,NS_USER_TALK,NS_PROJECT,
NS_PROJECT_TALK,NS_TEMPLATE_TALK,NS_HELP,NS_HELP_TALK,NS_CATEGORY,NS_CATEGORY_TALK);

sitting around LocalSettings.php, read on every page view all day long,
even though one only generates sitemaps once a month. Or else one must append it each
time one wants to make a sitemap.

There isn't even a way to somehow on the command line
$ php [TELL PHP THOSE VALUES HERE] generateSitemap.php --server=http://.... --fspath=../


Version: 1.14.x
Severity: enhancement

Details

Reference
bz17748

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:31 PM
bzimport set Reference to bz17748.
bzimport added a subscriber: Unknown Object (MLST).
Jidanni created this task.Mar 2 2009, 5:10 AM
Aklapper added a comment.EditedAug 30 2014, 9:49 PM

Could you elaborate on the underlying motivation / usecase here?
Would you like to create sitemaps for certain namespaces once a month, while more or less often for other namespaces? Does

sitting around LocalSettings.php, read on every page view all day long

imply some performance concerns?

(For the records: https://www.mediawiki.org/wiki/Manual:GenerateSitemap.php and T32344 implemented $wgSitemapNamespacesPriorities.)

All I know is I have a cron job that runs once a month to generate sitemaps,
and I have to put the specifications for in in LocalSettings.php, which is read a million times a month. What a waste!

s/in in/it in/

All items controlled by the script should be adjustable independently of LocalSettings.php .

Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptDec 15 2016, 6:55 PM
Aklapper lowered the priority of this task from Low to Lowest.Dec 15 2016, 6:57 PM

I have to put the specifications for in in LocalSettings.php, which is read a million times a month. What a waste!

As I asked before: Is that a performance issue? What is the problem with the current situation?

Aklapper updated the task description. (Show Details)Dec 15 2016, 6:58 PM
Aklapper removed a subscriber: wikibugs-l-list.
Meno25 removed a subscriber: Meno25.Jan 17 2017, 3:50 PM

LocalSettings might not be owned by the same people making the sitemaps.

You could just specify a different location of LocalSettings.php with --conf, there you can have your extra $wgSitemapNamespaces?

OK but then need a --conf LocalSettings.php --conf Extra.php for convenience.