I’m not seeing how to access the wikitext for a specific revision via the API.  
I can get the HTML with /page/html/{title}/{revision}, but I don’t see how to 
get the wikitext.  Do I really need to get the HTML and then feed that through 
/transform/html/to/wikitext?  That seems suboptimal.  Not to mention rate 
limited :-(

What I want to do is get the wikitext for every revision of a page.  I’m 
thinking of building something like WikiBlame 
<http://wikipedia.ramselehof.de/wikiblame.php?user_lang=en&lang=en&project=wikipedia&article=User:RoySmith/American_Bank_Note_Company_Printing_Plant&needle=building&skipversions=0&ignorefirst=0&limit=500&offmon=10&offtag=2&offjahr=2017&searchmethod=int&order=desc&user=>,
 but with a nicer interface.  I’m thinking of something like displaying the 
page in much the same style as it’s normally displayed, but with each 
contiguous piece of text from a given revision set off visually (perhaps color 
shading to show age?), and a mouseover giving revision details (user, date, 
etc).







> On Oct 1, 2017, at 12:10 AM, Alex Monk <[email protected]> wrote:
> 
> The MediaWiki schema description is only valid for the underlying
> database, you do not have access to that as a labs user - you just
> have security-sanitised views. rev_text_ids are not useful to you as
> you cannot access revision texts via the DBs - you must go through the
> API.
> 
> On 1 October 2017 at 04:31, Roy Smith <[email protected]> wrote:
>> I’ve been exploring the enwiki database.  I can find the page row for
>> [[Iron]]
>> 
>> MariaDB [enwiki_p]> select page_title from page where page_id = 14734;
>> +------------+
>> | page_title |
>> +------------+
>> | Iron       |
>> +------------+
>> 
>> 
>> It looks like it has the right number of revisions:
>> 
>> MariaDB [enwiki_p]> select count(*) from revision where rev_page = 14734;
>> +----------+
>> | count(*) |
>> +----------+
>> |     5560 |
>> +----------+
>> 
>> 
>> But, all of the rev_text_ids are 0
>> 
>> MariaDB [enwiki_p]> select rev_text_id from revision where rev_page = 14734
>> and rev_text_id != 0;
>> Empty set (0.02 sec)
>> 
>> 
>> The schema description seems pretty straight-forward.  What am I not
>> understanding?
>> 
>> _______________________________________________
>> Cloud mailing list
>> [email protected]
>> https://lists.wikimedia.org/mailman/listinfo/cloud
>> 
> 
> _______________________________________________
> Cloud mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/cloud

_______________________________________________
Cloud mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/cloud

Reply via email to