Community > General chatter
iM@S song lyrics (WIKI BENEFICIAL)
yukipo:
Huhwhat?
PLease explain.
Nanashi:
Well... what I meant was that if we choose to make Procyon's format the standard, none of the songs in the wiki will have the correct format (except L<>R), because they're not in the new format yet. The songs can only be removed from the List once they do have the correct format. Therefore all songs (except L<>R) would have to be on the list in order for it to be complete.
Procyon:
I wrote a table transformation script.
It should be able to change an old table into a new table, I tried it out on a complex page and it worked, but in some cases some adjustment is probably necessary.
It's not for wikibots, but I can bind the script to a key and it can work on the paste buffer (so it's just: Mark table, Control+C, Script Button, Control+V). It is written in awk, so it will only work on Linux.
Hopefully, the whole process will go smooth.
Procyon:
There was a small error in that border="0" came out as border= ", it doesn't change the page though (actually border seems to be completely ignored with class="wikitable" I just put it there for later convenience), but I'll fix it for the pages I changed so far. (to border=0)
Procyon:
OK done. If I missed one, post it here.
About new pages, it is probably easier to make the old layout, because it is also of the form:
all kanji lyrics
all romaji
all translation
Just like most pages without table now. So don't hesitate to make an old table and post about it here so I can run the script on it.
And I said earlier Harikiri Rally had kanji lyrics, but I must have forgotten to save the page last week... Will look it up again.
BTW here is the script, in case you want to transform tables yourself:
--- Code: ---#! /bin/bash
xsel -o -b | awk 'BEGIN { collect=0; run=0
print "{|border=0 style=\x22text-align:left;\x22 class=\x22wikitable\x22"
print "!Japanese/Kanji Lyrics"
print "!Romanized Lyrics"
print "!Translated Lyrics"
print ""
}
{ if ($1 ~ /^!/) { if (run==1) {max=i}; run+=1; i=0;}
if ($1 ~ /^\|-style=/) {
if (run == 1) {
collect=1; i++; stylearr[i]=$0;
}
if (run > 1) {
i++
}
}
if (collect == 1 && $0 ~ /^[^{|!]/) {
if (tar[i","run] ~ /..../) {tar[i","run]=tar[i","run] "\n" $0} else {tar[i","run]=$0}
}
}
END {
for (count=1;count<max+1;count++) { print stylearr[count]; print "||"; print tar[count",1"]; print "||"; print tar[count",2"]; print "||"; print tar[count",3"]; }
print "|}"
}' | xsel -i -b
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version