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

Fix metadata rendering issue #1018

Merged
merged 3 commits into from
Nov 16, 2023

Conversation

narasaka
Copy link
Contributor

@narasaka narasaka commented Nov 16, 2023

Description

Prior to this commit, the printed metadata was wrapped/formatted incorrectly when running mcap list metadata. This commit fixes it by removing the pretty json format – making the metadata column print only 1 line.

Prior to this commit, the printed metadata was wrapped/formatted incorrectly.
This commit fixes it by replacing newline characters with the appropriate amount
of \t and spaces to fit in the table. Might be a bit hacky/messy.
go/cli/mcap/cmd/metadata.go Outdated Show resolved Hide resolved
@narasaka narasaka requested a review from wkalt November 16, 2023 18:19
@wkalt
Copy link
Contributor

wkalt commented Nov 16, 2023

@narasaka this still looks misaligned:


[~/data/mcap] $ mcap list metadata gps.mcap
name         offset   length  metadata
my-metadata  1255462  56      {
                             "biz": "baz",
                             "foo": "bar"
                           }

what do you think about just putting it all on one line like in mcap list channels?

@narasaka narasaka merged commit 3633a57 into main Nov 16, 2023
24 checks passed
@narasaka narasaka deleted the nathan/fg-5563-mcap-list-metadata-rendering-issue branch November 16, 2023 19:33
pezy pushed a commit to pezy/mcap that referenced this pull request Jan 11, 2024
### Description

Prior to this commit, the printed metadata was wrapped/formatted
incorrectly when running `mcap list metadata`. This commit fixes it by
removing the pretty json format – making the metadata column print only
1 line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants