dot

packages and services management
Log | Files | Refs | README

commit a284e53b580e64f55af5ba934439e840cb2d7758
parent 63f5d596916c7cb4a335e383cedce5b62a3c9f23
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sun,  9 Apr 2017 17:38:51 +0200

added man page for www-git

Diffstat:
Mman/README | 69+++++++++++++++++++++++++++++++++++++++++++++++++++------------------
Mman/www-git.1 | 61++++++++++++++++++++++++++++++++++++++++++++++++++++---------
2 files changed, 103 insertions(+), 27 deletions(-)

diff --git a/man/README b/man/README @@ -71,7 +71,7 @@ FILES AUTHOR build is written by Josuah Demangeon <mail@josuah.net> -Linux 4.9.11-1-ARCH March 4, 2017 Linux 4.9.11-1-ARCH +Linux 4.10.8-1-ARCH March 4, 2017 Linux 4.10.8-1-ARCH ------------------------------------------------------------------------------ @@ -114,15 +114,13 @@ DESCRIPTION -r rev Revert the changes to and switch the state to rev. FILES - .v Main version directory. The directory in which .v is located is + v Main version directory. The directory in which v is located is the root version directory. - .v/obj/ - Directory containing the objects every named after the hash of + v/obj/ Directory containing the objects every named after the hash of its content. - .v/rev/ - Directory containing the revisions which contains the list of + v/rev/ Directory containing the revisions which contains the list of files, along with their associated hashes, in the following format: @@ -130,7 +128,7 @@ FILES The revisions are also named after their content. - .v/log A file containing an history of every revision as a list of name + v/log A file containing an history of every revision as a list of name of revision files, with one revision per line. EXAMPLE @@ -152,15 +150,18 @@ EXAMPLE Diffing last two revisions: - $ version -d $(tail -n 2 .v/log) - ... + $ version -d $(tail -n 2 v/log) + --- e68a60a444860ebf5e0ff8ef58cc59944ffea7e11e49e038339112940ea8223b + +++ a7e8968176118b7cb97511b3426aee66d577b5956282810fe28cc6dc8ff4872d + + + e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 ./test Find the revision corresponding to a file: - $ grep -rlF path/to/file.txt .v/rev/ - .v/rev/9e59e557dad5b2c8b66313a2836afd1970990b885d08e728e6cd5a2a7b7df584 + $ grep -rlF path/to/file.txt v/rev/ + v/rev/9e59e557dad5b2c8b66313a2836afd1970990b885d08e728e6cd5a2a7b7df584 -Linux 4.9.11-1-ARCH April 4, 2017 Linux 4.9.11-1-ARCH +Linux 4.10.8-1-ARCH April 4, 2017 Linux 4.10.8-1-ARCH ------------------------------------------------------------------------------ @@ -170,14 +171,46 @@ NAME www-git – generate static website with the git command SYNOPSIS - www-git + www-git repository [description] DESCRIPTION - www-git will create a git subdirectory in current directory with one - subdirectory per git repository. Repositories are specified from the - description file. + The www-git script creates a static website presenting the files and + commits of a git repository in a subdirectory. + + The first argument is treated as a path to a repository, and the second + as its text description. + +FILES + ./style.css, ./favicon.png + These ressources will be used in the html <head> element. + + ./repository/index.html + An index.html file will be created in the repository directory, + containing a list of the files, the README file if any, and the + commits. + + ./repository/file/*, ./repository/commit/* + One html page per file and per commit will be created in these + subdirectories. + +EXAMPLES + A script generating an index of multiple repositories might look like + this: + + mkdir git + cd git + + printf '<!doctype html>\n<html>\n<body>\n' > ./index.html + + printf '<li><a href="">%s</a></li>0 ../../repo1 repo1 >> index.html + www-git ../../repo1 'Some repository' + + printf '<li><a href="">%s</a></li>0 ../../repo2 repo2 >> index.html + www-git ../../repo2 'Another one' + + printf '</ul>\n</body>\n</html>\n' >> index.html -Linux 4.9.11-1-ARCH March 23, 2017 Linux 4.9.11-1-ARCH +Linux 4.10.8-1-ARCH March 23, 2017 Linux 4.10.8-1-ARCH ------------------------------------------------------------------------------ @@ -242,4 +275,4 @@ SEE ALSO AUTHORS www is made by Josuah Demangeon ⟨mail@josuah.net⟩ -Linux 4.9.11-1-ARCH November 11, 2016 Linux 4.9.11-1-ARCH +Linux 4.10.8-1-ARCH November 11, 2016 Linux 4.10.8-1-ARCH diff --git a/man/www-git.1 b/man/www-git.1 @@ -12,16 +12,59 @@ .Sh SYNOPSIS . .Nm -.Ar descriptions +.Ar repository +.Op Ar description +. . .Sh DESCRIPTION . +The .Nm -will create a -.Pa git -subdirectory in current directory with one subdirectory per git -repository. -Repositories are specified from the -.Ar description -file, with one line per repository, and the first word the name and the -rest the description. +script creates a static website presenting the files and commits of a git +repository in a subdirectory. +. +.Pp +. +The first argument is treated as a path to a repository, and the +second as its text description. +. +. +.Sh FILES +. +.Bl -tag -width indent +. +.It Pa ./style.css Ns , Pa ./favicon.png +These ressources will be used in the html +.Li <head> +element. +. +. +.It Pa ./repository/index.html +An +.Pa index.html +file will be created in the repository directory, containing a list of +the files, the README file if any, and the commits. +. +.It Pa ./repository/file/* Ns , Pa ./repository/commit/* +One html page per file and per commit will be created in these subdirectories. +. +.El +. +. +.Sh EXAMPLES +. +A script generating an index of multiple repositories might look like this: +.Bd -literal -offset indent +mkdir git +cd git + +printf '<!doctype html>\\n<html>\\n<body>\\n' > ./index.html + +printf '<li><a href="">%s</a></li>\n' ../../repo1 repo1 >> index.html +www-git ../../repo1 'Some repository' + +printf '<li><a href="">%s</a></li>\n' ../../repo2 repo2 >> index.html +www-git ../../repo2 'Another one' + +printf '</ul>\\n</body>\\n</html>\\n' >> index.html +.Ed