Page MenuHomePhabricator

Download WDQS results as a static HTML table
Closed, ResolvedPublic

Description

From the Wikidata Query UI

I would expect to have an option "HTML table" in the menu "Download" that lets me download the results of my query as an HTML file.

download.png (283×247 px, 10 KB)

Expected content

I would expect the downloaded content to include a static HTML table like:

<table>
    <tr>
        <th>?var1</th>
        <th>?var2</th>
    </tr>
    <tr>
        <td>...</td>
        <td>...</td>
    </tr>
    <tr>
        <td>...</td>
        <td>...</td>
    </tr>
</table>

... should contain hyperlinks, if applicable, with the same href values (stable URIs) that are retrieved by default with the Wikidata Query UI.

Event Timeline

We currently do not support HTML as standard output format and for REST API, it probably won't be supported since there is no standard for HTML representation of such results as far as I know.

However, it could be possible to make a download option as HTML since we generate that.

I was actually thinking on the download option (to easily get static lists of entities from Wikidata and properly link them from external sites), but I mentioned the REST API because I thought that both sets of formats should be equivalent. There is no problem for me in omitting that option.

@abian and @Smalyshev I added an option "HTML table" in the menu "Download" and enabled the download of output in HTML table format. Are there any other changes to be done?
Locally it looked in following format

htmltable.png (640×1 px, 67 KB)

Great! However, I would include this new option before the SVG one. From the user's point of view, although the SVG is code as well, it's seen as an image, and the other options, including the HTML one, as text. But I have no idea what order has been followed so far... :/

I don't think more features are needed. Thank you very much!

Change 423339 had a related patch set uploaded (by Rammanojpotla; owner: Rammanoj):
[wikidata/query/gui@master] Add an option to download WDQS results in HTML table format

https://gerrit.wikimedia.org/r/423339

@abian or @Smalyshev can anyone review the patch for this issue at gerrit and post your comments there?

I can't review the patch, I'm not familiar with the implementation of the WDQS, but I'm sure that some developer will get with it soon. Thanks again for your help, @Rammanojpotla!

Change 423339 merged by jenkins-bot:
[wikidata/query/gui@master] Add an option to download WDQS results in HTML table format

https://gerrit.wikimedia.org/r/423339