aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-07-05 21:21:13 -0700
committerFuwn <[email protected]>2025-07-05 21:21:13 -0700
commit5474bcfd31b381e69fa3e07f6455719f48d868db (patch)
treefee2509d518ba274b7074f9566d9d2451f799fcd /src
parentfeat(cli): Alias schedule subcommand (diff)
downloadoguri-5474bcfd31b381e69fa3e07f6455719f48d868db.tar.xz
oguri-5474bcfd31b381e69fa3e07f6455719f48d868db.zip
feat(cli): Support "yesterday" schedule keyword
Diffstat (limited to 'src')
-rw-r--r--src/oguri/cli.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/oguri/cli.py b/src/oguri/cli.py
index 96a5f5f..3410610 100644
--- a/src/oguri/cli.py
+++ b/src/oguri/cli.py
@@ -18,18 +18,22 @@ def schedule(day, reverse):
"""
Shows the airing schedule for a given day.
- DAY can be 'today', 'tomorrow', or an integer representing the number of days from now.
+ DAY can be "today", "tomorrow", "yesterday", or an integer representing the number of days from now.
"""
days_offset = 0
if day == "tomorrow":
days_offset = 1
+ elif day == "yesterday":
+ days_offset = -1
elif day != "today":
try:
days_offset = int(day)
except ValueError:
- raise click.BadParameter('DAY must be "today", "tomorrow", or an integer.')
+ raise click.BadParameter(
+ 'DAY must be "today", "tomorrow", "yesterday", or an integer.'
+ )
asyncio.run(schedule_logic.show_schedule(days_offset, reverse))