2022-12-02 16:41:55 -05:00
# repo2html
2022-12-09 02:15:03 -05:00
**repo2html** generates static HTML pages for browsing the contents of a Git repository.
## basic usage
`repo2html DESTINATION`
Assuming the current directory is a Git repository, this command populates *DESTINATION* with HTML files that provide a web-browsable view of the contents of the git repository.
2022-12-09 11:00:07 -05:00
Note: changes must be at least committed before they will appear in the HTML output.
More precisely: the HTML output represents the state of the HEAD commit, not that of the current work-tree (if any).
2022-12-09 11:52:38 -05:00
You may also cause this HTML directory to be automatically updated upon every `git push` , by invoking *repo2html* from a *Git hook* .
We describe how to use this technique to [build a static git forge ](build-a-git-forge.md.html ).
2022-12-02 16:41:55 -05:00
## features
2022-12-04 00:44:52 -05:00
- static html files
2022-12-09 02:15:03 -05:00
- image support
- markdown files are rendered as html
- no resident background process
2022-12-02 16:41:55 -05:00
## disclaimer
2022-12-04 00:44:52 -05:00
no one is liable if this software breaks, deletes, corrupts, or ruins anything
2022-12-02 16:41:55 -05:00
## requirements
2022-12-09 02:15:03 -05:00
- [chicken scheme ](https://call-cc.org/ ), and eggs:
2022-12-09 11:00:08 -05:00
- [utf8 ](https://wiki.call-cc.org/eggref/5/utf8 )
- [lowdown ](https://wiki.call-cc.org/eggref/5/lowdown )
- [sxml-transforms ](https://wiki.call-cc.org/eggref/5/sxml-transforms )
- [clojurian ](https://wiki.call-cc.org/eggref/5/clojurian )
2022-12-04 00:44:52 -05:00
- git
2022-12-02 16:54:38 -05:00
2022-12-09 11:52:38 -05:00
### installation
2022-12-08 21:20:04 -05:00
2022-12-09 11:52:38 -05:00
this compiles the binary `repo2html` and place it in `/usr/local/bin` .
2022-12-08 21:20:04 -05:00
1. ensure you're in the repo2html git repository
2. as root, run `make dependencies`
3. run `make`
2022-12-09 11:52:38 -05:00
4. run `make install` as root
2022-12-08 21:20:04 -05:00
2022-12-09 11:52:38 -05:00
if you wish, you may then uninstall the chicken scheme compiler.
2022-12-07 15:18:27 -05:00
2022-12-09 11:52:38 -05:00
if you prefer, the file `main.scm` may be used as the repo2html executable instead of compiling a binary file, but it will be slower, and requires that the chicken scheme interpreter remain installed on your system.
2022-12-02 16:41:55 -05:00
2022-12-06 00:07:43 -05:00
## how it works
TODO
2022-12-02 16:41:55 -05:00
## todos
2022-12-08 21:01:31 -05:00
- **documentation**: convert a lot of the stuff i (m455) made in the readme into an e2e tutorial
- **documenation**: scope the readme audience to folks who kind of know what they're doing with servers
2022-12-09 11:52:38 -05:00
- **documentation/feature**: use post-update rather than post-receive hook for simplicity
- **documentation**: also describe use with post-commit hook
- **feature**: need better detection and rendering of binary files
- **feature**: multi-page or collapse-able files list
- **feature**: commit log
- **feature**: branches and releases (tags)
2022-12-08 21:01:31 -05:00
- **feature**: clickable line numbers in source files
2022-12-09 11:52:38 -05:00
- **feature**: customizable templates
2022-12-09 02:15:03 -05:00
- **feature**: display binary files as output from binary-file analysis tools like hexdump, xxd, dumpelf, elfls, readelf, etc.?
2022-12-09 11:52:38 -05:00
- **feature**: syntax highlighting?
2022-12-09 02:15:03 -05:00
## license: agpl-3.0+
Copyright 2022 [Jesse Laprade ](https://m455.casa ).
This software is released under the terms of the [GNU Affero General Public License ](https://www.gnu.org/licenses/agpl.html ), version 3 or any later version.
## alternatives
- [stagit ](https://codemadness.org/git/stagit/file/README.html )
- [depp ](https://git.8pit.net/depp.git/ )
- [git-arr ](https://blitiri.com.ar/p/git-arr/ )