Wiktionary talk:Todo/Slovene masculine translations

From Wiktionary, the free dictionary
Latest comment: 11 years ago by Ruakh
Jump to navigation Jump to search

Generated using this Bash command:

perl -wne ' BEGIN { $/ = "</page>\n" }
            next unless m/\{\{t[-+]?\|sl\|[^|]+\|m[^-]/;
            die unless m{<title>([^<]+)</title>};
            print "$1\n"
          ' \
  < enwiktionary-20130907-pages-articles.xml \
  > t-sl-m.txt

plus postprocessing to sort and format.

Actually, the sorting isn't really necessary, and most of the formatting is easy enough to do in the same pass:

perl -wne ' BEGIN { $/ = "</page>\n" }
            next unless m/\{\{t[-+]?\|sl\|[^|]+\|m[^-]/;
            die unless m{<title>([^<]+)</title>};
            print "* [[$1]] ([{{FULLURL:$1|action=edit}} edit])\n"
          ' \
  < enwiktionary-20130907-pages-articles.xml \
  > t-sl-m.txt

(The {{top4}} etc. would still have to be added manually, though.)

RuakhTALK 14:49, 11 September 2013 (UTC)Reply