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