[[TranslatedPages]] = Plugin » Wikipedia = [[Image(/pluginicon/wikipedia.jar/images/dialogs/wikipedia.png,middle)]] A plugin to support tagging objects with `wikipedia=*` and `wikidata=*` (for the [osmwiki:WIWOSM WIWOSM] project, among others). [[Image(wikipedia.png)]] == Features == * Located in **[wikitr:/Help/ToggleDialogs toggle dialog]** on the right (enable that via menu **Windows** » **Wikipedia**) * Obtain Wikipedia/Wikidata entries … * **[[Image(/pluginicon/wikipedia.jar/images/dialogs/wikipedia.png,18,middle)]] Coordinates**: nearby (wrt. current view, using geolocated articles) * **[[Image(wikidata.svg,18,middle)]] Wikidata**: nearby Wikidata items (wrt. current view) * **[[Image(source:/trunk/images/data/sequence.svg,18,middle)]] Category**: by category * **[[Image(source:/trunk/images/paste.svg,18,middle)]] Clipboard**: from clipboard (newline separated) * **Double click** on item to search for object with article name (and center coordinate) * **[[Image(source:/trunk/images/pastetags.png,18,middle)]] Add Tag**: adds a ''wikipedia'' tag corresponding to the selected article to the selected OSM objects * **Right click** on item * **[[Image(https://raw.githubusercontent.com/JOSM/wikipedia/master/src/main/resources/images/browser.png,18,middle)]] Open Article**: opens selected entry in browser * **[[Image(source:/trunk/images/dialogs/autoscale/selection.png,18,middle)]] Zoom to selection** * **[[Image(source:/trunk/images/dialogs/settings.png,18,middle)]] Language**: sets Wikipedia language (see [#Configuration Configuration] below) * Located in **[wikitr:/Help/Menu/Edit edit menu]** * **[[Image(/pluginicon/wikipedia.jar/images/dialogs/wikipedia.png,18,middle)]] Copy ... template**: copies the corresponding template to the system clipboard instantiated with the coordinates of the first selected node (see [#Configuration Configuration] below how to add custom template) * Located in **[wikitr:/Help/Menu/Data data menu]** * **[[Image(wikidata.svg,18,middle)]] Fetch Wikidata IDs**: for the selected objects, looks up the Wikidata IDs based on the Wikipedia tag * **[[Image(wikidata.svg,18,middle)]] Search Wikidata items**: shows a dialog for querying Wikidata items (in the language set in [#Configuration Configuration]) * Located in **[wikitr:/Help/Action/Download Download window]** * **[[Image(https://raw.githubusercontent.com/JOSM/wikipedia/master/src/main/resources/images/dialogs/sophox.png,24,middle)]] Download from Sophox API** tab * Demystifies Wikidata IDs in the [wikitr:/Help/Dialog/TagsMembership tags dialog] == Guide: tag all articles of a Wikipedia category == 0. Get familiar with [osmwiki:WIWOSM WIWOSM] 1. Install the wikipedia plugin (see [wikitr:/Help/Preferences/Plugins Plugins] for details) 3. Display Wikipedia dialog (menu Windows » Wikipedia) 4. Set/check Wikipedia language: in Wikipedia dialog click [[Image(source:/trunk/images/dialogs/settings.png,18,middle)]] 5. Click ''[[Image(source:/trunk/images/data/sequence.svg,18,middle)]] Category'', enter a Wikipedia category to download the name of its articles 6. Use [wikitr:/Help/Action/Download#DownloadfromOverpassAPI Download from Overpass API] to download interesting OSM data 7. Inspect the list elements of the Wikipedia dialog * [[Image(source:/trunk/images_nodist/misc/gray_check.svg,16,middle)]] indicates that the [https://tools.wmflabs.org/admin/tool/wiwosm WIWOSM server] already delivers some object/s (still, you might tag further objects) * [[Image(source:/trunk/images/misc/green_check.svg,16,middle)]] indicates that the current dataset (but not the WIWOSM server) links some object/s to this article * [[Image(blankmenu.png,16,middle)]] indicates that no link to this article exists on the WIWOSM server nor in the current dataset. 8. A double click on a list item in the Wikipedia dialog performs a JOSM search using the displayed article name (excluding parts in parentheses) 9. Clicking on ''[[Image(source:/trunk/images/pastetags.png,18,middle)]] Add Tag'' adds a corresponding `wikipedia=[lang]:[article]` tag to the selected objects == Configuration == #Configuration * Wikipedia **language**: in toggle dialog on the right click [[Image(source:/trunk/images/dialogs/settings.png,18,middle)]] * **Copy templates** (for edit menu) * [wikitr:/Help/Preferences/Advanced Advanced preferences] (only in [wikitr:/Help/ExpertMode expert mode]) * Navigate to `wikipedia.copytemplates` entry, double click * Add entry using [[Image(source:/trunk/images/dialogs/add.png,18,middle)]] * Insert keys `name` (name used in menu), `id` (unique identifier for toolbar), `pattern` (string with `{lat}` and `{lon}` as placeholders) accordingly. Example:[[BR]][[Image(wikipedia.copytemplates.png)]] * Click **OK** twice to close preference menu * Restart JOSM ---- Back to [wikitr:/Plugins Plugin Help][[BR]] Back to [wikitr:/Help Main Help]