add review functionality
This commit is contained in:
parent
4478941bfd
commit
48656dd915
1723
review/all.json
1723
review/all.json
File diff suppressed because one or more lines are too long
@ -40,6 +40,7 @@ export def "updateMods" [] {
|
||||
upsert link {|row|
|
||||
$"https://modrinth.com/mod/($row.slug)"
|
||||
} |
|
||||
where review |
|
||||
group-by kind |
|
||||
items {| k, v |
|
||||
$v | save $"out/($k).json" -f
|
||||
@ -69,7 +70,13 @@ export def review [...review: string] {
|
||||
open all.json |
|
||||
upsert review {
|
||||
if $in.slug in $review {
|
||||
true
|
||||
if ("review" in $in) {
|
||||
($in.review | into bool) or true
|
||||
} else {
|
||||
true
|
||||
}
|
||||
} else {
|
||||
$in.review
|
||||
}
|
||||
} |
|
||||
save all.json -f
|
||||
@ -82,13 +89,19 @@ export def conflicts [mod: string, ...conflicts: string] {
|
||||
open all.json |
|
||||
upsert conflicts {
|
||||
if $in.slug == $mod {
|
||||
$conflicts
|
||||
if ("conflicts" in $in) {
|
||||
$in.conflicts | append $conflicts | uniq
|
||||
} else {
|
||||
$conflicts
|
||||
}
|
||||
} else if $in.slug in $conflicts {
|
||||
if ("conflicts" in $in) {
|
||||
$in.conflicts | append $mod | uniq
|
||||
} else {
|
||||
[$mod]
|
||||
}
|
||||
} else {
|
||||
$in.conflicts
|
||||
}
|
||||
} |
|
||||
save all.json -f
|
||||
|
Loading…
Reference in New Issue
Block a user