";
my $line_counter = 1;
foreach my $line ( split("\n", $raw_file) ) {
print $fh "$line_counter\t$line";
$line_counter++;
}
print $fh "
";
close $fh;
return $html_file;
}
# Main sub for generating project page
# Might make more sense to split into more subs?
sub write_project_content($$$$) {
my $project_dirs_ref = shift;
my $trimmed_project_dirs_ref = shift;
my $web_projects_dir = shift;
my $logger = shift;
# Make these array's easier to work with in a hash
# Key is path to actual git dir, val is path to associated web dir
my %projects_map;
@projects_map{@$project_dirs_ref} = @$trimmed_project_dirs_ref;
$logger->info("Assembling data structures of git info");
# Write files part of project index
foreach my $project_path ( keys %projects_map ) {
my $spec_web_dir = $web_projects_dir . $projects_map{$project_path};
my $project_index = $spec_web_dir . "index.html";
write_file("",$project_index);
append_file("