Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phillbush/calendar
print upcoming events
https://github.com/phillbush/calendar
awk calendar unix
Last synced: 15 days ago
JSON representation
print upcoming events
- Host: GitHub
- URL: https://github.com/phillbush/calendar
- Owner: phillbush
- Created: 2021-07-27T01:03:54.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-08T22:17:45.000Z (about 3 years ago)
- Last Synced: 2024-11-22T06:11:50.537Z (3 months ago)
- Topics: awk, calendar, unix
- Language: Awk
- Homepage:
- Size: 37.1 KB
- Stars: 11
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
calendar
Calendar reads files for events, one event per line; and write to
standard output those events ocurring in the next seven days (counting
from today).Each event should begin with a date pattern in the format
[[YYYY-[MM]]-DDWW[+N|-N]. The hyphen (-) that separates the values can
be replaced by a slash (/) or a period (.). Several date patterns can
be supplied separated by a comma (,).YYYY should be any year number. MM should be a month number or a month
name (either complete or abbreviate, such as "April" or "Apr"). DD
should be the number of a day in the month. WW should be the name of a
day in the week (either complete or abbreviate). Either DD or WW (or
both) must be supplied.The date pattern can be followed by +N or -N to specify the week on the
month (for example Sun+2 is the second Sunday in the month, Mon-3 is
the third from last Monday in the month).For example, consider the following input.
# holidays
01/01 New Year's day
05/01 Labor Day
07/25 Generic holiday
12/25 Christmas
May/Sun+2 Mother's day
13Fri Friday the 13th
# classes
Mon,Wed Java Class
Tue,Thu Algebra Class
Tue,Thu Operating Systems Class
Tue,Thu Computer Network ClassIf today were 09 March 2021, then running calendar on this input would
print the following:Sunday 09 May 2021
Mother's day
Monday 10 May 2021
Java Class
Tuesday 11 May 2021
Algebra Class
Computer Network Class
Operating Systems Class
Wednesday 12 May 2021
Java Class
Thursday 13 May 2021
Algebra Class
Computer Network Class
Operating Systems Class
Friday 14 May 2021
Saturday 15 May 2021This software is in public domain and is provided AS IS, with NO WARRANTY.