Skip to content

Improve filter function #76

@sondove

Description

@sondove

We currently have reserved -f as a filter option for the list views -p,-m,-p -s etc

Ideally we would want the user to be able to specify one or more of the columns to filter on.

My suggestion is as follows

-f column=value for exact
-f column~value for regex match

Requirements

  • We should support quotes and meaningful shorthands
  • We should be case insensitive
  • We should support lowercase version of header columns

Examples

# filter for plot id or name
novem -p -f id=aapl_px
novem -p -f "Plot ID"=aapl_px
novem -p -f name~"apple price chart"

# Filter for email id or name
novem -m -f id=daily_summary
novem -m -f "Mail ID"=daily_summary
novem -m -f name~"daily summary mail"

# Filter for all public plots
novem -p -f shared=P
novem -p -f shared~p

# public and shared with chat
novem -p -f shared~pc

# public or chat
novem -p -f shared~"p|c"

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliissue relates to the novem clienhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions