dotfiles/home/programs/scripts/bdfr

24 lines
505 B
Text
Executable file

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