iimprovements: - stagit-gopher - A git gopher frontend. (mirror) Err bitreich.org 70 hgit clone git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/stagit-gopher/ URL:git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/stagit-gopher/ bitreich.org 70 1Log /scm/stagit-gopher/log.gph bitreich.org 70 1Files /scm/stagit-gopher/files.gph bitreich.org 70 1Refs /scm/stagit-gopher/refs.gph bitreich.org 70 1Tags /scm/stagit-gopher/tag bitreich.org 70 1README /scm/stagit-gopher/file/README.gph bitreich.org 70 1LICENSE /scm/stagit-gopher/file/LICENSE.gph bitreich.org 70 i--- Err bitreich.org 70 1commit bda4633633a0701bbd2f7861674a8e612d961fb7 /scm/stagit-gopher/commit/bda4633633a0701bbd2f7861674a8e612d961fb7.gph bitreich.org 70 1parent 5734f7aca10abefa680497a5cb0bdaf538b6476a /scm/stagit-gopher/commit/5734f7aca10abefa680497a5cb0bdaf538b6476a.gph bitreich.org 70 hAuthor: Hiltjo Posthuma URL:mailto:hiltjo@codemadness.org bitreich.org 70 iDate: Sat, 5 Dec 2015 00:37:31 +0100 Err bitreich.org 70 i Err bitreich.org 70 iimprovements: Err bitreich.org 70 i Err bitreich.org 70 i- nicer file list. Err bitreich.org 70 i- relative urls, dont use base href. Err bitreich.org 70 i- add link to plain files, files should be checked out in "file" dir. Err bitreich.org 70 i- strip .git from bare repos. Err bitreich.org 70 i- simplify part of commit per file, just link to commit + file anchor (WIP). Err bitreich.org 70 i Err bitreich.org 70 iDiffstat: Err bitreich.org 70 i M urmoms | 74 +++++++++++++------------------ Err bitreich.org 70 i Err bitreich.org 70 i1 file changed, 32 insertions(+), 42 deletions(-) Err bitreich.org 70 i--- Err bitreich.org 70 1diff --git a/urmoms b/urmoms /scm/stagit-gopher/file/urmoms.gph bitreich.org 70 i@@ -16,18 +16,17 @@ header() { Err bitreich.org 70 i Err bitreich.org 70 i Err bitreich.org 70 i ${name} - ${description} Err bitreich.org 70 i- Err bitreich.org 70 i Err bitreich.org 70 i Err bitreich.org 70 i Err bitreich.org 70 i
Err bitreich.org 70 i-

${name}

Err bitreich.org 70 i+

${name}

Err bitreich.org 70 i ${description}
Err bitreich.org 70 i-Log | Err bitreich.org 70 i-Files | Err bitreich.org 70 i-Stats | Err bitreich.org 70 i-README | Err bitreich.org 70 i-LICENSE Err bitreich.org 70 i+Log | Err bitreich.org 70 i+Files | Err bitreich.org 70 i+Stats | Err bitreich.org 70 i+README | Err bitreich.org 70 i+LICENSE Err bitreich.org 70 i
Err bitreich.org 70 i
Err bitreich.org 70 i
	Err	bitreich.org	70
i@@ -37,8 +36,6 @@ header() {	Err	bitreich.org	70
i footer() {	Err	bitreich.org	70
i         cat <	Err	bitreich.org	70
i-
Err bitreich.org 70 i-
Powered by urmoms vibrator
Err bitreich.org 70 i Err bitreich.org 70 i Err bitreich.org 70 i !__EOF__ Err bitreich.org 70 i@@ -56,58 +53,49 @@ mkdir -p "${htmldir}" Err bitreich.org 70 i # repodir must be a directory to go to. Err bitreich.org 70 i cd "$1" || usage Err bitreich.org 70 i Err bitreich.org 70 i-# project name Err bitreich.org 70 i-# TODO: if bare repo just remove .git suffix? Err bitreich.org 70 i-name=$(basename "$(pwd)") Err bitreich.org 70 i+# default index page (symlink). Err bitreich.org 70 i+indexpage="log.html" Err bitreich.org 70 i+ Err bitreich.org 70 i+# project name, if bare repo remove .git suffix. Err bitreich.org 70 i+name=$(basename "$(pwd)" ".git") Err bitreich.org 70 i Err bitreich.org 70 i # read .git/description. Err bitreich.org 70 i description="" Err bitreich.org 70 i test -f ".git/description" && description="$(cat '.git/description')" Err bitreich.org 70 i Err bitreich.org 70 i-# TODO: make configurable. Err bitreich.org 70 i-baseurl="http://cow.codemadness.org/gitlog/" Err bitreich.org 70 i- Err bitreich.org 70 i-indexpage="log.html" Err bitreich.org 70 i- Err bitreich.org 70 i-firstcommit=$(git log | grep '^commit ' | tail -n 1 | cut -f 2 -d ' ') Err bitreich.org 70 i- Err bitreich.org 70 i-# make log per file. Err bitreich.org 70 i-# TODO: just link to commit/commit? save some space and time? Err bitreich.org 70 i-git ls-tree -r --name-only master | while read -r file; do Err bitreich.org 70 i- test -e "${htmldir}/file/${file}.html" && continue Err bitreich.org 70 i- Err bitreich.org 70 i- d=$(dirname "${file}") Err bitreich.org 70 i- mkdir -p "${htmldir}/file/${d}" Err bitreich.org 70 i- Err bitreich.org 70 i- header > "${htmldir}/file/${file}.html" Err bitreich.org 70 i- git show "${firstcommit}"...master "${file}" | \ Err bitreich.org 70 i- sed -E 's@^commit (.*)$@commit \1@g' >> "${htmldir}/file/${file}.html" Err bitreich.org 70 i- footer >> "${htmldir}/file/${file}.html" Err bitreich.org 70 i-done Err bitreich.org 70 i- Err bitreich.org 70 i-# make log with all commits. Err bitreich.org 70 i-header > "${htmldir}/log.html" Err bitreich.org 70 i-printf '' >> "${htmldir}/log.html" Err bitreich.org 70 i-git log --pretty='' >> "${htmldir}/log.html" Err bitreich.org 70 i-printf '
%cD%H%an%s
' >> "${htmldir}/log.html" Err bitreich.org 70 i-footer >> "${htmldir}/log.html" Err bitreich.org 70 i- Err bitreich.org 70 i # make diff for each commit (all files). Err bitreich.org 70 i+relpath="../" Err bitreich.org 70 i mkdir -p "${htmldir}/commit" Err bitreich.org 70 i git log --pretty='%H' | while read -r commit; do Err bitreich.org 70 i test -e "${htmldir}/commit/${commit}.html" && continue Err bitreich.org 70 i+ Err bitreich.org 70 i header > "${htmldir}/commit/${commit}.html" Err bitreich.org 70 i- git show "${commit}" >> "${htmldir}/commit/${commit}.html" Err bitreich.org 70 i+ git show --pretty=full "${commit}" | \ Err bitreich.org 70 i+ sed -E 's@^commit (.*)$@commit \1@g' >> "${htmldir}/commit/${commit}.html" Err bitreich.org 70 i footer >> "${htmldir}/commit/${commit}.html" Err bitreich.org 70 i done Err bitreich.org 70 i Err bitreich.org 70 i+# make log with all commits. Err bitreich.org 70 i+relpath="" Err bitreich.org 70 i+header > "${htmldir}/log.html" Err bitreich.org 70 i+printf '' >> "${htmldir}/log.html" Err bitreich.org 70 i+git log --pretty='' >> "${htmldir}/log.html" Err bitreich.org 70 i+printf '
%cr%H%an%s
' >> "${htmldir}/log.html" Err bitreich.org 70 i+footer >> "${htmldir}/log.html" Err bitreich.org 70 i+ Err bitreich.org 70 i # make index with file links. Err bitreich.org 70 i+relpath="" Err bitreich.org 70 i header >> "${htmldir}/files.html" Err bitreich.org 70 i-git ls-tree -r master | sed -E 's@ (.*)$@ \1@g' >> "${htmldir}/files.html" Err bitreich.org 70 i+printf '' >> "${htmldir}/files.html" Err bitreich.org 70 i+git ls-tree -r -l master | while read -r mode type object size file; do Err bitreich.org 70 i+ git log -1 --pretty='' "${file}" Err bitreich.org 70 i+done >> "${htmldir}/files.html" Err bitreich.org 70 i+printf '
ModeNameSize
'${mode}''${file}''${size}'[plain]
' >> "${htmldir}/files.html" Err bitreich.org 70 i footer >> "${htmldir}/files.html" Err bitreich.org 70 i Err bitreich.org 70 i # readme page Err bitreich.org 70 i # find README file. Err bitreich.org 70 i+relpath="" Err bitreich.org 70 i readme="" Err bitreich.org 70 i for f in README README.md readme.md; do Err bitreich.org 70 i test -e "${f}" && readme="${f}" Err bitreich.org 70 i@@ -123,6 +111,7 @@ footer >> "${htmldir}/readme.html" Err bitreich.org 70 i Err bitreich.org 70 i # license page Err bitreich.org 70 i # find LICENSE file. Err bitreich.org 70 i+relpath="" Err bitreich.org 70 i license="" Err bitreich.org 70 i for f in LICENSE LICENSE.md; do Err bitreich.org 70 i test -e "${f}" && license="${f}" Err bitreich.org 70 i@@ -137,6 +126,7 @@ fi Err bitreich.org 70 i footer >> "${htmldir}/license.html" Err bitreich.org 70 i Err bitreich.org 70 i # stats (authors). Err bitreich.org 70 i+relpath="" Err bitreich.org 70 i header > "${htmldir}/stats.html" Err bitreich.org 70 i git shortlog -n -s >> "${htmldir}/stats.html" Err bitreich.org 70 i footer >> "${htmldir}/stats.html" Err bitreich.org 70 .