mdisk: Remove color from "Already mounted" message
[sunny256-utils.git] / mkd
blobc1507b98ff9c3d555764b79ae146f0c755ed54d4
1 #!/usr/bin/env perl
3 # mkd
4 # File ID: f695a960-5d3f-11df-ab55-90e6ba3022ac
5 # Konverterer datoer til dbk-link.
7 $| = 1;
9 if ($ARGV[0] =~ /^\d{8}$/) {
10 my $arg_date = $ARGV[0];
11 my @stdin_data = <STDIN>;
12 printf("<a href=\"../%s/%s.html\">", substr($arg_date, 0, 4), $arg_date);
13 print foreach(@stdin_data);
14 print("</a>");
15 exit;
18 while (<>) {
19 s!([12]\d\d\d)([/\-])(\d\d)([/\-])(\d\d)!<a href="../$1/$1$3$5.html">$1$2$3$4$5</a>!g;
20 s!([12]\d\d\d)(\d\d)(\d\d)(T\d+)(Z?)!<a href="../$1/$1$2$3.html">$1$2$3$4$5</a>!g;
21 print;