repo2html/README.md
pho4cexa d106bf4ca6 detect (er, ask git) if files are text or binary (ty m455 & acdw!)
also remove unused procedure display-readme-html
2022-12-10 20:17:10 -05:00

77 lines
2.9 KiB
Markdown

# repo2html
**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.
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).
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).
## features
- static html files
- image support
- markdown files are rendered as html
- no resident background process
## disclaimer
no one is liable if this software breaks, deletes, corrupts, or ruins anything
## requirements
- [chicken scheme](https://call-cc.org/), and eggs:
- [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)
- git
### installation
this compiles the binary `repo2html` and place it in `/usr/local/bin`.
1. ensure you're in the repo2html git repository
2. as root, run `make dependencies`
3. run `make`
4. run `make install` as root
if you wish, you may then uninstall the chicken scheme compiler.
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.
## how it works
TODO
## todos
- **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
- **documentation/feature**: use post-update rather than post-receive hook for simplicity
- **documentation**: also describe use with post-commit hook
- **feature**: multi-page or collapse-able files list
- **feature**: commit log
- **feature**: branches and releases (tags)
- **feature**: clickable line numbers in source files
- **feature**: customizable templates
- **feature**: display binary files as output from binary-file analysis tools like hexdump, xxd, dumpelf, elfls, readelf, etc.?
- **feature**: syntax highlighting?
## 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/)