2024-06-29 21:19:25 +01:00
|
|
|
package main
|
|
|
|
|
|
|
|
type indexCmd struct {
|
|
|
|
Paths []string `arg:"" help:"The paths to the repositories to include in the index."`
|
|
|
|
}
|
|
|
|
|
2024-06-29 23:25:22 +01:00
|
|
|
func (i *indexCmd) Run() error {
|
|
|
|
return generateIndex(i.Paths)
|
|
|
|
}
|
|
|
|
|
2024-06-29 21:19:25 +01:00
|
|
|
type repoCmd struct {
|
2024-06-30 00:28:04 +01:00
|
|
|
Path string `arg:"" help:"The path to the repository."`
|
|
|
|
LogLimit int `short:"l" help:"The limit of commits to show in the log"`
|
2024-06-29 21:19:25 +01:00
|
|
|
}
|
|
|
|
|
2024-06-29 23:25:22 +01:00
|
|
|
func (r *repoCmd) Run() error {
|
2024-06-30 12:02:22 +01:00
|
|
|
return generateRepo(r.Path, r.LogLimit)
|
2024-06-29 23:25:22 +01:00
|
|
|
}
|
|
|
|
|
2024-06-29 21:19:25 +01:00
|
|
|
var cli struct {
|
|
|
|
Debug bool `help:"Print debug information."`
|
|
|
|
|
|
|
|
Index indexCmd `cmd:"" help:"Generate the repository index page."`
|
|
|
|
Repo repoCmd `cmd:"" help:"Generate the repository pages."`
|
|
|
|
}
|