Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions icalBuddy.m
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ int main(int argc, char *argv[])
@"-nrd No relative dates\n"
@"-npn No property names\n"
@"-n Include only events from now on\n"
@"-oa Only output all-day events\n"
@"-sed Show empty dates\n"
@"-uid Show event/task UIDs\n"
@"-eed Exclude end datetimes\n"
Expand Down
4 changes: 4 additions & 0 deletions icalBuddy.pod
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ Omit property names from the output (i.e. only show property values -- e.g. "My

If the I<command> value C<eventsToday> is used, only output events that occur between the current time and the end of the day (as opposed to events that occur between the start and end of the day, as by default.)

=item B<-oa>, B<--onlyAllDayEvents>

Only output all-day events.

=item B<-na>, B<--maxNumAttendees>

Maximum number of attendees to show for events.
Expand Down
2 changes: 2 additions & 0 deletions icalBuddyArgs.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ void handleArgument(NSString *shortName, NSString *longName, id value,
opts->alwaysShowTodaysSection = YES;
else if ([shortName isEqualToString:@"ea"] || [longName isEqualToString:@"excludeAllDayEvents"])
opts->excludeAllDayEvents = YES;
else if ([shortName isEqualToString:@"oa"] || [longName isEqualToString:@"onlyAllDayEvents"])
opts->onlyAllDayEvents = YES;
}

// value-requiring arguments
Expand Down
3 changes: 2 additions & 1 deletion icalBuddyDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ typedef struct
BOOL alwaysShowTodaysSection;
BOOL specificCalFilterPrecedesCalTypeFilter;
BOOL excludeAllDayEvents;
BOOL onlyAllDayEvents;

BOOL output_is_uncompletedTasks;
BOOL output_is_eventsToday;
Expand Down Expand Up @@ -171,7 +172,7 @@ typedef struct
NSUInteger maxNumNoteCharacters;
} AppOptions;

#define NEW_DEFAULT_APP_OPTIONS {NO,NO,NO,NO,NO,NO,NO,NO,NO,NO,NO,NO,NO,NO,NO,NO,NO,NO,NO,NO,NO,\
#define NEW_DEFAULT_APP_OPTIONS {NO,NO,NO,NO,NO,NO,NO,NO,NO,NO,NO,NO,NO,NO,NO,NO,NO,NO,NO,NO,NO,NO,\
nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,0,0}


Expand Down
3 changes: 3 additions & 0 deletions icalBuddyFunctions.m
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ BOOL areWePrintingAlsoPastEvents(AppOptions *opts)
if (opts->excludeAllDayEvents)
ret = [ret filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"isAllDay == NO"]];

if (opts->onlyAllDayEvents)
ret = [ret filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"isAllDay == YES"]];

return ret;
}

Expand Down