Page MenuHomePhabricator

&action=raw to allow the raw for just a named section to be returned
Closed, DeclinedPublic

Description

Author: FT2.wiki

Description:
Code such as:

http://en.wikipedia.org/w/index.php?title=Byte&action=raw

works, but not:

http://en.wikipedia.org/w/index.php?title=Byte#Meaning&action=raw

Any chance?


Version: unspecified
Severity: enhancement

Details

Reference
bz12503

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:00 PM
bzimport set Reference to bz12503.
bzimport added a subscriber: Unknown Object (MLST).

(In reply to comment #1)

http://en.wikipedia.org/w/index.php?title=Byte&action=raw&section=1

ok, you where a bit too fast here :)

Roan: get on IRC ffs!

FT2.wiki wrote:

Apologies for reopening, the request being that at present you need a lookup of "section name" -> "section number" to get the raw text of a section.

The request wasn't that you cannot get the raw of a section if you know the section number; it's that if you are passed a section name it's much harder to get the raw text of it, and the natural syntax "title=PAGE#SECTION&action=raw" would be useful if easy.

Again sorry for reopening, but thinking perhaps the question was misunderstood.

That's because the # is a reserved character. You're right that there should be a way to retrieve sections by name. The syntax you're suggesting can't be used, however.

Section lookups by name should be possible from the parsed output; I'm not sure offhand if we have that much detail conveniently in an array in the output object or if that'll have to be added.

This could potentially be done by first getting the section tree through the API (see http://lists.wikimedia.org/pipermail/mediawiki-api/2008-January/000334.html ), then requesting the section's content by number (action=raw&section=3).

DannyS712 subscribed.

This could potentially be done by first getting the section tree through the API (see http://lists.wikimedia.org/pipermail/mediawiki-api/2008-January/000334.html ), then requesting the section's content by number (action=raw&section=3).

This functionality doesn't have a clear use case, and can already be accomplished by other means