Documentation
¶
Index ¶
- func GetExcelPath(jsonChunkPath string) string
- func GetJSONPath(excelPath string) string
- func IsUpToDate(excelPath, jsonPath string) bool
- func ValidatePattern(pattern string) error
- type ConfigAdapter
- type ConversionResult
- type ConversionStats
- type ConverterAdapter
- func (ca *ConverterAdapter) ConvertFile(excelPath string) (*ConversionResult, error)
- func (ca *ConverterAdapter) ConvertFileWithSheetOptions(excelPath string, sheetOptions SheetSelectionOptions) (*ConversionResult, error)
- func (ca *ConverterAdapter) ConvertJSONToExcel(jsonPath string) (*ConversionResult, error)
- func (ca *ConverterAdapter) GetConversionStats(directory string) (*ConversionStats, error)
- func (ca *ConverterAdapter) GetExcelSheets(excelPath string) ([]SheetInfo, error)
- func (ca *ConverterAdapter) GetPendingConversions(directory string, pattern string) ([]string, error)
- type GitAdapter
- type SheetInfo
- type SheetSelectionOptions
- type WatcherAdapter
- type WatcherEvent
- type WatcherStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetExcelPath ¶ added in v0.1.1
GetExcelPath returns the Excel output path for a JSON chunk directory
func GetJSONPath ¶
GetJSONPath returns the JSON output path for an Excel file
func IsUpToDate ¶
IsUpToDate checks if the JSON chunks are up to date with the Excel file
func ValidatePattern ¶
ValidatePattern checks if a file pattern is valid
Types ¶
type ConfigAdapter ¶
type ConfigAdapter struct {
// contains filtered or unexported fields
}
ConfigAdapter bridges the TUI setup wizard with the config package
func NewConfigAdapter ¶
func NewConfigAdapter(directory string) *ConfigAdapter
func (*ConfigAdapter) CreateGitIgnore ¶
func (ca *ConfigAdapter) CreateGitIgnore(directory string) error
CreateGitIgnore creates a .gitignore file with Excel patterns
func (*ConfigAdapter) LoadConfig ¶
func (ca *ConfigAdapter) LoadConfig() (*config.Config, error)
LoadConfig loads existing configuration
func (*ConfigAdapter) SaveSetupConfig ¶
func (ca *ConfigAdapter) SaveSetupConfig(setup types.SetupConfig) error
SaveSetupConfig converts TUI setup config to internal config format and saves it
type ConversionResult ¶
ConversionResult contains the result of a conversion operation
type ConversionStats ¶
type ConversionStats struct {
TotalExcelFiles int
ConvertedFiles int
PendingConversions int
FailedConversions int
TotalJSONSize int64
}
ConversionStats contains statistics about conversions
type ConverterAdapter ¶
type ConverterAdapter struct {
// contains filtered or unexported fields
}
ConverterAdapter bridges the TUI with the converter package
func NewConverterAdapter ¶
func NewConverterAdapter() *ConverterAdapter
func (*ConverterAdapter) ConvertFile ¶
func (ca *ConverterAdapter) ConvertFile(excelPath string) (*ConversionResult, error)
ConvertFile converts a single Excel file to JSON
func (*ConverterAdapter) ConvertFileWithSheetOptions ¶
func (ca *ConverterAdapter) ConvertFileWithSheetOptions(excelPath string, sheetOptions SheetSelectionOptions) (*ConversionResult, error)
ConvertFileWithSheetOptions converts a single Excel file to JSON with sheet selection options
func (*ConverterAdapter) ConvertJSONToExcel ¶ added in v0.1.1
func (ca *ConverterAdapter) ConvertJSONToExcel(jsonPath string) (*ConversionResult, error)
ConvertJSONToExcel converts a JSON file back to Excel
func (*ConverterAdapter) GetConversionStats ¶
func (ca *ConverterAdapter) GetConversionStats(directory string) (*ConversionStats, error)
GetConversionStats returns statistics about conversions
func (*ConverterAdapter) GetExcelSheets ¶
func (ca *ConverterAdapter) GetExcelSheets(excelPath string) ([]SheetInfo, error)
GetExcelSheets returns a list of sheet names and indices from an Excel file
func (*ConverterAdapter) GetPendingConversions ¶
func (ca *ConverterAdapter) GetPendingConversions(directory string, pattern string) ([]string, error)
GetPendingConversions returns list of Excel files that need conversion
type GitAdapter ¶
type GitAdapter struct {
// contains filtered or unexported fields
}
GitAdapter provides minimal git operations for GitCells TUI Users should use their preferred git tools for all git operations
func NewGitAdapter ¶
func NewGitAdapter(directory string) (*GitAdapter, error)
func (*GitAdapter) CommitFiles ¶
func (ga *GitAdapter) CommitFiles(files []string, message string) error
CommitFiles commits the specified files with a simple message
func (*GitAdapter) InGitRepository ¶
func (ga *GitAdapter) InGitRepository() bool
InGitRepository returns true if we're in a git repository
func (*GitAdapter) IsClean ¶
func (ga *GitAdapter) IsClean() (bool, error)
IsClean returns true if the working directory is clean
type SheetSelectionOptions ¶
type SheetSelectionOptions struct {
SheetsToConvert []string // Specific sheet names to convert
ExcludeSheets []string // Sheet names to exclude
SheetIndices []int // Specific sheet indices to convert (0-based)
}
SheetSelectionOptions contains options for selecting specific sheets
type WatcherAdapter ¶ added in v0.1.4
type WatcherAdapter struct {
// contains filtered or unexported fields
}
WatcherAdapter bridges the TUI with the watcher package
func NewWatcherAdapter ¶ added in v0.1.4
func NewWatcherAdapter(cfg *config.Config, logger *logrus.Logger, onEvent func(WatcherEvent)) (*WatcherAdapter, error)
NewWatcherAdapter creates a new watcher adapter
func (*WatcherAdapter) GetStatus ¶ added in v0.1.4
func (wa *WatcherAdapter) GetStatus() WatcherStatus
GetStatus returns the current watcher status
func (*WatcherAdapter) IsRunning ¶ added in v0.1.4
func (wa *WatcherAdapter) IsRunning() bool
IsRunning returns whether the watcher is currently running
func (*WatcherAdapter) Start ¶ added in v0.1.4
func (wa *WatcherAdapter) Start() error
Start starts the file watcher
func (*WatcherAdapter) Stop ¶ added in v0.1.4
func (wa *WatcherAdapter) Stop() error
Stop stops the file watcher