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

[DATA-1351]: Update CLI tool BE #2290

Merged
merged 1 commit into from
Apr 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion cli/viam/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const (
dataFlagEnd = "end"
dataFlagParallelDownloads = "parallel"
dataFlagTags = "tags"
dataFlagBboxLabels = "bbox_labels"

dataTypeBinary = "binary"
dataTypeTabular = "tabular"
Expand Down Expand Up @@ -326,6 +327,12 @@ func main() {
Usage: "tags filter. " +
"accepts tagged for all tagged data, untagged for all untagged data, or a list of tags for all data matching any of the tags",
},
&cli.StringSliceFlag{
Name: dataFlagBboxLabels,
Required: false,
Usage: "bbox labels filter. " +
"accepts string labels corresponding to bounding boxes within images",
},
},
Action: DataCommand,
},
Expand Down Expand Up @@ -923,7 +930,9 @@ func createDataFilter(c *cli.Context) (*datapb.Filter, error) {
}
}
}

if len(c.StringSlice(dataFlagBboxLabels)) != 0 {
filter.BboxLabels = c.StringSlice(dataFlagBboxLabels)
}
var start *timestamppb.Timestamp
var end *timestamppb.Timestamp
timeLayout := time.RFC3339
Expand Down