Last modified: 2010-01-31 23:07:15 UTC
Edit summaries (referred to as comments internally, see Linker::formatComment) have their own custom parser, which is possible to duplicate but rather annoying to get 100% correct (also, there are minute differences between versions of Mediawiki). It would be nice to be able to parse edit summaries via the API in two methods: 1) add comment= parameter to action=parse, spitting out <parsedcomment> with the HTML 2) add &parsecomment to all properties returning unparsed comments, for example http://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=Foobar could have &parsecomment return: <rev ... comment="/* Examples */ capitalization" parsedcomment="(<span class="autocomment"><a href="/wiki/Foobar#Examples" title="Foobar">?</a>Examples:&#32;</span> capitalization)" /> Not sure of the exact names, but internally and in the api they are called 'comments' rather than 'summaries'. In Linker the action is 'format' but api users will be used to 'parse' already.
I've done part 1 locally. Are we having it as comment, or as summary? Seemingly, we use a mix of both
(In reply to comment #1) > I've done part 1 locally. > > Are we having it as comment, or as summary? Seemingly, we use a mix of both We use: * 'summary' for actions 'edit', 'rollback' and 'import' * 'reason' for lists 'blocks' and 'globalblocks' and all other actions except 'upload' * 'comment' for action 'upload' and all other 'prop' and 'list' modules so yeah... a mix :)
Gurch, you've just made it EVEN worse :P If it wasn't such a breaking change, i'd suggest we normalise one way or another, but i guess it's not gonna be a good idea...
(In reply to comment #3) > If it wasn't such a breaking change, i'd suggest we normalise one way or > another, but i guess it's not gonna be a good idea... For breaking changes you'll need a better reason than aesthetics :)
Oh Roan, you are boring ;) Preference for this module then?
(In reply to comment #5) > Oh Roan, you are boring ;) > Yeah I'm good at playing a broken record. You should've seen my in my "File a bug" period. > Preference for this module then? I think 'summary' is the least ambiguous term.
Good fun. Part one done in r61747
r61754 Adds parsed comments to prop=revision
[21:05:01] <Reedy> hmm... maybe log events [21:05:12] <Reedy> deletedrevs [21:05:52] <Reedy> recentchanges [21:06:08] <Reedy> usercontribs [21:06:30] <Reedy> watchlist [21:06:58] <Reedy> protected titles Are all these needed/wanted?
All fixed up in r61761