Skip to content

Commit

Permalink
repull missions
Browse files Browse the repository at this point in the history
  • Loading branch information
ManApart committed Nov 12, 2023
1 parent c5bdffb commit 4abd94d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/jsMain/kotlin/views/CatalogueView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import el
import galaxy
import getPlanets
import inMemoryStorage
import kotlinx.browser.document
import kotlinx.browser.window
import kotlinx.dom.addClass
import kotlinx.dom.removeClass
Expand Down
19 changes: 19 additions & 0 deletions src/jsMain/resources/mission-wiki-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -4389,5 +4389,24 @@
"name": "A Legacy Forged",
"id": "UC09",
"type": "UNITED_COLONIES"
},
{
"name": "Due in Full",
"id": "002AD3D5"
},
{
"name": "Late Bloomer",
"id": "City_NA_Botany03 (00270717)",
"type": "CITY_OTHER"
},
{
"name": "Media Sponge",
"id": "FFCydoniaR03 2400",
"type": "CYDONIA"
},
{
"name": "Runaway",
"id": "City_CY_Runaway01(0022686C)",
"type": "CITY_OTHER"
}
]
1 change: 1 addition & 0 deletions src/jvmMain/kotlin/wikiScraper/MissionWikiScraper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ fun main() {
jsonMapper.decodeFromString<List<MissionWikiData>>(output.readText())
} else listOf()).associateBy { it.id }.toMutableMap()

println("Reading Missions")
missionUrlFile.readLines()
.also { println("Found a total of ${it.size} urls") }
.let { if (onlyOne) it.take(1) else it.drop(start) }
Expand Down
1 change: 1 addition & 0 deletions src/jvmMain/kotlin/wikiScraper/PlanetWikiScraper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ fun main() {
} else mapOf()).toMutableMap()

getPlanetNames()
.also { println("Reading ${it.size} Planets") }
.chunked(chunkSize)
.flatMap { chunk ->
chunk.mapNotNull { name -> getPage("https://starfieldwiki.net/wiki/Starfield:$name")?.let { name to it } }.also {
Expand Down

0 comments on commit 4abd94d

Please sign in to comment.