From dcc960898a4323ee0290788c03f9a447c45956c6 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Wed, 17 Apr 2024 09:56:43 +0200 Subject: [PATCH] bdfr: search helper --- home/programs/scripts/bdfr | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/home/programs/scripts/bdfr b/home/programs/scripts/bdfr index 350ed3f..241c119 100755 --- a/home/programs/scripts/bdfr +++ b/home/programs/scripts/bdfr @@ -21,4 +21,14 @@ def "main user" [ http get $url | ignore } +def "main search" [ + subreddit: string + search: string + --limit: int = 9999 +] { + let url = $"($base_url)args[subreddit]=($subreddit)&args[search]=($search)&args[limit]=($limit)" + + http get $url | ignore +} + def main [] {}