Skip to content

Commit

Permalink
v0.4.6
Browse files Browse the repository at this point in the history
  • Loading branch information
shenwei356 committed Feb 8, 2017
1 parent 6495d31 commit 04447f5
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 50 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
- **Latest version:** [![Latest Stable Version](https://img.shields.io/github/release/shenwei356/csvtk.svg?style=flat)](https://github.com/shenwei356/csvtk/releases)
[![Github Releases](https://img.shields.io/github/downloads/shenwei356/csvtk/latest/total.svg?maxAge=3600)](http://bioinf.shenwei.me/csvtk/download/)
[![Cross-platform](https://img.shields.io/badge/platform-any-ec2eb4.svg?style=flat)](http://bioinf.shenwei.me/csvtk/download/)
[![Install-with-conda]( https://anaconda.org/bioconda/csvtk/badges/installer/conda.svg)](http://bioinf.shenwei.me/csvtk/download/)
[![Anaconda Cloud]( https://anaconda.org/bioconda/csvtk/badges/version.svg)](https://anaconda.org/bioconda/csvtk)


## Table of Contents
Expand Down Expand Up @@ -115,7 +117,7 @@ And then:

1. **For windows**, just copy `csvtk.exe` to `C:\WINDOWS\system32`.

#### Method 2: Install using conda
#### Method 2: Install via conda

conda install -c bioconda csvtk

Expand Down
7 changes: 5 additions & 2 deletions csvtk/cmd/grep.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,15 @@ var grepCmd = &cobra.Command{
return
}
}

if !noHighlight {
if !noHighlight && hitOne {
var j int
var buf bytes.Buffer
record2 := make([]string, len(record)) //with color
for i, c := range record {
if len(c) == 0 {
record2[i] = c
continue
}
if _, ok := fieldsMap[i+1]; (!negativeFields && ok) || (negativeFields && !ok) {
if useRegexp {
j = 0
Expand Down
2 changes: 1 addition & 1 deletion csvtk/cmd/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
)

// VERSION of csvtk
const VERSION = "0.4.5"
const VERSION = "0.4.6"

func checkError(err error) {
if err != nil {
Expand Down
52 changes: 7 additions & 45 deletions doc/docs/download.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,51 +6,10 @@

## Current Version

[csvtk v0.4.5](https://github.com/shenwei356/csvtk/releases/tag/v0.4.5)
[![Github Releases (by Release)](https://img.shields.io/github/downloads/shenwei356/csvtk/v0.4.5/total.svg)](https://github.com/shenwei356/csvtk/releases/tag/v0.4.5)

- `csvtk join`: support the 2nd or later files with entries with same ID: e.g.:

$ cat 1.csv
name,attr
foo,cool
bar,handsome
bob,beutiful

$ cat 2.csv
name,major
bar,bioinformatics
bob,microbiology
bob,computer science

$ cat 3.csv
id,name,hobby
1,bar,baseball
2,bob,basketball
3,foo,football
4,wei,programming

$ csvtk join 1.csv 2.csv | csvtk pretty
name attr major
bar handsome bioinformatics
bob beutiful microbiology
bob beutiful computer science

$ csvtk join 1.csv 2.csv 3.csv -f name -k | csvtk pretty
name attr major id hobby
foo cool 3 football
bar handsome bioinformatics 1 baseball
bob beutiful microbiology 2 basketball
bob beutiful computer science 2 basketball

$ csvtk join 3.csv 1.csv 2.csv -f name -k | csvtk pretty
id name hobby attr major
1 bar baseball handsome bioinformatics
2 bob basketball beutiful computer science
2 bob basketball beutiful computer science
3 foo football cool
4 wei programming
[csvtk v0.4.6](https://github.com/shenwei356/csvtk/releases/tag/v0.4.6)
[![Github Releases (by Release)](https://img.shields.io/github/downloads/shenwei356/csvtk/v0.4.6/total.svg)](https://github.com/shenwei356/csvtk/releases/tag/v0.4.6)

- `csvtk grep`: fix result highlight when flag `-v` is on.

Links:

Expand Down Expand Up @@ -94,7 +53,7 @@ And then:

1. **For windows**, just copy `csvtk.exe` to `C:\WINDOWS\system32`.

#### Method 2: Install using conda
#### Method 2: Install via conda [![Install-with-conda](https://anaconda.org/bioconda/csvtk/badges/installer/conda.svg)](http://bioinf.shenwei.me/csvtk/download/) [![Anaconda Cloud]( https://anaconda.org/bioconda/csvtk/badges/version.svg)](https://anaconda.org/bioconda/csvtk) [![downloads](https://anaconda.org/bioconda/csvtk/badges/downloads.svg)](https://anaconda.org/bioconda/csvtk)

conda install -c bioconda csvtk

Expand All @@ -105,6 +64,9 @@ And then:

## Previous Versions

- [csvtk v0.4.5](https://github.com/shenwei356/csvtk/releases/tag/v0.4.5)
[![Github Releases (by Release)](https://img.shields.io/github/downloads/shenwei356/csvtk/v0.4.5/total.svg)](https://github.com/shenwei356/csvtk/releases/tag/v0.4.5)
- `csvtk join`: support the 2nd or later files with entries with same ID.
- [csvtk v0.4.4](https://github.com/shenwei356/csvtk/releases/tag/v0.4.4)
[![Github Releases (by Release)](https://img.shields.io/github/downloads/shenwei356/csvtk/v0.4.4/total.svg)](https://github.com/shenwei356/csvtk/releases/tag/v0.4.4)
- add command `csvtk freq`: frequencies of selected fields
Expand Down
2 changes: 1 addition & 1 deletion doc/docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Usage
```
A cross-platform, efficient and practical CSV/TSV toolkit
Version: 0.4.5
Version: 0.4.6
Author: Wei Shen <shenwei356@gmail.com>
Expand Down

0 comments on commit 04447f5

Please sign in to comment.