Bogleheads talk:Imported Wikipedia modules

Table update
I intend to update the table utilizing the MediaWiki API implemented in python.

Approach

 * Generate an API query string.
 * Extract the page title and timestamp (latest revision date)
 * Build the wikitext table
 * mw-datatable class
 * Page title formatted as internal link Page title
 * timestamp formatted appropriately

API query
The query is defined through the wiki's built-in API sandbox. Special pages --> Version --> /w/api.php --> Special:ApiSandbox

An initial prototype was developed at MediaWiki.org. API sandbox - MediaWiki uses a full text search. However, using the same query here produced no results. This is likely due to MediaWiki.org using a later version customized for Wikipedia.

The "allpages" list can not be customized to add a revision property. Instead, I ended up with an "allrevisions" list query.

The working API sandbox query: API sandbox - Bogleheads

Click "Make request", then go to the Results section on the left-side menu.


 * Show request data as: JSON
 * "Request JSON:" are the parameters for the python request.

Documentation: API:Allrevisions - MediaWiki - scroll down to the Sample code for the python implementation. There's also a ton of help via google.

Discussion
This effort is open to all wiki editors. Feel free to work on your own approach. Comments on my approach are also welcome. --LadyGeek 13:45, 11 January 2023 (UTC)