MCPcopy Create free account
hub / github.com/driangle/taskmd / runWebExport

Function runWebExport

apps/cli/internal/cli/web_export.go:43–68  ·  view source on GitHub ↗
(_ *cobra.Command, _ []string)

Source from the content-addressed store, hash-verified

41}
42
43func runWebExport(_ *cobra.Command, _ []string) error {
44 flags := GetGlobalFlags()
45
46 absDir, err := filepath.Abs(flags.TaskDir)
47 if err != nil {
48 return fmt.Errorf("invalid directory: %w", err)
49 }
50
51 info, err := os.Stat(absDir)
52 if err != nil || !info.IsDir() {
53 return fmt.Errorf("not a valid directory: %s", absDir)
54 }
55
56 absOutput, err := filepath.Abs(webExportOutput)
57 if err != nil {
58 return fmt.Errorf("invalid output path: %w", err)
59 }
60
61 return web.Export(web.ExportConfig{
62 OutputDir: absOutput,
63 ScanDir: absDir,
64 BasePath: webExportBasePath,
65 Verbose: flags.Verbose,
66 Version: FullVersion(),
67 })
68}

Calls 2

GetGlobalFlagsFunction · 0.85
FullVersionFunction · 0.85