Page MenuHomePhabricator

PATCH: Minimal skin for use by PDAs, bots and dumps
Closed, ResolvedPublic

Description

Here's a trivial skin that adds close to no HTML around the article text. I
wrote it for including HTML image description in the image dump (work in
progress, feature request will follow sometime). It may also be usedful for
people who use PDAs to view a wiki, and also for bots (less cruft to parse, less
bytes to load).

patch to follow in a minute.


Version: unspecified
Severity: enhancement

Details

Reference
bz3651

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:51 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz3651.
bzimport added a subscriber: Unknown Object (MLST).

Created attachment 953
skins/Raw.php - raw skin (new file, not patched against CVS but against a dummy file)

attachment raw.diff ignored as obsolete

Created attachment 955
skins/Raw.php - IMPROVED raw skin (new file, not patched against CVS but against a dummy file)

the new patch adds:

  • DOCTYPE declaration and similar xhtml cruft
  • http-equiv tags
  • interlanguage links

The output now validates as XHTML.

Attached:

mets501wiki wrote:

Can we think about getting this implemented?

ayg wrote:

Isn't this what action=render is for?

garyvdm wrote:

Well action=render only allows you to view a page. This skin makes all pages minimal.

Wiki.Melancholie wrote:

This skin would reduce server traffic, resulting from those many wiki bots out there, a lot!

Test it with [[Volume]]!
*When editing with 'full' monobook skin the page has >70KB
*When removing all that unnecessary cruft the page has <10KB

All page requests (many!) and finally bot edits (rather few) would produce much less traffic!

Another idea would be to let bots edit through the new API (/w/api.php).
A XML output would be as minimalistic as this skin...

nicdumz wrote:

(In reply to comment #4)

Isn't this what action=render is for?

mmm... I do agree, but it does not work if you want to actually get the wikitext of the page / edit the page. The actual methode used by pywikipedia is action=edit, and it is quite slow.

Surely, we are working on a rewrite using the API, and our first results clearly indicate, if necessary, that this method is faster. But using the API to get the content does not make much sense if you eventually need to get action=edit to put your content...

(In reply to comment #7)

Surely, we are working on a rewrite using the API, and our first results
clearly indicate, if necessary, that this method is faster. But using the API
to get the content does not make much sense if you eventually need to get
action=edit to put your content...

Actually, editing through the API was finished some time ago, and it'll be included in the 1.13 release. The point is getting it enabled on Wikipedia (or at least at TestWiki for a start), which Brion either hasn't had time for or is unwilling to do.

mike.lifeguard+bugs wrote:

(In reply to comment #0)

Here's a trivial skin that adds close to no HTML around the article text. I
wrote it for including HTML image description in the image dump (work in
progress, feature request will follow sometime). It may also be usedful for
people who use PDAs to view a wiki, and also for bots (less cruft to parse, less
bytes to load).

patch to follow in a minute.

*bots -> API - now r/w on WMF wikis
*small screens -> special skin - now live on WMF wikis
*I don't understand your third use case.

I'm going to mark this fixed per comment 9. We have the API for bots, and the minimal skin/mobile interface are both deployed by now. Specific issues with those things can be filed, but the general "make it" has been completed.