| 41 | type journalListCommand struct { |
| 42 | cmd *cobra.Command |
| 43 | filter recordingFilter |
| 44 | } |
| 45 | |
| 46 | func newJournalListCommand() *journalListCommand { |
| 47 | journalListCommand := &journalListCommand{ |
| 48 | filter: recordingFilter{defaultWindow: personalWindow, defaultCalendars: personalCalendarIDs}, |
| 49 | } |
| 50 | journalListCommand.cmd = &cobra.Command{ |
| 51 | Use: "list", |
| 52 | Short: "List journal entries", |
| 53 | Example: ` hey journal list |
| 54 | hey journal list --limit 10 |
| 55 | hey journal list --starts-on 2026-01-01 --ends-on 2026-01-31 --json`, |
| 56 | RunE: journalListCommand.run, |
| 57 | Args: cobra.NoArgs, |
| 58 | } |
| 59 | |
| 60 | journalListCommand.filter.registerFlags(journalListCommand.cmd, "entries", "Calendar ID to read (defaults to the personal calendar)") |
| 61 | |