On 8 July 2013 03:00, Byrial Jensen
<byrial(a)vip.cybercity.dk> wrote:
At 08-07-2013 02:42, Jona Christopher Sahnwaldt
wrote:
DBpedia has a file [1] which contains all the data you need, albeit
wrapped in Scala code. This file is generated by another Scala class
[2] that calls the Wikipedia API URLs that John pointed out. You could
modify that class to produce any format you like. If you don't know
Scala, you might be better off writing the code from scratch though.
Thank you, but I have already got the needed data by writing a small program
to first get a list of Wikipedias from
http://noc.wikimedia.org/conf/wikipedia.dblist and then query each of them.
My program (in C with help from CURL, available at
http://toolserver.org/~byrial/wikidata-programs/get_namespaces.c) is not
elegant, but it does the job.
Looks good.
You initally said that you also want the aliases. You can get them if
you add "|namespacealiases" to the URL, as John pointed out, and parse
their XML elements. But I guess you already know that. :-)
Yes, I knew that, but thank you anyway. The current version of my
program will get both namespace names and aliases for all Wikipedias and
Wikivoyages. I added Wikivoyage because their language links is now
being migrated to Wikidata, and I use this to analyse the Wikidata
database. If anyone need namespace names for other Wikimedia projects,
the program is easy to adapt.
Regards,
- Byrial