2 Commits

Author SHA1 Message Date
Arik Jones (aider)
dcf32eaeeb fix: Load configuration before running rollup 2024-10-19 13:34:35 -05:00
tnypxl
02e39baf38 flatten scrape config to 'sites:'
* flatten scrape config to 'sites:'. Update unit tests and readme.
* remove check for file_extensions configuration. 
* show progress indication after 5 seconds.
* add documentation to functions
* fix: remove MaxDepth and link extraction functionality
* fix: Remove MaxDepth references from cmd/web.go
2024-10-14 16:09:58 -05:00

View File

@@ -26,6 +26,14 @@ var filesCmd = &cobra.Command{
Long: `The files subcommand writes the contents of all files (with target custom file types provided)
in a given project, current path or a custom path, to a single timestamped markdown file
whose name is <project-directory-name>-rollup-<timestamp>.md.`,
PreRunE: func(cmd *cobra.Command, args []string) error {
var err error
cfg, err = config.Load("rollup.yml") // Assuming the config file is named rollup.yml
if err != nil {
return fmt.Errorf("failed to load configuration: %v", err)
}
return nil
},
RunE: func(cmd *cobra.Command, args []string) error {
return runRollup(cfg)
},