dotfiles/home/programs/scripts/bdfr

25 lines
505 B
Text
Raw Normal View History

2023-12-11 23:31:51 +00:00
#!/usr/bin/env nu
2023-12-13 20:03:46 +00:00
let base_url = "https://media-browser.internal.kempkens.network/management/jobs/BdfrDownload/run?"
def "main subreddit" [
subreddit: string
2023-12-11 23:31:51 +00:00
--sort: string = "hot"
2023-12-13 20:03:46 +00:00
--limit: int = 999
2023-12-11 23:31:51 +00:00
] {
2023-12-13 20:03:46 +00:00
let url = $"($base_url)args[subreddit]=($subreddit)&args[sort]=($sort)&args[limit]=($limit)"
2023-12-11 23:31:51 +00:00
http get $url | ignore
}
2023-12-13 20:03:46 +00:00
def "main user" [
user: string
--limit: int = 9999
] {
let url = $"($base_url)args[user]=($user)&args[limit]=($limit)"
http get $url | ignore
}
def main [] {}