Gentlemen, (a brand new thread about the version,) the challenge: get the Mediawiki version from the remote site but wasting the least amount of bytes to do so.
Currently to just get a piddly 30 bytes, "MediaWiki: 1.15alpha (r49026)", one needs at least $ set http://radioscanningtw.jidanni.org $ GET $@/api.php?version |wc -c 103251 or $ GET $@/index.php?title=Special:Version |wc -c 11197 Just to be able to pipe it to w3m -dump -T text/html|grep alpha OK, I can cheat $ GET "$@/api.php?action=query&export&exportnowrap" |wc -c 1372 and then at least get with perl -nwle '/>(.*alpha.*)</ && print $1' MediaWiki 1.15alpha
From Splarka :
$ wget -O - --quiet "http://radioscanningtw.jidanni.org/api.php?action=expandtemplates&text=%..." | wc -c 45
Highly interesting result.
2009/3/31 jidanni@jidanni.org:
Gentlemen, (a brand new thread about the version,) the challenge: get the Mediawiki version from the remote site but wasting the least amount of bytes to do so.
Currently to just get a piddly 30 bytes, "MediaWiki: 1.15alpha (r49026)", one needs at least $ set http://radioscanningtw.jidanni.org $ GET $@/api.php?version |wc -c 103251 or $ GET $@/index.php?title=Special:Version |wc -c 11197 Just to be able to pipe it to w3m -dump -T text/html|grep alpha OK, I can cheat $ GET "$@/api.php?action=query&export&exportnowrap" |wc -c 1372 and then at least get with perl -nwle '/>(.*alpha.*)</ && print $1' MediaWiki 1.15alpha
Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
2009/3/31 Nicolas Dumazet nicdumz@gmail.com:
From Splarka :
$ wget -O - --quiet "http://radioscanningtw.jidanni.org/api.php?action=expandtemplates&text=%..." | wc -c 45
Highly interesting result.
The canonical method is using meta=siteinfo, which'll return something like
<siteinfo .... generator="MediaWiki 1.15alpha" rev="48811" .... />
Roan Kattouw (Catrope)
mediawiki-api@lists.wikimedia.org