User:Asj/Doing stuff with mediawiki api: Revision history

Jump to navigation Jump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

4 April 2025

  • curprev 19:3819:38, 4 April 2025Asj talk contribs 611 bytes +611 Created page with "notes mainly for myself == getting template property == using jq and xq <pre> curl -s "https://wiki.nottinghack.org.uk/api.php?action=parse&page=Rosey&contentmodel=json&prop=parsetree&format=json" | jq -r '.parse.parsetree."*"' | xq -x "//template/title[contains(text(), 'Tool')]/parent::template/part/name[contains(text(), 'image')]/parent::part/value" </pre> == getting an image url for image page == <pre> curl -s "https://wiki.nottinghack.org.uk/api.php?action=query..."