|
@@ -4,7 +4,7 @@ use warnings;
|
|
|
use Log::Log4perl qw(:easy);
|
|
|
use lib "/usr/local/lib";
|
|
|
use Shellex::Shellex qw(shellex findBin);
|
|
|
-use Gsg::Gather qw(get_file_tree);
|
|
|
+use Gsg::Gather qw(get_file_tree get_diff_stat);
|
|
|
use Gsg::MdParse qw (render_readme);
|
|
|
use Exporter qw(import);
|
|
|
our @EXPORT_OK = qw(
|
|
@@ -155,11 +155,12 @@ sub gen_diff_colors($$$) {
|
|
|
|
|
|
# Main sub for generating project page
|
|
|
# Might make more sense to split into more subs?
|
|
|
-sub write_project_content($$$$) {
|
|
|
+sub write_project_content($$$$$) {
|
|
|
|
|
|
my $project_dirs_ref = shift;
|
|
|
my $trimmed_project_dirs_ref = shift;
|
|
|
my $web_projects_dir = shift;
|
|
|
+ my $clone_path = shift;
|
|
|
my $logger = shift;
|
|
|
|
|
|
# Make these array's easier to work with in a hash
|
|
@@ -173,7 +174,12 @@ sub write_project_content($$$$) {
|
|
|
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("<html><a href=\"../../index.html\">Return to index</a></b><hr/>",$project_index);
|
|
|
+ append_file("<html><a href=\"../../index.html\"><b>Return to index</a></b></br>",$project_index);
|
|
|
+ my $uniq_clone_path = "Disabled";
|
|
|
+ if ( $clone_path ne "Disabled" ) {
|
|
|
+ $uniq_clone_path = $clone_path . $projects_map{$project_path};
|
|
|
+ }
|
|
|
+ append_file("<b><pre>Clone:<font color=\"green\"> git clone $uniq_clone_path</font></pre></b><hr/>",$project_index);
|
|
|
# Get all project data structures/info
|
|
|
my ( $file_tree_ref, $file_content_ref, $commits_ref, $commit_ids_ref ) = get_file_tree($project_path,$logger);
|
|
|
|