Kun:LabNotes/MONOD/2015-4-21: Difference between revisions
Jump to navigation
Jump to search
>Shicheng No edit summary |
>Shicheng No edit summary |
||
Line 1: | Line 1: | ||
*Now, I do know how to insert figures, but I don't know how to insert tables into | *Now, I do know how to insert figures, but I don't know how to insert tables into MediaWiki. Therefore, I write a small code to transfer routine table to wikitable. | ||
perl table2wikitable.pl input.table.txt | perl table2wikitable.pl input.table.txt |
Revision as of 17:57, 21 April 2015
- Now, I do know how to insert figures, but I don't know how to insert tables into MediaWiki. 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";