forked from MapComplete/MapComplete
Add quickfacts-box to wikipedia article
This commit is contained in:
parent
c1d21fcbe5
commit
902f32ba4b
14 changed files with 343 additions and 50 deletions
16
test.ts
16
test.ts
|
@ -1,5 +1,13 @@
|
|||
import FeaturedMessage from "./UI/BigComponents/FeaturedMessage";
|
||||
import Combine from "./UI/Base/Combine";
|
||||
import * as wd from "wikidata-sdk"
|
||||
import * as wds from "wikibase-sdk"
|
||||
import {Utils} from "./Utils";
|
||||
|
||||
new FeaturedMessage().AttachTo("maindiv")
|
||||
new Combine(FeaturedMessage.WelcomeMessages().map(wm => FeaturedMessage.CreateFeaturedBox(wm))).AttachTo("extradiv")
|
||||
const url = wd.getEntities(["Q42"])
|
||||
console.log(url)
|
||||
Utils.downloadJson(url).then(async (entities) => {
|
||||
//const parsed = wd.parse.wb.entities(entities)["Q42"]
|
||||
console.log(entities)
|
||||
console.log(wds.simplify.entity(entities.entities["Q42"], {
|
||||
timeConverter: 'simple-day'
|
||||
}))
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue