[Bf-docboard] Fw: Extract all wiki.blender.org links/sub-pages

Marcin Cieslak saper at saper.info
Fri Jan 8 17:02:58 CET 2016


On Fri, 8 Jan 2016, hewi jupama wrote:

> The most interesting is the list of pages.  While the link
> "http://wiki.blender.org/index.php/Special:AllPages" is very helpful,
> I would preferably like to see it being generated as a simple txt
> file.  Easier to parse you know.

Not so easy. The data are structured, you only get first N entries
and you have to continue asking for more.

> Unfortunatelly, I can not seem to work the php script of the API to
> start enumerating all pages.  Even though I have logged in.  Some
> advise regarding this issue?

Not enough information to help. Please use some ready to use MediaWiki API
framework to do this job and don't waste time on writing it yourself.
Many issues will be solved for you - login, getting all the results,
converting the results to plain strings etc.

Here's the list for PHP:

https://www.mediawiki.org/wiki/API:Client_code#PHP

but there are a lot more as you can see on the page.

> Final question is regarding the menu on the left.  It is always the
> same, content independent.  How is this menu generated?  Is it fixed
> or can it be altered? eg there is currently already blender 2.7 and
> soon 2.8, where do these live?

This is a bit more complex.

The page-tree and the page menu dropdown on the left sidebar
are special features of the Naiad skin, designed for the Blender
wiki. 

Here is more information about it:

http://wiki.blender.org/index.php/Meta:Skins/Naiad/Mediawiki

The contents of the drop down is taken from the sidebar definition:

http://wiki.blender.org/index.php?title=MediaWiki:NavTree_TopPages&action=edit

The tree menu is done via this template:

http://wiki.blender.org/index.php?title=MediaWiki:NavTree

Language selector at the top is done via

http://wiki.blender.org/index.php?title=MediaWiki:Languages&action=edit

Links at the bottom are done via

http://wiki.blender.org/index.php?title=MediaWiki:SearchSeries&action=edit
http://wiki.blender.org/index.php/MediaWiki:SearchLanguages

All those above are using a pretty complex construction
of MediaWiki templates.

You can see the code doing all of this here:

https://svn.blender.org/svnroot/blend-doc/trunk/wiki/mediawiki


Marcin


More information about the Bf-docboard mailing list