Command line app for exploring the Wikibase API.
Most of my repos are private but this one is in front of my loyal followers (you know who you are 😎).
Be a repo that
-
keeps me young and enthused
-
uses modules (ESM)
-
can be used to reproduce any dependency issues
-
takes baby-steps with LLM and co-pilot (commit messages for now and just a bit of code generation which is documented)
-
serves as dogfood and a laboratory for my other projects
-
is a playground for GitHub Pages (
gh-pagesbranch) and Jekyll should I ever get to that.
- Duplicate functionality of official Wikibase tools
- Be a real tool that people will actually use
- pnpm dlx prettier . -w
- pnpm exec eslint
- pnpm run build
- pnpm run lint
- pnpm run test
- tsx src/main.ts
maxlath/wikibase-sdk: JS utils functions to query a Wikibase instance and simplify its results
wikidata.org/w/api.php?action=wbgetentities&ids=Q33725&format=json&languages=en&props=info%7Clabels
Wikidata:List of properties/all in one table - Wikidata
All pages (Property namespace) - Wikidata
graph TD
subgraph ClaimStructure
Claim -- has one --> MainSnak
Claim -- can have many --> Qualifier
Claim -- can have many --> Reference
Claim[Claim]
MainSnak["Snak (Main)"]
Qualifier[Qualifier]
Reference[Reference]
end
subgraph SnakDetails
MainSnak -- has one --> Property
MainSnak -- has one --> DataValue
Property[Property]
end
subgraph ValueTypes
DataValue[DataValue]
DataValue -- is a --> String
DataValue -- is a --> WikipediaId
String[String]
WikipediaId[WikipediaId]
end
Albert Einstein was born at Ulm
graph TD
subgraph ClaimStructure
Claim["Claim"]
Claim -- has one --> MainSnak
Claim -- can have many --> Qualifier
Claim -- can have many --> Reference
end
subgraph SnakDetails
MainSnak["Snak (Main)"]
MainSnak -- has one --> Property
MainSnak -- has one --> DataValue
Property["Property"]
end
subgraph ValueTypes
DataValue["DataValue"]
DataValue -- is a --> EntityId
end
subgraph ExampleClaim
Claim -- refers to --> EinsteinEntity
Claim -- describes property --> BornAtProperty
MainSnak -- has value --> UlmEntity
EinsteinEntity["Albert Einstein (Q937)"]
BornAtProperty["P19: Born at"]
UlmEntity["Ulm (Q20440)"]
end
%%Styling
style Claim fill:#bbf,stroke:#555,stroke-width:2px
style MainSnak fill:#ffb,stroke:#555,stroke-width:2px
style Property fill:#bbf,stroke:#555,stroke-width:2px
style DataValue fill:#bbf,stroke:#555,stroke-width:2px
style Qualifier fill:#bbf,stroke:#555,stroke-width:2px
style Reference fill:#bbf,stroke:#555,stroke-width:2px
style String fill:#eee,stroke:#555,stroke-width:2px
style WikipediaId fill:#eee,stroke:#555,stroke-width:2px
style EntityId fill:#eee,stroke:#555,stroke-width:2px
style EinsteinEntity fill:#eee,stroke:#000,stroke-width:2px
style BornAtProperty fill:#eee,stroke:#000,stroke-width:2px
style UlmEntity fill:#eee,stroke:#000,stroke-width:2px