Gitanuki is a program that, given a list of URLs to Git repositories, will fetch those repos to keep local copies of them and render their files to HTML files that can be viewed in a web browser. (Typically, these will be served by a web server, so this can be considered a static web site builder.)
gitanuki is given one argument, the directory containing configuration
data, the repos, and into which to place the rendered output. Under this
directory will be:
-
repo.list: Each line is a path underrepo/followed by one or more space-separated URLs suitable forgit fetch. (Spaces within paths or URLs may be escaped with\.)gitanukinever updates this file, but it's expected that external programs or humans will do so. -
repo/: Bare Git repositories in directories named for the paths inrepo.list. (These always end in.git; it's added if not supplied to make clear that these are bare repos.) These may have multiple remotes ("origins"), but any single repo is intended to be the nominal sum of all remotes. -
view/: Directories named as underrepo/but with rendered views of the repository/commit contents. It's assumed that given pathx/,x/index.htmlwill be rendered. (See more below.)
- Fetching
view/will redirect to or returnview/index.html, which will return a list of all repos. - Fetching
view/REPO/will redirect to or returnview/REPO/index.html, which will be the start point for browsing the repo at the most recent (HEAD) commit from (XXX which source?)
Running the Test script at the top level will test the system. Use
./Test -h for more help.
This repo uses pactivate to set up the Python virtual environment for development. Follow that link for full documentation, but some key points are:
- You may create a
.pythonsymlink at the top level pointing to your preferred Python interpreter if you don't want to use the first one in your path. (Always do a./Test -cafter changing this.) requirements.txt(which passed topip -r) lists the packages to be installed for development (including this package in editable form).
- This project needs someone interested enough to push it forward. @0cjs is willing to provide assistance, but not wanting to do it alone.
- For those willing to run a "dynamic" web site, providing an interface to
e.g.
git-bugwhich stores issues directly in the Git database would be a convenient feature that could lessen dependency on GitHub/GitLab/etc. systems that do the same in proprietary databases.