processor

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package processor handles the concatenation of project files into a single document while respecting ignore patterns and preserving file structure. It's responsible for traversing directories, filtering files, and assembling the final output document with clear separation between files and maintaining context about the project structure.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileInfo added in v0.3.0

type FileInfo struct {
	RelativePath string // The path to display in the output (relative to root)
	AbsolutePath string // The actual path to read the file from (resolved symlinks)
}

FileInfo represents a file to be included in the output

type Processor

type Processor struct {
	// contains filtered or unexported fields
}

Processor handles the concatenation of project files into a single document All options are set via SandwormOptions, which is constructed from CLI flags and config. Symlink and line number logic are fully configurable via CLI flags or config file.

func NewWithOptions added in v0.3.0

func NewWithOptions(rootDir, outputFile, ignoreFile string, opts SandwormOptions) (*Processor, error)

NewWithOptions creates a new Processor instance with all options

func (*Processor) Process

func (p *Processor) Process() (int64, error)

Process concatenates all project files into a single document

func (p *Processor) SetFollowSymlinks(follow bool)

SetFollowSymlinks enables or disables following symbolic links during traversal

type SandwormOptions added in v0.3.0

type SandwormOptions struct {
	PrintLineNumbers bool
	FollowSymlinks   bool
}

SandwormOptions holds the options for the Processor Add new options here as needed; always map from cli.Options. If an option is nil in cli.Options, the value is resolved from config.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL