Skip to content

Commit bdb8391

Browse files
committed
v0.23.0
1 parent 759a091 commit bdb8391

6 files changed

Lines changed: 35 additions & 27 deletions

File tree

csvtk/cmd/splitxlsx.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
"sort"
2828
"strings"
2929

30-
"github.com/360EntSecGroup-Skylar/excelize"
30+
"github.com/360EntSecGroup-Skylar/excelize/v2"
3131
"github.com/spf13/cobra"
3232
)
3333

@@ -137,7 +137,8 @@ Weakness : Complicated sheet structures are not well supported, e.g.,
137137
keysMap := make(map[string]struct{}, 10)
138138
keysList := make([]string, 0, 10)
139139
Keys2RowIndex := make(map[string]map[int]struct{}, 10)
140-
rows := xlsx.GetRows(sheetName)
140+
rows, err := xlsx.GetRows(sheetName)
141+
checkError(err)
141142
for rowIndex, record := range rows {
142143
if parseHeaderRow { // parsing header row
143144
colnames2fileds = make(map[string]int, len(record))

csvtk/cmd/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
)
3030

3131
// VERSION of csvtk
32-
const VERSION = "0.22.1"
32+
const VERSION = "0.23.0"
3333

3434
// versionCmd represents the version command
3535
var versionCmd = &cobra.Command{

doc/docs/download.md

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66

77
## Current Version
88

9-
- [csvtk v0.22.0](https://github.com/shenwei356/csvtk/releases/tag/v0.22.0)
10-
[![Github Releases (by Release)](https://img.shields.io/github/downloads/shenwei356/csvtk/v0.22.0/total.svg)](https://github.com/shenwei356/csvtk/releases/tag/v0.22.0)
11-
- `csvtk`:
12-
- **global flag `-t` does not overide `-D` anymore**. [#114](https://github.com/shenwei356/csvtk/issues/114)
13-
- **If the executable/symlink name is `tsvtk` the `-t/--tabs` option for tab input is set**. Thanks @bsipos. [#117](https://github.com/shenwei356/csvtk/pull/117)
14-
- new command: `csvtk csv2xlsx` for converting CSV/TSV file(s) to a single `.xlsx` file.
15-
- new command: `csvtk unfold` for unfolding multiple values in cells of a field. [#103](https://github.com/shenwei356/csvtk/issues/103)
16-
- rename `csvtk collapse` to `csvtk fold`, for folding multiple values of a field into cells of groups.
17-
- `csvtk cut`: **support range format `2-` to choose 2nd column to the end**. [#106](https://github.com/shenwei356/csvtk/issues/106)
18-
- `csvtk round`: fix bug of failing to round scientific notation with value small than one, e.g., `7.1E-1`.
9+
- [csvtk v0.23.0](https://github.com/shenwei356/csvtk/releases/tag/v0.23.0)
10+
[![Github Releases (by Release)](https://img.shields.io/github/downloads/shenwei356/csvtk/v0.23.0/total.svg)](https://github.com/shenwei356/csvtk/releases/tag/v0.23.0)
11+
- new comand: `csvtk csv2rst` for converting CSV to reStructuredText format. [#137](https://github.com/shenwei356/csvtk/issues/137)
12+
- `csvtk pretty`: add header separator line. [#123](https://github.com/shenwei356/csvtk/issues/123)
13+
- `csvtk mutate2/summary`: fix message and doc. Thanks @VladimirAlexiev [#127](https://github.com/shenwei356/csvtk/issues/127)
14+
- `csvtk mutate2`: fix null coalescence: ??. [#129](https://github.com/shenwei356/csvtk/issues/129)
15+
- `csvtk genautocomplete`: supports bash|zsh|fish|powershell. [#126](https://github.com/shenwei356/csvtk/issues/126)
16+
- `csvtk cat`: fix progress bar. [#130](https://github.com/shenwei356/csvtk/issues/130)
17+
- `csvtk grep`: new flag `immediate-output`.
18+
- `csvtk csv2xlsx`: fix bug for table with > 26 columns. [138](https://github.com/shenwei356/csvtk/issues/138)
1919

2020
Links:
2121

@@ -26,13 +26,13 @@ Links:
2626

2727
OS |Arch |File, 中国镜像 |Download Count
2828
:------|:---------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
29-
Linux |32-bit |[csvtk_linux_386.tar.gz](https://github.com/shenwei356/csvtk/releases/download/v0.22.0/csvtk_linux_386.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/csvtk/csvtk_linux_386.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/csvtk/latest/csvtk_linux_386.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/csvtk/releases/download/v0.22.0/csvtk_linux_386.tar.gz)
30-
Linux |**64-bit**|[**csvtk_linux_amd64.tar.gz**](https://github.com/shenwei356/csvtk/releases/download/v0.22.0/csvtk_linux_amd64.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/csvtk/csvtk_linux_amd64.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/csvtk/latest/csvtk_linux_amd64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/csvtk/releases/download/v0.22.0/csvtk_linux_amd64.tar.gz)
31-
Linux |**64-bit**|[**csvtk_linux_arm64.tar.gz**](https://github.com/shenwei356/csvtk/releases/download/v0.22.0/csvtk_linux_arm64.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/csvtk/csvtk_linux_arm64.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/csvtk/latest/csvtk_linux_arm64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/csvtk/releases/download/v0.22.0/csvtk_linux_arm64.tar.gz)
32-
macOS |**64-bit**|[**csvtk_darwin_amd64.tar.gz**](https://github.com/shenwei356/csvtk/releases/download/v0.22.0/csvtk_darwin_amd64.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/csvtk/csvtk_darwin_amd64.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/csvtk/latest/csvtk_darwin_amd64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/csvtk/releases/download/v0.22.0/csvtk_darwin_amd64.tar.gz)
33-
macOS |**arm64** |[**csvtk_darwin_arm64.tar.gz**](https://github.com/shenwei356/csvtk/releases/download/v0.22.0/csvtk_darwin_arm64.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/csvtk/csvtk_darwin_arm64.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/csvtk/latest/csvtk_darwin_arm64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/csvtk/releases/download/v0.22.0/csvtk_darwin_arm64.tar.gz)
34-
Windows|32-bit |[csvtk_windows_386.exe.tar.gz](https://github.com/shenwei356/csvtk/releases/download/v0.22.0/csvtk_windows_386.exe.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/csvtk/csvtk_windows_386.exe.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/csvtk/latest/csvtk_windows_386.exe.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/csvtk/releases/download/v0.22.0/csvtk_windows_386.exe.tar.gz)
35-
Windows|**64-bit**|[**csvtk_windows_amd64.exe.tar.gz**](https://github.com/shenwei356/csvtk/releases/download/v0.22.0/csvtk_windows_amd64.exe.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/csvtk/csvtk_windows_amd64.exe.tar.gz)|[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/csvtk/latest/csvtk_windows_amd64.exe.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/csvtk/releases/download/v0.22.0/csvtk_windows_amd64.exe.tar.gz)
29+
Linux |32-bit |[csvtk_linux_386.tar.gz](https://github.com/shenwei356/csvtk/releases/download/v0.23.0/csvtk_linux_386.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/csvtk/csvtk_linux_386.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/csvtk/latest/csvtk_linux_386.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/csvtk/releases/download/v0.23.0/csvtk_linux_386.tar.gz)
30+
Linux |**64-bit**|[**csvtk_linux_amd64.tar.gz**](https://github.com/shenwei356/csvtk/releases/download/v0.23.0/csvtk_linux_amd64.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/csvtk/csvtk_linux_amd64.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/csvtk/latest/csvtk_linux_amd64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/csvtk/releases/download/v0.23.0/csvtk_linux_amd64.tar.gz)
31+
Linux |**64-bit**|[**csvtk_linux_arm64.tar.gz**](https://github.com/shenwei356/csvtk/releases/download/v0.23.0/csvtk_linux_arm64.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/csvtk/csvtk_linux_arm64.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/csvtk/latest/csvtk_linux_arm64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/csvtk/releases/download/v0.23.0/csvtk_linux_arm64.tar.gz)
32+
macOS |**64-bit**|[**csvtk_darwin_amd64.tar.gz**](https://github.com/shenwei356/csvtk/releases/download/v0.23.0/csvtk_darwin_amd64.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/csvtk/csvtk_darwin_amd64.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/csvtk/latest/csvtk_darwin_amd64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/csvtk/releases/download/v0.23.0/csvtk_darwin_amd64.tar.gz)
33+
macOS |**arm64** |[**csvtk_darwin_arm64.tar.gz**](https://github.com/shenwei356/csvtk/releases/download/v0.23.0/csvtk_darwin_arm64.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/csvtk/csvtk_darwin_arm64.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/csvtk/latest/csvtk_darwin_arm64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/csvtk/releases/download/v0.23.0/csvtk_darwin_arm64.tar.gz)
34+
Windows|32-bit |[csvtk_windows_386.exe.tar.gz](https://github.com/shenwei356/csvtk/releases/download/v0.23.0/csvtk_windows_386.exe.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/csvtk/csvtk_windows_386.exe.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/csvtk/latest/csvtk_windows_386.exe.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/csvtk/releases/download/v0.23.0/csvtk_windows_386.exe.tar.gz)
35+
Windows|**64-bit**|[**csvtk_windows_amd64.exe.tar.gz**](https://github.com/shenwei356/csvtk/releases/download/v0.23.0/csvtk_windows_amd64.exe.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/csvtk/csvtk_windows_amd64.exe.tar.gz)|[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/csvtk/latest/csvtk_windows_amd64.exe.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/csvtk/releases/download/v0.23.0/csvtk_windows_amd64.exe.tar.gz)
3636

3737
## Installation
3838

@@ -103,6 +103,16 @@ fish:
103103

104104
## Previous Versions
105105

106+
- [csvtk v0.22.0](https://github.com/shenwei356/csvtk/releases/tag/v0.22.0)
107+
[![Github Releases (by Release)](https://img.shields.io/github/downloads/shenwei356/csvtk/v0.22.0/total.svg)](https://github.com/shenwei356/csvtk/releases/tag/v0.22.0)
108+
- `csvtk`:
109+
- **global flag `-t` does not overide `-D` anymore**. [#114](https://github.com/shenwei356/csvtk/issues/114)
110+
- **If the executable/symlink name is `tsvtk` the `-t/--tabs` option for tab input is set**. Thanks @bsipos. [#117](https://github.com/shenwei356/csvtk/pull/117)
111+
- new command: `csvtk csv2xlsx` for converting CSV/TSV file(s) to a single `.xlsx` file.
112+
- new command: `csvtk unfold` for unfolding multiple values in cells of a field. [#103](https://github.com/shenwei356/csvtk/issues/103)
113+
- rename `csvtk collapse` to `csvtk fold`, for folding multiple values of a field into cells of groups.
114+
- `csvtk cut`: **support range format `2-` to choose 2nd column to the end**. [#106](https://github.com/shenwei356/csvtk/issues/106)
115+
- `csvtk round`: fix bug of failing to round scientific notation with value small than one, e.g., `7.1E-1`.
106116
- [csvtk v0.21.0](https://github.com/shenwei356/csvtk/releases/tag/v0.21.0)
107117
[![Github Releases (by Release)](https://img.shields.io/github/downloads/shenwei356/csvtk/v0.21.0/total.svg)](https://github.com/shenwei356/csvtk/releases/tag/v0.21.0)
108118
- new command: `csvtk nrow/ncol` for printing number of rows or columns.

doc/docs/usage.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Usage
9696
```text
9797
csvtk -- a cross-platform, efficient and practical CSV/TSV toolkit
9898
99-
Version: 0.22.0
99+
Version: 0.23.0
100100
101101
Author: Wei Shen <shenwei356@gmail.com>
102102
@@ -135,6 +135,7 @@ Available Commands:
135135
corr calculate Pearson correlation between two columns
136136
csv2json convert CSV to JSON format
137137
csv2md convert CSV to markdown format
138+
csv2rst convert CSV to reStructuredText format
138139
csv2tab convert CSV to tabular format
139140
csv2xlsx convert CSV/TSV files to XLSX file
140141
cut select and arrange fields
@@ -145,7 +146,7 @@ Available Commands:
145146
fold fold multiple values of a field into cells of groups
146147
freq frequencies of selected fields
147148
gather gather columns into key-value pairs
148-
genautocomplete generate shell autocompletion script
149+
genautocomplete generate shell autocompletion script (bash|zsh|fish|powershell)
149150
grep grep data by selected fields with patterns/regular expressions
150151
head print first N records
151152
headers print headers
@@ -168,7 +169,7 @@ Available Commands:
168169
space2tab convert space delimited format to CSV
169170
split split CSV/TSV into multiple files according to column values
170171
splitxlsx split XLSX sheet into multiple sheets according to column values
171-
summary summary statistics of selected digital fields (groupby group fields)
172+
summary summary statistics of selected numeric or text fields (groupby group fields)
172173
tab2csv convert tabular format to CSV
173174
transpose transpose CSV data
174175
unfold unfold multiple values in cells of a field

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ module github.com/shenwei356/csvtk
33
go 1.16
44

55
require (
6-
github.com/360EntSecGroup-Skylar/excelize v1.4.1
76
github.com/360EntSecGroup-Skylar/excelize/v2 v2.3.2
87
github.com/Knetic/govaluate v3.0.0+incompatible
98
github.com/bsipos/thist v1.0.0

go.sum

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2k
1212
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
1313
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
1414
gioui.org v0.0.0-20200628203458-851255f7a67b/go.mod h1:jiUwifN9cRl/zmco43aAqh0aV+s9GbhG13KcD+gEpkU=
15-
github.com/360EntSecGroup-Skylar/excelize v1.4.1 h1:l55mJb6rkkaUzOpSsgEeKYtS6/0gHwBYyfo5Jcjv/Ks=
16-
github.com/360EntSecGroup-Skylar/excelize v1.4.1/go.mod h1:vnax29X2usfl7HHkBrX5EvSCJcmH3dT9luvxzu8iGAE=
1715
github.com/360EntSecGroup-Skylar/excelize/v2 v2.3.2 h1:MHu5KWWt28FzRGQgc4Ryj/lZT/W/by4NvsnstbWwkkY=
1816
github.com/360EntSecGroup-Skylar/excelize/v2 v2.3.2/go.mod h1:xc0ybJZXcn084ZaIvQv+LfCDQjMWfxkBa2K9nLXYJtI=
1917
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
@@ -232,7 +230,6 @@ github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5q
232230
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
233231
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
234232
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
235-
github.com/stretchr/testify v1.2.3-0.20181224173747-660f15d67dbb/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
236233
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
237234
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
238235
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=

0 commit comments

Comments
 (0)