User:Jimregan: Difference between revisions

From Mediawiki1
Jump to navigationJump to search
No edit summary
m (add a slight introduction, fix the overuse of 'do' in Anja's warning.)
Line 1: Line 1:
The quick and dirty script below gets a naive list of templates for which there is no mapping (as of the last extraction).
<pre>
<pre>
#!/bin/bash
#!/bin/bash
Line 9: Line 11:
</pre>
</pre>


<b>Note, that not all templates listed are infoboxes. Please do only map infoboxes.</b>
<b>Please note that not all templates listed are infoboxes. Please only map infoboxes.</b>


<b>Also, do handle redirects carefully. If not intended otherwise do only map the main infobox, not redirects to it.</b>
<b>Also, handle redirects carefully. If not intended otherwise, only map the main infobox, not redirects to it.</b>


;[[User:Jimregan/ca.wikipedia]]
;[[User:Jimregan/ca.wikipedia]]

Revision as of 20:18, 22 April 2011

The quick and dirty script below gets a naive list of templates for which there is no mapping (as of the last extraction).

#!/bin/bash
for lang in $@
do
    wget http://downloads.dbpedia.org/3.6/${lang}/infobox_properties_${lang}.nq.bz2
    bzgrep 'http://dbpedia.org/property/wikiPageUsesTemplate' infobox_properties_${lang}.nq.bz2 |awk '{print $3}'|sort -n| uniq -c|sort -nr > ${lang}-templates
    cat ${lang}-templates |awk '$1>49{print " " $0}'|sed -e "s/<http:\/\/dbpedia.org\/resource\/Template:/[[Mapping_${lang}:/"|sed -e 's/>/]]/' > ${lang}-mappings
done

Please note that not all templates listed are infoboxes. Please only map infoboxes.

Also, handle redirects carefully. If not intended otherwise, only map the main infobox, not redirects to it.

User:Jimregan/ca.wikipedia
User:Jimregan/de.wikipedia
User:Jimregan/el.wikipedia
User:Jimregan/en.wikipedia
User:Jimregan/es.wikipedia
User:Jimregan/fr.wikipedia
User:Jimregan/ga.wikipedia
User:Jimregan/hr.wikipedia
User:Jimregan/hu.wikipedia
User:Jimregan/it.wikipedia
User:Jimregan/nl.wikipedia
User:Jimregan/pl.wikipedia
User:Jimregan/pt.wikipedia
User:Jimregan/ru.wikipedia
User:Jimregan/sl.wikipedia
User:Jimregan/tr.wikipedia


User:Jimregan/cs.wikipedia
User:Jimregan/sk.wikipedia