-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
35 lines (30 loc) · 794 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package main
import (
"fmt"
"os"
"github.com/gusanmaz/onefile/cmd"
"github.com/spf13/cobra"
)
func main() {
var rootCmd = &cobra.Command{
Use: "onefile",
Short: "A tool for project file management and repository fetching",
Long: `onefile is a versatile command-line tool that allows you to:
- Dump local project structures to JSON or Markdown
- Reconstruct projects from JSON
- Convert JSON project representations to Markdown
- Fetch GitHub repositories and save them as JSON or Markdown
- Fetch PyPI packages and save them as JSON or Markdown`,
}
rootCmd.AddCommand(
cmd.NewDumpCmd(),
cmd.NewReconstructCmd(),
cmd.NewJSON2MDCmd(),
cmd.NewGitHub2FileCmd(),
cmd.NewPyPI2FileCmd(),
)
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(1)
}
}