Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wb search: --properties results get ignored when --json is specified #180

Open
tmtmtmtm opened this issue Oct 12, 2023 · 0 comments
Open

Comments

@tmtmtmtm
Copy link
Contributor

wb search can include other properties in the results: e.g. P31:

wd search --properties P31 Edgar Savisaar

id Q355241
Label Edgar Savisaar
Description Estonian politician
instance of (P31): human (Q5)
Wikipedia intro Edgar Savisaar (31 May 1950 – 29 December 2022) was an Estonian politician, one of the founding members of Popular Front of Estonia and the Centre Party. He served as the acting Prime Minister of Estonia, Minister of the Interior, Minister of Economic Affairs and Communications, and twice mayor of Tallinn. https://en.wikipedia.org/wiki/Edgar_Savisaar

id Q1720283
Label Edgar Savisaar's Cabinet
instance of (P31): Government of Estonia (Q2421589)

but when --json is specified those properties don't get included in the result:

wd search --properties P31 --json Edgar Savisaar

[
  {
    "id": "Q355241",
    "title": "Q355241",
    "pageid": 339003,
    "display": {
      "label": {
        "value": "Edgar Savisaar",
        "language": "en"
      },
      "description": {
        "value": "Estonian politician",
        "language": "en"
      }
    },
    "repository": "wikidata",
    "url": "//www.wikidata.org/wiki/Q355241",
    "concepturi": "http://www.wikidata.org/entity/Q355241",
    "label": "Edgar Savisaar",
    "description": "Estonian politician",
    "match": {
      "type": "label",
      "language": "en",
      "text": "Edgar Savisaar"
    }
  },
  {
    "id": "Q1720283",
    "title": "Q1720283",
    "pageid": 1653406,
    "display": {
      "label": {
        "value": "Edgar Savisaar's Cabinet",
        "language": "en"
      }
    },
    "repository": "wikidata",
    "url": "//www.wikidata.org/wiki/Q1720283",
    "concepturi": "http://www.wikidata.org/entity/Q1720283",
    "label": "Edgar Savisaar's Cabinet",
    "match": {
      "type": "label",
      "language": "en",
      "text": "Edgar Savisaar's Cabinet"
    }
  }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant