bdfr: update script
This commit is contained in:
parent
6c8131159f
commit
fbb59e80f1
1 changed files with 17 additions and 3 deletions
|
@ -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 [] {}
|
||||||
|
|
Loading…
Reference in a new issue