Merged
Conversation
dbarnett
reviewed
Apr 17, 2025
| keys = set(self.details.keys()) | ||
| keys.update(DETAILS_DEFAULT) | ||
|
|
||
| print("[") |
Collaborator
There was a problem hiding this comment.
Why print out the list characters manually instead of printing a list converted to JSON?
If it's for pretty printing, json.dumps accepts an indent arg to output pretty-printed JSON (with new lines indented to a certain width).
Contributor
Author
There was a problem hiding this comment.
It's to avoid keeping all the rows in memory.
All we're doing is outputting to stdout, so it seemed more prudent to stream each row instead of buffering.
Collaborator
There was a problem hiding this comment.
Ah okay, felt a little low-level to optimize for stdout but I guess that's how a lot of other code here is too.
kda
pushed a commit
to kda/gcalcli
that referenced
this pull request
Jan 7, 2026
* Extend Handler to allow unformatted output * Fix class inheritance * Implement Conference Handler * Implement Attendees Handler * Add json outputter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR extends the
--tsvoutput mechanism to provide an alternative--jsonoutput format.Implements #466
For consistency, anywhere where there's a json dict, the key names use the TSV column name.
As part of this,
attendeesdetail handlers. (attendeesfor TSV is semi-colon delimited email addresses)emailis more tolerant of creator/organizer