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

feat: Add a flag to hide the description #2

Merged
merged 2 commits into from
Jun 13, 2023
Merged

feat: Add a flag to hide the description #2

merged 2 commits into from
Jun 13, 2023

Conversation

beyarkay
Copy link
Contributor

This commit adds a flag to not show any of the event descriptions, like a summary view.

Some calendars have really long event descriptions containing links and all sorts of garbage. It's super handy to just see the event name. Consider:

╰→ calio buffalo-city-block-1.ics --hide-desc
Sun Jun 11 2023
    16:00-18:00 🔌BuffaloCityBlock1 Stage 4 😣

Mon Jun 12 2023
    21:00-00:00 🔌BuffaloCityBlock1 Stage 3 😟

Wed Jun 14 2023
    16:00-18:00 🔌BuffaloCityBlock1 Stage 3 😟
    18:00-19:00 ⚠️  End of schedule

versus the full version:

╰→ calio buffalo-city-block-1.ics

Sun Jun 11 2023
    16:00-18:00 🔌BuffaloCityBlock1 Stage 4 😣
                This event shows that there will be loadshedding on Sunday from 16:00 to Sunday at 18:00 in the load shedding area buffalo-city-block-1.

                When new loadshedding schedules are announced, your calendar will be automatically updated to show when your power will be off.

                While these new schedules are calculated immediately, it can sometimes take a bit of time for your calendar app (ie Google Calendar, Apple iCalendar, or Outlook) to fetch the updated schedules. Often you can set the update frequency in the settings of your calendar app.

                ---

                Incorrect? Open an issue here: https://github.com/beyarkay/eskom-calendar/issues/new

                Generated by Boyd Kane's eskom-calendar: https://eskomcalendar.co.za/ec?calendar=buffalo-city-block-1.ics.

                National loadshedding information scraped from https://twitter.com/Eskom_SA/status/1667876251464335361.

                Calendar compiled on Sunday 11 Jun 2023 at 13:31:03 (UTC+02:00) by run https://github.com/beyarkay/eskom-calendar/actions/runs/5235724964.

                eskom-calendar version: https://github.com/beyarkay/eskom-calendar/tree/5cdc7ed3c3648a456d42af8728075b09af5ec019

Mon Jun 12 2023
    21:00-00:00 🔌BuffaloCityBlock1 Stage 3 😟
                This event shows that there will be loadshedding on Monday from 21:00 to Tuesday at 00:00 in the load shedding area buffalo-city-block-1.

                When new loadshedding schedules are announced, your calendar will be automatically updated to show when your power will be off.

                While these new schedules are calculated immediately, it can sometimes take a bit of time for your calendar app (ie Google Calendar, Apple iCalendar, or Outlook) to fetch the updated schedules. Often you can set the update frequency in the settings of your calendar app.

                ---

                Incorrect? Open an issue here: https://github.com/beyarkay/eskom-calendar/issues/new

                Generated by Boyd Kane's eskom-calendar: https://eskomcalendar.co.za/ec?calendar=buffalo-city-block-1.ics.

                National loadshedding information scraped from https://twitter.com/Eskom_SA/status/1667876251464335361.

                Calendar compiled on Sunday 11 Jun 2023 at 13:31:03 (UTC+02:00) by run https://github.com/beyarkay/eskom-calendar/actions/runs/5235724964.

                eskom-calendar version: https://github.com/beyarkay/eskom-calendar/tree/5cdc7ed3c3648a456d42af8728075b09af5ec019

Wed Jun 14 2023
    16:00-18:00 🔌BuffaloCityBlock1 Stage 3 😟
                This event shows that there will be loadshedding on Wednesday from 16:00 to Wednesday at 18:00 in the load shedding area buffalo-city-block-1.

                When new loadshedding schedules are announced, your calendar will be automatically updated to show when your power will be off.

                While these new schedules are calculated immediately, it can sometimes take a bit oftime for your calendar app (ie Google Calendar, Apple iCalendar, or Outlook) to fetch the updated schedules. Often you can set the update frequency in the settings of your calendar app.

                ---

                Incorrect? Open an issue here: https://github.com/beyarkay/eskom-calendar/issues/new

                Generated byBoyd Kane's eskom-calendar: https://eskomcalendar.co.za/ec?calendar=buffalo-city-block-1.ics.

                National loadshedding information scraped from https://twitter.com/Eskom_SA/status/1667876251464335361.

                Calendar compiled onSunday 11 Jun 2023 at 13:31:03 (UTC+02:00) by run https://github.com/beyarkay/eskom-calendar/actions/runs/5235724964.

                eskom-calendar version: https://github.com/beyarkay/eskom-calendar/tree/5cdc7ed3c3648a456d42af8728075b09af5ec019

    18:00-19:00 ⚠️  End of schedule
                This is the end of the known loadshedding schedule.

                Unfortunately only a few days worth of loadshedding schedules are released at a time. An update to the loadshedding schedule is usually announced a day or two before the previous schedule runs out, so this event will move in your calendar as new schedules are announced.

                You don't have to do anything, but just know that there might be loadshedding after this point, but there also might not. It's impossible to say for sure.

                Incorrect? Open an issuehere: https://github.com/beyarkay/eskom-calendar/issues/new

                ---
                Generated by Boyd Kane's eskom-calendar: https://github.com/beyarkay/eskom-calendar/tree/5cdc7ed3c3648a456d42af8728075b09af5ec019

                Calendar compiled at 2023-06-11T13:31:03.330216061+00:00

The former is quite a bit more readable.

This commit adds a flag to not show any of the event descriptions, like
a summary view.

Some calendars have really long event descriptions containing links and
all sorts of garbage. It's super handy to just see the event name.
Consider:

```
╰→ calio buffalo-city-block-1.ics --hide-desc
Sun Jun 11 2023
    16:00-18:00 🔌BuffaloCityBlock1 Stage 4 😣

Mon Jun 12 2023
    21:00-00:00 🔌BuffaloCityBlock1 Stage 3 😟

Wed Jun 14 2023
    16:00-18:00 🔌BuffaloCityBlock1 Stage 3 😟
    18:00-19:00 ⚠️  End of schedule
```

versus the full version:

```
╰→ calio buffalo-city-block-1.ics

Sun Jun 11 2023
    16:00-18:00 🔌BuffaloCityBlock1 Stage 4 😣
                This event shows that there will be loadshedding on Sunday from 16:00 to Sunday at 18:00 in the load shedding area buffalo-city-block-1.

                When new loadshedding schedules are announced, your calendar will be automatically updated to show when your power will be off.

                While these new schedules are calculated immediately, it can sometimes take a bit of time for your calendar app (ie Google Calendar, Apple iCalendar, or Outlook) to fetch the updated schedules. Often you can set the update frequency in the settings of your calendar app.

                ---

                Incorrect? Open an issue here: https://github.com/beyarkay/eskom-calendar/issues/new

                Generated by Boyd Kane's eskom-calendar: https://eskomcalendar.co.za/ec?calendar=buffalo-city-block-1.ics.

                National loadshedding information scraped from https://twitter.com/Eskom_SA/status/1667876251464335361.

                Calendar compiled on Sunday 11 Jun 2023 at 13:31:03 (UTC+02:00) by run https://github.com/beyarkay/eskom-calendar/actions/runs/5235724964.

                eskom-calendar version: https://github.com/beyarkay/eskom-calendar/tree/5cdc7ed3c3648a456d42af8728075b09af5ec019

Mon Jun 12 2023
    21:00-00:00 🔌BuffaloCityBlock1 Stage 3 😟
                This event shows that there will be loadshedding on Monday from 21:00 to Tuesday at 00:00 in the load shedding area buffalo-city-block-1.

                When new loadshedding schedules are announced, your calendar will be automatically updated to show when your power will be off.

                While these new schedules are calculated immediately, it can sometimes take a bit of time for your calendar app (ie Google Calendar, Apple iCalendar, or Outlook) to fetch the updated schedules. Often you can set the update frequency in the settings of your calendar app.

                ---

                Incorrect? Open an issue here: https://github.com/beyarkay/eskom-calendar/issues/new

                Generated by Boyd Kane's eskom-calendar: https://eskomcalendar.co.za/ec?calendar=buffalo-city-block-1.ics.

                National loadshedding information scraped from https://twitter.com/Eskom_SA/status/1667876251464335361.

                Calendar compiled on Sunday 11 Jun 2023 at 13:31:03 (UTC+02:00) by run https://github.com/beyarkay/eskom-calendar/actions/runs/5235724964.

                eskom-calendar version: https://github.com/beyarkay/eskom-calendar/tree/5cdc7ed3c3648a456d42af8728075b09af5ec019

Wed Jun 14 2023
    16:00-18:00 🔌BuffaloCityBlock1 Stage 3 😟
                This event shows that there will be loadshedding on Wednesday from 16:00 to Wednesday at 18:00 in the load shedding area buffalo-city-block-1.

                When new loadshedding schedules are announced, your calendar will be automatically updated to show when your power will be off.

                While these new schedules are calculated immediately, it can sometimes take a bit oftime for your calendar app (ie Google Calendar, Apple iCalendar, or Outlook) to fetch the updated schedules. Often you can set the update frequency in the settings of your calendar app.

                ---

                Incorrect? Open an issue here: https://github.com/beyarkay/eskom-calendar/issues/new

                Generated byBoyd Kane's eskom-calendar: https://eskomcalendar.co.za/ec?calendar=buffalo-city-block-1.ics.

                National loadshedding information scraped from https://twitter.com/Eskom_SA/status/1667876251464335361.

                Calendar compiled onSunday 11 Jun 2023 at 13:31:03 (UTC+02:00) by run https://github.com/beyarkay/eskom-calendar/actions/runs/5235724964.

                eskom-calendar version: https://github.com/beyarkay/eskom-calendar/tree/5cdc7ed3c3648a456d42af8728075b09af5ec019

    18:00-19:00 ⚠️  End of schedule
                This is the end of the known loadshedding schedule.

                Unfortunately only a few days worth of loadshedding schedules are released at a time. An update to the loadshedding schedule is usually announced a day or two before the previous schedule runs out, so this event will move in your calendar as new schedules are announced.

                You don't have to do anything, but just know that there might be loadshedding after this point, but there also might not. It's impossible to say for sure.

                Incorrect? Open an issuehere: https://github.com/beyarkay/eskom-calendar/issues/new

                ---
                Generated by Boyd Kane's eskom-calendar: https://github.com/beyarkay/eskom-calendar/tree/5cdc7ed3c3648a456d42af8728075b09af5ec019

                Calendar compiled at 2023-06-11T13:31:03.330216061+00:00
```
@oscarmcm oscarmcm self-assigned this Jun 12, 2023
@oscarmcm oscarmcm added the enhancement New feature or request label Jun 12, 2023
@oscarmcm
Copy link
Owner

This looks amazing!!

Signed-off-by: Oscar Cortez <om.cortez.2010@gmail.com>
@oscarmcm oscarmcm merged commit dd7b65a into oscarmcm:main Jun 13, 2023
@oscarmcm
Copy link
Owner

Thanks for the contribution!

@beyarkay beyarkay deleted the no-desc branch June 14, 2023 16:58
@beyarkay
Copy link
Contributor Author

Thanks for the tool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants