Here is my code and folder.
Folder structure:
Mus
|-- Mus.config
|-- Mus.html
`-- Mus_Digital
|-- Digi_Verification
| |-- Digi_Verification.config
| |-- Digital_Verification.html
| `-- rev1
| |-- _projects_Mus_Mus_Digi_Digi_Verification_rev1.config
| `-- _projects_Mus_Mus_Digi_Digi_Verification_rev1.html
|-- Mus_Digital.config
`-- Mus_Digital.html
The above is my obtained directory struture from $output_dir.Here what i really tried is conversion of .config to .html format.
Now the problem is if i click Mus folder it should open Mus.html.If i click Mus_Digital it should open Mus_Digital.html and so on.The same procedure should apply for all folders and sub folders and also for href links.
Now in my code the href links are not pointing to its *.html(here * denotes anyname before .html).Help to point directly to its html file when the folder is clicked.
```print"Converting the .config files to .html files at destination location \n";
##HTML CONVERSION##
my @files = File::Find::Rule->file
->name(’.config’)
->prune
->in($output_dir);
foreach my $file (@files)
{
my ($name, $root, $ext) = $file =~ m|(.)/(.).(.)|;
my $outfile = “$name/$root.html”;
open my $fh_out, ‘>’, $outfile or die “Can’t open outfile: !”,"\n";
my $head = "
<!doctype html>
SL.NO | CHECKLIST ITEM | VALUE | COMMENTS | CONFIRMATION | .bold { font-weight: bold; } .bold td { border: 0px; } table, th, td { border: 1px solid black; } "; print $fh_out $head ; # write the header open my $fh, '<', $file or die "Can't open $file: $!"; while (my $line=<$fh>) { chomp $line; for($line) { s/\&//g; #s/[\\\_\@\_]//g; s/COMMENT//g; } my @data = split /:/, $line; my $class = $data[0] ? 'normal' : 'bold'; print $fh_out qq[
---|