forked from MapComplete/MapComplete
Performance: prepare dropping the NSI-logos from the repo
This commit is contained in:
parent
164b02c8ff
commit
555075edfe
3 changed files with 17 additions and 26 deletions
|
@ -42,7 +42,7 @@ class NsiLogos extends Script {
|
|||
let path = basePath + nsiItem.id
|
||||
|
||||
const logos = nsiWD["wikidata"][nsiItem?.tags?.[type + ":wikidata"]]?.logos
|
||||
const nsi = await NameSuggestionIndex.getNsiIndex()
|
||||
const nsi = await NameSuggestionIndex.getNsiIndex("./assets/data/nsi/")
|
||||
if (nsi.isSvg(nsiItem, type)) {
|
||||
path = path + ".svg"
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ class NsiLogos extends Script {
|
|||
* @param type
|
||||
*/
|
||||
async downloadFor(type: string): Promise<{ downloadCount: number; errored: number }> {
|
||||
const nsi = await NameSuggestionIndex.getNsiIndex()
|
||||
const nsi = await NameSuggestionIndex.getNsiIndex("./assets/data/nsi/")
|
||||
const items = nsi.allPossible(type)
|
||||
const basePath = "./public/assets/data/nsi/logos/"
|
||||
let downloadCount = 0
|
||||
|
@ -158,7 +158,7 @@ class NsiLogos extends Script {
|
|||
}
|
||||
|
||||
private async generateRendering(type: string) {
|
||||
const nsi = await NameSuggestionIndex.getNsiIndex()
|
||||
const nsi = await NameSuggestionIndex.getNsiIndex("./assets/data/nsi/")
|
||||
const items = nsi.allPossible(type)
|
||||
const filterOptions: FilterConfigOptionJson[] = items.map((item) => {
|
||||
return {
|
||||
|
@ -278,7 +278,7 @@ class NsiLogos extends Script {
|
|||
* @private
|
||||
*/
|
||||
private static async prune() {
|
||||
const nsi = await NameSuggestionIndex.getNsiIndex()
|
||||
const nsi = await NameSuggestionIndex.getNsiIndex("./assets/data/nsi/")
|
||||
const types = nsi.supportedTypes()
|
||||
const ids = new Set<string>()
|
||||
for (const t of types) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue