How khxmarka/2csv_converter works
2csv is a command-line converter that recursively scans a selected root, filters and converts SQL or Excel inputs into sibling CSV files, and splits oversized CSV/TXT files. The graph includes the documented completion-state and logging behavior. Some worker and conversion internals are unsampled, so uncertain internal call links are omitted.
Main entry points: app.go Run orchestration · workers.go Worker pool · convert.go SQL conversion · registry.go Output registry
Components 20
Entry and orchestration
- CLI prompt
internal/cli/cli.go - Run orchestration
internal/app/app.go - Worker pool
internal/app/workers.go
Discovery and state
- Recursive scan
internal/scan/scan.go - Completion lists
internal/marks/marks.go - Root selection
internal/config/config.go
Input conversion
- SQL conversion
internal/convert/convert.go - SQL scheduling
internal/convert/schedule.go - INSERT parser
internal/insert/parse.go - PII matching
internal/pii/pii.go - Table dump reader
internal/convert/table.go - Excel conversion
internal/xlsconv/xlsconv.go
CSV output
- CSV writer
internal/csvout/writer.go - Output registry
internal/csvout/registry.go - File splitting
internal/csvout/split.go
Runtime support
- Root lock
internal/app/rootlock.go - Progress and log
internal/logx/logx.go
Other components
- Operator
- Selected files
- Sibling CSV files
Connections 24
- Operator → CLI prompt: chooses root
- CLI prompt → Root selection: resolves root
- CLI prompt → Run orchestration: starts run
- Run orchestration → Recursive scan: finds files
- Selected files → Recursive scan: scans
- Run orchestration → Completion lists: reads state
- Run orchestration → Root lock: locks root
- Run orchestration → Worker pool: dispatches files
- Worker pool → SQL scheduling: schedules SQL
- SQL scheduling → SQL conversion: converts SQL
- SQL conversion → INSERT parser: parses INSERTs
- SQL conversion → PII matching: filters PII
- SQL conversion → Table dump reader: reads table dumps
- Worker pool → Excel conversion: converts workbooks
- SQL conversion → Output registry: creates outputs
- Table dump reader → Output registry: creates outputs
- Excel conversion → Output registry: creates outputs
- Output registry → CSV writer: opens writer
- CSV writer → Sibling CSV files: writes CSV
- Worker pool → File splitting: splits oversized files
- File splitting → Sibling CSV files: publishes parts
- Worker pool → Completion lists: records completion
- Run orchestration → Progress and log: logs run
- Worker pool → Progress and log: reports progress