Documentation ¶
Index ¶
Constants ¶
View Source
const VERSION = "0.26.0"
VERSION of csvtk
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "csvtk", Short: "A cross-platform, efficient and practical CSV/TSV toolkit", Long: fmt.Sprintf(`csvtk -- a cross-platform, efficient and practical CSV/TSV toolkit Version: %s Author: Wei Shen <shenwei356@gmail.com> Documents : http://shenwei356.github.io/csvtk Source code: https://github.com/shenwei356/csvtk Attention: 1. The CSV parser requires all the lines have same number of fields/columns. Even lines with spaces will cause error. Use '-I/--ignore-illegal-row' to skip these lines if neccessary. 2. By default, csvtk thinks your files have header row, if not, switch flag "-H" on. 3. Column names better be unique. 4. By default, lines starting with "#" will be ignored, if the header row starts with "#", please assign flag "-C" another rare symbol, e.g. '$'. 5. By default, csvtk handles CSV files, use flag "-t" for tab-delimited files. 6. If double quotes exist in fields, use flag "-l". 7. Do not mix use field (column) numbers and names. Environment variables for frequently used global flags: - "CSVTK_T" for flag "-t/--tabs" - "CSVTK_H" for flag "-H/--no-header-row" You can also create a soft link named "tsvtk" for "csvtk", which sets "-t/--tabs" by default. `, VERSION), }
RootCmd represents the base command when called without any subcommands
Functions ¶
func ExcelColumnIndex ¶ added in v0.23.0
func Execute ¶
func Execute()
Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func NewCSVWriterChanByConfig ¶
NewCSVWriterChanByConfig returns a chanel which you can send record to write
func ParseByteSize ¶ added in v0.26.0
ParseByteSize parses byte size from string
Types ¶
type CSVReader ¶
type CSVReader struct { Reader *csv.Reader Ch chan CSVRecordsChunk MetaLine []byte // meta line of separator declaration used by MS Excel IgnoreEmptyRow bool IgnoreIllegalRow bool NumEmptyRows []int NumIllegalRows []int // contains filtered or unexported fields }
CSVReader is
func NewCSVReader ¶
NewCSVReader is
type CSVRecordsChunk ¶
CSVRecordsChunk is chunk of CSV records
Source Files ¶
- add-header.go
- box.go
- cat.go
- comb.go
- concat.go
- corr.go
- csv.go
- csv2json.go
- csv2md.go
- csv2rst.go
- csv2tab.go
- csv2xlsx.go
- cut.go
- del-header.go
- dim.go
- filter.go
- filter2.go
- fix.go
- fmtdate.go
- fold.go
- freq.go
- gather.go
- genautocomplete.go
- grep.go
- head.go
- header.go
- helper.go
- hist.go
- inter.go
- join.go
- line.go
- logging.go
- mutate.go
- mutate2.go
- ncol.go
- nrow.go
- plot.go
- pretty.go
- rename.go
- rename2.go
- replace.go
- root.go
- round.go
- sample.go
- sep.go
- sort.go
- space2tab.go
- split.go
- splitxlsx.go
- summary.go
- tab2csv.go
- transpose.go
- unfold.go
- uniq.go
- version.go
- watch.go
- xlsx2csv.go
Click to show internal directories.
Click to hide internal directories.