Kun:LabNotes/MONOD/2015-4-21
Jump to navigation
Jump to search
- Now, I do know how to insert figures, but I don't know how to insert tables into medianwiki. Therefore, I write a small code to transfer routine table to wikitable.
perl table2wikitable.pl input.table.txt
#!/usr/bin/perl #table2wikitable.pl use strict; use Cwd; chdir getcwd; my $input=@ARGV[0]; open F,$input; print "{| class=\"wikitable\" style=\"text-align: center; color: green;\"\n"; while(<F>){ chomp; my @line=split /\t/; my $tmp=join("||",@line); print "| $tmp\n|-\n"; } print"|}\n";