From Splarka :
$ wget -O - --quiet
"http://radioscanningtw.jidanni.org/api.php?action=expandtemplates&text={{CURRENTVERSION}}&format=yaml"
| wc -c
45
Highly interesting result.
2009/3/31 <jidanni(a)jidanni.org>rg>:
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 $(a)/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 "$(a)/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(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
--
Nicolas Dumazet — NicDumZ [ nɪk.d̪ymz ]