1
0
Fork 0

bdfr: update script

This commit is contained in:
Daniel Kempkens 2023-12-13 21:03:46 +01:00
parent 6c8131159f
commit fbb59e80f1
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM

View file

@ -1,10 +1,24 @@
#!/usr/bin/env nu #!/usr/bin/env nu
def main [ let base_url = "https://media-browser.internal.kempkens.network/management/jobs/BdfrDownload/run?"
--subreddit: string
def "main subreddit" [
subreddit: string
--sort: string = "hot" --sort: string = "hot"
--limit: int = 999
] { ] {
let url = $"https://media-browser.internal.kempkens.network/management/jobs/BdfrDownload/run?args[subreddit]=($subreddit)&args[sort]=($sort)" let url = $"($base_url)args[subreddit]=($subreddit)&args[sort]=($sort)&args[limit]=($limit)"
http get $url | ignore 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 [] {}