mark/main.go

40 lines
857 B
Go
Raw Normal View History

2015-09-19 23:51:49 +06:00
package main
import (
2025-04-15 21:30:59 +02:00
"context"
2025-06-12 13:29:46 +02:00
"fmt"
2015-09-19 23:51:49 +06:00
"os"
"github.com/kovetskiy/mark/util"
2020-11-03 17:12:51 +03:00
"github.com/reconquest/pkg/log"
2025-04-15 21:30:59 +02:00
"github.com/urfave/cli/v3"
2015-09-19 23:51:49 +06:00
)
2025-06-12 13:29:46 +02:00
var (
version = "dev"
commit = "none"
)
2015-09-19 23:51:49 +06:00
const (
usage = "A tool for updating Atlassian Confluence pages from markdown."
description = `Mark is a tool to update Atlassian Confluence pages from markdown. Documentation is available here: https://github.com/kovetskiy/mark`
2015-09-19 23:51:49 +06:00
)
func main() {
2025-04-15 21:30:59 +02:00
cmd := &cli.Command{
2025-05-29 01:21:02 +02:00
Name: "mark",
Usage: usage,
Description: description,
2025-06-12 13:29:46 +02:00
Version: fmt.Sprintf("%s@%s", version, commit),
2025-05-29 01:21:02 +02:00
Flags: util.Flags,
2025-04-15 21:30:59 +02:00
EnableShellCompletion: true,
HideHelpCommand: true,
Action: util.RunMark,
2015-09-19 23:51:49 +06:00
}
2025-04-15 21:30:59 +02:00
if err := cmd.Run(context.TODO(), os.Args); err != nil {
log.Fatal(err)
2021-04-02 13:15:54 -04:00
}
}