diff options
| author | Emil Williams | 2025-08-19 14:47:24 +0000 |
|---|---|---|
| committer | Emil Williams | 2025-08-19 14:47:24 +0000 |
| commit | f0c71235a80d8d043132d8e3d9eb4b64a30f354a (patch) | |
| tree | c08d4618c5763515b5d981c8dfab1867a247a0a6 | |
| parent | fb624a985bbfb2688b5d7c03bfdfa7938347b0c9 (diff) | |
| download | gorillanest-f0c71235a80d8d043132d8e3d9eb4b64a30f354a.tar.xz gorillanest-f0c71235a80d8d043132d8e3d9eb4b64a30f354a.tar.zst | |
It Technically *Works*
| -rwxr-xr-x | gorillanest | 3 | ||||
| -rw-r--r-- | template/index.tt | 2 | ||||
| -rw-r--r-- | template/repository.tt | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/gorillanest b/gorillanest index cd294cb..9356c4d 100755 --- a/gorillanest +++ b/gorillanest @@ -11,6 +11,7 @@ use Sys::Syslog; use Template; use URI::Escape; +use Data::Dumper; sub info { syslog("info", join(' ', @_)); } @@ -53,6 +54,8 @@ sub GN::user { # /$username/ sub GN::repository { # /$username/$repository my ($root, $dataref) = @_; my %data = %$dataref; + $data{log} = Dumper(split(/\n/, qx(git log --pretty=format:\'%H | %an | %ad | %s%x0a\'))); # It technically works # | tac | tr -s \'\n\' + $data{found} = 1; return \%data; } diff --git a/template/index.tt b/template/index.tt index a2048a7..908e25d 100644 --- a/template/index.tt +++ b/template/index.tt @@ -5,7 +5,7 @@ <body> <h1>[% title %]</h1> <h2>[% description %]</h2> -<ul>[% FOR i IN directories %]<li><a href="/[% i %]/">/[% i %]</a></li>[% END %]</ul> +<ul>[% FOR i IN log %]<li><a href="/[% i %]/">/[% i %]</a></li>[% END %]</ul> </body> [% INCLUDE foot.tt %] </html> diff --git a/template/repository.tt b/template/repository.tt index 2877fa3..f11849a 100644 --- a/template/repository.tt +++ b/template/repository.tt @@ -3,6 +3,7 @@ [% INCLUDE head.tt %] <body> <h1>[% title %]</h1> + <ul>[% FOR i IN log %]<li>[% i %]</li>[% END %]</ul> <p> Eventually this page will have something on it, RIGHT?!</p> </body> [% INCLUDE foot.tt %] |
