Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform: grep (row filter) #31

Open
5 of 6 tasks
rufuspollock opened this issue Aug 21, 2013 · 8 comments
Open
5 of 6 tasks

Transform: grep (row filter) #31

rufuspollock opened this issue Aug 21, 2013 · 8 comments

Comments

@rufuspollock
Copy link
Member

  • basic match
  • docs
  • regex match -r/--regex argument
  • -i/--invert invert match (note for unix grep this is -v whilst -i is for ignore case ...)
  • ignore case (??)
  • ability to select columns to grep against (-f option??) - cf Common arguments across transforms #36

Basic question: do we match unix grep as much as possible?

See also

@rufuspollock
Copy link
Member Author

Start on this in PR #28

@rufuspollock
Copy link
Member Author

@davidmiller interested in your thoughts on following unix grep (vs e.g. csvgrep). For example, -i for invert versus -v ...

@davidmiller
Copy link
Contributor

+10 for following unix grep flags.

@rufuspollock rufuspollock mentioned this issue Nov 6, 2013
7 tasks
@andylolz
Copy link
Collaborator

andylolz commented Nov 6, 2013

Is this the time to introduce a javascript optparse library? Parsing options for the operations so far has been fine without one, but grep is a bit trickier, and I guess npm is bound to have a good option parser.

@rufuspollock
Copy link
Member Author

@andylolz I thought that may be a good idea :-) (plus will sync with #19 and #18)

@andylolz
Copy link
Collaborator

node-optimist looks like a very popular choice.

andylolz added a commit that referenced this issue Nov 13, 2013
@andylolz
Copy link
Collaborator

A few more of these options are in now (see: updated docs page). The options are a mix of csvkit grep and unix grep.

Regex is hampered quite a bit by URL limitations e.g. neither forward slash nor backslash can be used outside of the query string (since forward slash means pipe).

@andylolz
Copy link
Collaborator

This is pretty much done now…

I stripped out 'basic match' in favour of regex match. Maybe both options would be better (i.e. the csvkit way, rather than the unix way)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants