Merge branch 'copyright'
authorTom Hughes <tom@compton.nu>
Thu, 22 Apr 2010 10:13:14 +0000 (11:13 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 22 Apr 2010 10:13:14 +0000 (11:13 +0100)
app/helpers/browse_helper.rb
app/views/browse/_tag.html.erb
app/views/site/edit.html.erb
app/views/user/no_such_user.html.erb
config/initializers/wiki_pages.rb [new file with mode: 0644]
config/locales/en.yml
config/wiki_pages.yml [new file with mode: 0644]
db/.gitignore [new file with mode: 0644]
db/functions/.gitignore [new file with mode: 0644]
public/robots.txt
script/misc/update-wiki-pages [new file with mode: 0644]

index aed0c518f4ce46255f0597d47b1f8772abfd7472..d2c2b5807c97f6ee6494fec99dbfdc4240bd4f53 100644 (file)
@@ -15,4 +15,65 @@ module BrowseHelper
     end
     return name
   end
+
+  def format_key(key)
+    if url = wiki_link("key", key)
+      link_to h(key), url, :title => t('browse.tag_details.wiki_link.key', :key => key)
+    else
+      h(key)
+    end
+  end
+
+  def format_value(key, value)
+    if wp = wikipedia_link(key, value)
+      link_to h(wp[:title]), wp[:url], :title => t('browse.tag_details.wikipedia_link', :page => wp[:title])
+    elsif url = wiki_link("tag", "#{key}=#{value}")
+      link_to h(value), url, :title => t('browse.tag_details.wiki_link.tag', :key => key, :value => value)
+    else
+      linkify h(value)
+    end
+  end
+
+private
+
+  def wiki_link(type, lookup)
+    locale = I18n.locale.to_s
+
+    if page = WIKI_PAGES[locale][type][lookup] rescue nil
+      url = "http://wiki.openstreetmap.org/wiki/#{page}?uselang=#{locale}"
+    elsif page = WIKI_PAGES["en"][type][lookup] rescue nil
+      url = "http://wiki.openstreetmap.org/wiki/#{page}?uselang=#{locale}"
+    end
+
+    return url
+  end
+
+  def wikipedia_link(key, value)
+    if key == "wikipedia"
+      # This regex should match Wikipedia language codes, everything
+      # from de to zh-classical
+      if value =~ /^([a-z-]{2,12}):(.+)$/
+        # Value is <lang>:<title> so split it up
+        lang  = $1
+        value = $2
+      else
+        # Value is <title> so default to English Wikipedia
+        lang = 'en'
+      end
+    elsif key =~ /^wikipedia:(\S+)$/
+      # Language is in the key, so assume value is a simple title
+      lang = $1
+    else
+      # Not a wikipedia key!
+      return nil
+    end
+
+    # Some k/v's are wikipedia=http://en.wikipedia.org/wiki/Full%20URL
+    return nil if value =~ /^http:\/\//
+
+    return {
+      :url => "http://#{lang}.wikipedia.org/wiki/#{value}?uselang=#{I18n.locale}",
+      :title => value
+    }
+  end
 end
index ab5707f9e0d82b572c408121a6b993f02e245be9..2eadad4f2db4a99bbb90cbb57f2134aa20bfb06f 100644 (file)
@@ -1,3 +1,3 @@
 <tr>
-  <td><%= h(tag[0]) %> = <%= linkify(h(tag[1])) %></td>
+  <td><%= format_key(tag[0]) %> = <%= format_value(tag[0], tag[1]) %></td>
 </tr> 
index 3565b046816d41658434471f34efdedfd113d7e9..779abd352b659324992a20c4efd53fc924180066 100644 (file)
@@ -20,7 +20,7 @@
 <%= render :partial => 'search' %>
 
 <%
-session[:token] = @user.tokens.create.token unless session[:token]
+session[:token] = @user.tokens.create.token unless session[:token] and UserToken.find_by_token(session[:token])
 
 # Decide on a lat lon to initialise potlatch with. Various ways of doing this
 if params['lon'] and params['lat']
index 585d29d8cde56bcec4d42a7615190c270462130c..8507f5abb2b70d475089400ad99efd3fafb5a1cd 100644 (file)
@@ -1,2 +1,2 @@
-<h2><%= t 'user.no_such_user.heading', :user => @not_found_user %></h2>
-<p><%= t 'user.no_such_user.body', :user => @not_found_user %></p>
+<h2><%= t 'user.no_such_user.heading', :user => h(@not_found_user) %></h2>
+<p><%= t 'user.no_such_user.body', :user => h(@not_found_user) %></p>
diff --git a/config/initializers/wiki_pages.rb b/config/initializers/wiki_pages.rb
new file mode 100644 (file)
index 0000000..dbaa4dd
--- /dev/null
@@ -0,0 +1 @@
+WIKI_PAGES = YAML.load_file("#{RAILS_ROOT}/config/wiki_pages.yml")
index 7e10cdf61cbd172e7201e6a6df437c4d0efb33be..fb2f6c48b987189b2c2777d7205aad6b617eaeb2 100644 (file)
@@ -233,6 +233,10 @@ en:
             # There is no 'relation' type because it is not represented in OpenLayers
     tag_details:
       tags: "Tags:"
+      wiki_link:
+        key: "The wiki description page for the {{key}} tag"
+        tag: "The wiki description page for the {{key}}={{value}} tag"
+      wikipedia_link: "The {{page}} article on Wikipedia"
     way_details:
       nodes: "Nodes:"
       part_of: "Part of:"
diff --git a/config/wiki_pages.yml b/config/wiki_pages.yml
new file mode 100644 (file)
index 0000000..92856e0
--- /dev/null
@@ -0,0 +1,1433 @@
+# THIS FILE IS AUTOGENERATED WITH THE script/misc/update-wiki-pages
+# PROGRAM DO NOT MANUALLY EDIT IT
+
+---
+cz:
+  key:
+    historic: Cz:Key:historic
+    railway: Cz:Key:railway
+  tag:
+    route=trolleybus: Cz:Tag:route=trolleybus
+da:
+  tag:
+    highway=tertiary: Da:Tag:highway=tertiary
+    highway=track: Da:Tag:highway=track
+    route=ferry: Da:Tag:route=ferry
+de:
+  key:
+    abutters: DE:Key:abutters
+    access: DE:Key:access
+    addr: DE:Key:addr
+    aerialway: DE:Key:aerialway
+    aeroway: DE:Key:aeroway
+    amenity: DE:Key:amenity
+    barrier: DE:Key:barrier
+    basin: DE:Key:basin
+    bridge: DE:Key:bridge
+    building: DE:Key:building
+    comment: DE:Key:comment
+    crossing: DE:Key:crossing
+    cycleway: DE:Key:cycleway
+    denomination: DE:Key:denomination
+    description: DE:Key:description
+    disused: DE:Key:disused
+    drink: DE:Key:drink
+    embankment: DE:Key:embankment
+    fixme: DE:Key:fixme
+    geological: DE:Key:geological
+    hazmat: DE:Key:hazmat
+    highway: DE:Key:highway
+    historic: DE:Key:historic
+    incline: DE:Key:incline
+    landuse: DE:Key:landuse
+    lanes: DE:Key:lanes
+    layer: DE:Key:layer
+    leisure: DE:Key:leisure
+    lit: DE:Key:lit
+    man_made: DE:Key:man made
+    maxheight: DE:Key:maxheight
+    maxspeed: DE:Key:maxspeed
+    military: DE:Key:military
+    mtb:scale: DE:Key:mtb:scale
+    name: DE:Key:name
+    natural: DE:Key:natural
+    noexit: DE:Key:noexit
+    note: DE:Key:note
+    oneway: DE:Key:oneway
+    opening_hours: DE:Key:opening hours
+    operator: DE:Key:operator
+    osmc:symbol: DE:Key:osmc:symbol
+    place: DE:Key:place
+    power: DE:Key:power
+    power_rating: DE:Key:power rating
+    railway: DE:Key:railway
+    route: DE:Key:route
+    sac_scale: DE:Key:sac scale
+    service: DE:Key:service
+    shop: DE:Key:shop
+    smoothness: DE:Key:smoothness
+    sport: DE:Key:sport
+    step_count: DE:Key:step count
+    surface: DE:Key:surface
+    tourism: DE:Key:tourism
+    tracktype: DE:Key:tracktype
+    trail_visibility: DE:Key:trail visibility
+    tunnel: DE:Key:tunnel
+    voltage: DE:Key:voltage
+    waterway: DE:Key:waterway
+    wheelchair: DE:Key:wheelchair
+    wires: DE:Key:wires
+    wood: DE:Key:wood
+  tag:
+    amenity=atm: DE:Tag:amenity=atm
+    amenity=baby_hatch: DE:Tag:amenity=baby hatch
+    amenity=bank: DE:Tag:amenity=bank
+    amenity=bench: DE:Tag:amenity=bench
+    amenity=bus_station: DE:Tag:amenity=bus station
+    amenity=clock: DE:Tag:amenity=clock
+    amenity=compressed_air: DE:Tag:amenity=compressed air
+    amenity=drinking_water: DE:Tag:amenity=drinking water
+    amenity=fuel: DE:Tag:amenity=fuel
+    amenity=grit_bin: DE:Tag:amenity=grit bin
+    amenity=hospital: DE:Tag:amenity=hospital
+    amenity=nightclub: DE:Tag:amenity=nightclub
+    amenity=parking: DE:Tag:amenity=parking
+    amenity=pharmacy: DE:Tag:amenity=pharmacy
+    amenity=place_of_worship: DE:Tag:amenity=place of worship
+    amenity=post_box: DE:Tag:amenity=post box
+    amenity=pub: DE:Tag:amenity=pub
+    amenity=recycling: DE:Tag:amenity=recycling
+    amenity=register_office: DE:Tag:amenity=register office
+    amenity=school: DE:Tag:amenity=school
+    amenity=toilets: DE:Tag:amenity=toilets
+    amenity=vending_machine: DE:Tag:amenity=vending machine
+    amenity=waste_basket: DE:Tag:amenity=waste basket
+    barrier=cycle_barrier: DE:Tag:barrier=cycle barrier
+    boundary=water_protection_area: DE:Tag:boundary=water protection area
+    club-mate=yes: DE:Tag:club-mate=yes
+    highway=bus_stop: DE:Tag:highway=bus stop
+    highway=crossing: DE:Tag:highway=crossing
+    highway=cycleway: DE:Tag:highway=cycleway
+    highway=emergency_access_point: DE:Tag:highway=emergency access point
+    highway=footway: DE:Tag:highway=footway
+    highway=living_street: DE:Tag:highway=living street
+    highway=mini_roundabout: DE:Tag:highway=mini roundabout
+    highway=motorway: DE:Tag:highway=motorway
+    highway=motorway_link: DE:Tag:highway=motorway link
+    highway=path: DE:Tag:highway=path
+    highway=pedestrian: DE:Tag:highway=pedestrian
+    highway=primary: DE:Tag:highway=primary
+    highway=residential: DE:Tag:highway=residential
+    highway=road: DE:Tag:highway=road
+    highway=secondary: DE:Tag:highway=secondary
+    highway=service: DE:Tag:highway=service
+    highway=services: DE:Tag:highway=services
+    highway=steps: DE:Tag:highway=steps
+    highway=tertiary: DE:Tag:highway=tertiary
+    highway=track: DE:Tag:highway=track
+    highway=traffic_signals: DE:Tag:highway=traffic signals
+    highway=trunk: DE:Tag:highway=trunk
+    highway=trunk_link: DE:Tag:highway=trunk link
+    highway=turning_circle: DE:Tag:highway=turning circle
+    highway=unclassified: DE:Tag:highway=unclassified
+    historic=archaeological_site: DE:Tag:historic=archaeological site
+    historic=castle: DE:Tag:historic=castle
+    historic=manor: DE:Tag:historic=manor
+    historic=monastery: DE:Tag:historic=monastery
+    junction=roundabout: DE:Tag:junction=roundabout
+    landuse=allotments: DE:Tag:landuse=allotments
+    landuse=farm: DE:Tag:landuse=farm
+    landuse=farmyard: DE:Tag:landuse=farmyard
+    landuse=forest: DE:Tag:landuse=forest
+    leisure=dog_park: DE:Tag:leisure=dog park
+    leisure=playground: DE:Tag:leisure=playground
+    leisure=slipway: DE:Tag:leisure=slipway
+    man_made=crane: DE:Tag:man made=crane
+    man_made=mineshaft: DE:Tag:man made=mineshaft
+    man_made=pier: DE:Tag:man made=pier
+    man_made=pipeline: DE:Tag:man made=pipeline
+    man_made=survey_point: DE:Tag:man made=survey point
+    man_made=wastewater_plant: DE:Tag:man made=wastewater plant
+    military=bunker: DE:Tag:military=bunker
+    natural=stone: DE:Tag:natural=stone
+    natural=tree: DE:Tag:natural=tree
+    natural=water: DE:Tag:natural=water
+    natural=wetland: DE:Tag:natural=wetland
+    natural=wood: DE:Tag:natural=wood
+    power=cable: DE:Tag:power=cable
+    power=cable_distribution_cabinet: DE:Tag:power=cable distribution cabinet
+    power=generator: DE:Tag:power=generator
+    power=line: DE:Tag:power=line
+    power=minor_line: DE:Tag:power=minor line
+    power=pole: DE:Tag:power=pole
+    power=sub_station: DE:Tag:power=sub station
+    power=tower: DE:Tag:power=tower
+    railway=crossing: DE:Tag:railway=crossing
+    railway=halt: DE:Tag:railway=halt
+    railway=platform: DE:Tag:railway=platform
+    railway=station: DE:Tag:railway=station
+    railway=tram: DE:Tag:railway=tram
+    railway=tram_stop: DE:Tag:railway=tram stop
+    railway=turntable: DE:Tag:railway=turntable
+    route=ferry: DE:Tag:route=ferry
+    service=parking_aisle: DE:Tag:service=parking aisle
+    shop=bakery: DE:Tag:shop=bakery
+    shop=general: DE:Tag:shop=general
+    tourism=camp_site: DE:Tag:tourism=camp site
+    tourism=caravan_site: DE:Tag:tourism=caravan site
+    tourism=picnic_site: DE:Tag:tourism=picnic site
+    vending=bicycle_tube: DE:Tag:vending=bicycle tube
+    waterway=dock: DE:Tag:waterway=dock
+    waterway=lock_gate: DE:Tag:waterway=lock gate
+    waterway=river: DE:Tag:waterway=river
+    waterway=riverbank: DE:Tag:waterway=riverbank
+    waterway=stream: DE:Tag:waterway=stream
+en:
+  key:
+    Demolished: Key:Demolished
+    TMC:Direction: Key:TMC:Direction
+    TMC:LocationCode: Key:TMC:LocationCode
+    TMC:NextLocationCode: Key:TMC:NextLocationCode
+    TMC:PrevLocationCode: Key:TMC:PrevLocationCode
+    abutters: Key:abutters
+    access: Key:access
+    addr: Key:addr
+    addr:conscriptionnumber: Key:addr:conscriptionnumber
+    addr:provisionalnumber: Key:addr:provisionalnumber
+    addr:streetnumber: Key:addr:streetnumber
+    aerialway: Key:aerialway
+    aeroway: Key:aeroway
+    amenity: Key:amenity
+    area: Key:area
+    atv: Key:atv
+    barrier: Key:barrier
+    basin: Key:basin
+    bicycle: Key:bicycle
+    boat: Key:boat
+    border_type: Key:border type
+    boundary: Key:boundary
+    bridge: Key:bridge
+    building: Key:building
+    bunker_type: Key:bunker type
+    capacity: Key:capacity
+    cep: Key:cep
+    collection_times: Key:collection times
+    comment: Key:comment
+    construction: Key:construction
+    contact: Key:contact
+    covered: Key:covered
+    created_by: Key:created by
+    crossing: Key:crossing
+    cuisine: Key:cuisine
+    cutting: Key:cutting
+    cycleway: Key:cycleway
+    denomination: Key:denomination
+    description: Key:description
+    designation: Key:designation
+    direction: Key:direction
+    dispensing: Key:dispensing
+    disused: Key:disused
+    drink: Key:drink
+    easy_overtaking: Key:easy overtaking
+    ele: Key:ele
+    electrified: Key:electrified
+    embankment: Key:embankment
+    emergency: Key:emergency
+    end_date: Key:end date
+    enforcement: Key:enforcement
+    fee: Key:fee
+    fence_type: Key:fence type
+    fenced: Key:fenced
+    fixme: Key:fixme
+    foot: Key:foot
+    gauge: Key:gauge
+    geological: Key:geological
+    hazmat: Key:hazmat
+    healthcare: Key:healthcare
+    height: Key:height
+    highway: Key:highway
+    historic: Key:historic
+    horse: Key:horse
+    incline: Key:incline
+    information: Key:information
+    internet_access: Key:internet access
+    is_in: Key:is in
+    junction: Key:junction
+    landuse: Key:landuse
+    lanes: Key:lanes
+    layer: Key:layer
+    lcn_ref: Key:lcn ref
+    leisure: Key:leisure
+    lit: Key:lit
+    lit:perceived: Key:lit:perceived
+    lock: Key:lock
+    man_made: Key:man made
+    manhole: Key:manhole
+    maxairdraft: Key:maxairdraft
+    maxaxleload: Key:maxaxleload
+    maxdraught: Key:maxdraught
+    maxheight: Key:maxheight
+    maxheight:legal: Key:maxheight:legal
+    maxheight:marine: Key:maxheight:marine
+    maxheight:physical: Key:maxheight:physical
+    maxlength: Key:maxlength
+    maxspeed: Key:maxspeed
+    maxstay: Key:maxstay
+    maxweight: Key:maxweight
+    maxwidth: Key:maxwidth
+    military: Key:military
+    minspeed: Key:minspeed
+    mooring: Key:mooring
+    motorcar: Key:motorcar
+    motorcycle: Key:motorcycle
+    motorroad: Key:motorroad
+    mountain_pass: Key:mountain pass
+    mtb:description: Key:mtb:description
+    mtb:scale: Key:mtb:scale
+    name: Key:name
+    name:cy: Key:name:cy
+    narrow: Key:narrow
+    natural: Key:natural
+    ncn_ref: Key:ncn ref
+    noexit: Key:noexit
+    noname: Key:noname
+    note: Key:note
+    oneway: Key:oneway
+    opening_hours: Key:opening hours
+    operator: Key:operator
+    osmarender:nameDirection: Key:osmarender:nameDirection
+    osmarender:render: Key:osmarender:render
+    osmarender:renderName: Key:osmarender:renderName
+    osmarender:renderRef: Key:osmarender:renderRef
+    osmc:symbol: Key:osmc:symbol
+    overtaking: Key:overtaking
+    parking: Key:parking
+    passing_places: Key:passing places
+    paved:date: Key:paved:date
+    phone: Key:phone
+    place: Key:place
+    population: Key:population
+    postal_code: Key:postal code
+    power: Key:power
+    power_rating: Key:power rating
+    power_source: Key:power source
+    proposed: Key:proposed
+    psv: Key:psv
+    railway: Key:railway
+    ramp: Key:ramp
+    rcn_ref: Key:rcn ref
+    ref: Key:ref
+    ref:isil: Key:ref:isil
+    religion: Key:religion
+    resource: Key:resource
+    route: Key:route
+    sac_scale: Key:sac scale
+    sagns_id: Key:sagns id
+    seamark: Key:seamark
+    seasonal:snowfall:regaintime: Key:seasonal:snowfall:regaintime
+    service: Key:service
+    shop: Key:shop
+    ski: Key:ski
+    smoothness: Key:smoothness
+    snowplowing: Key:snowplowing
+    snowplowing:category: Key:snowplowing:category
+    source: Key:source
+    sport: Key:sport
+    start_date: Key:start date
+    step_count: Key:step count
+    stop: Key:stop
+    sulky: Key:sulky
+    surface: Key:surface
+    tactile_paving: Key:tactile paving
+    toll: Key:toll
+    tourism: Key:tourism
+    tracktype: Key:tracktype
+    traffic:hourly: Key:traffic:hourly
+    traffic_calming: Key:traffic calming
+    traffic_sign: Key:traffic sign
+    trail_visibility: Key:trail visibility
+    trolley_wire: Key:trolley wire
+    tunnel: Key:tunnel
+    type: Key:type
+    voltage: Key:voltage
+    waterway: Key:waterway
+    website: Key:website
+    wheelchair: Key:wheelchair
+    width: Key:width
+    wikipedia: Key:wikipedia
+    wires: Key:wires
+    woeid: Key:woeid
+    wood: Key:wood
+    zoo: Key:zoo
+  tag:
+    4wd_only=yes: Tag:4wd only=yes
+    abandoned=yes: Tag:abandoned=yes
+    access=designated: Tag:access=designated
+    access=official: Tag:access=official
+    aerialway=cable_car: Tag:aerialway=cable car
+    aerialway=chair_lift: Tag:aerialway=chair lift
+    aerialway=drag_lift: Tag:aerialway=drag lift
+    aerialway=gondola: Tag:aerialway=gondola
+    aerialway=mixed_lift: Tag:aerialway=mixed lift
+    aerialway=pylon: Tag:aerialway=pylon
+    aerialway=station: Tag:aerialway=station
+    aeroway=aerodrome: Tag:aeroway=aerodrome
+    aeroway=apron: Tag:aeroway=apron
+    aeroway=control_tower: Tag:aeroway=control tower
+    aeroway=gate: Tag:aeroway=gate
+    aeroway=helipad: Tag:aeroway=helipad
+    aeroway=navigationaid: Tag:aeroway=navigationaid
+    aeroway=runway: Tag:aeroway=runway
+    aeroway=taxiway: Tag:aeroway=taxiway
+    aeroway=terminal: Tag:aeroway=terminal
+    aeroway=windsock: Tag:aeroway=windsock
+    amenity=arts_centre: Tag:amenity=arts centre
+    amenity=atm: Tag:amenity=atm
+    amenity=audiologist: Tag:amenity=audiologist
+    amenity=baby_hatch: Tag:amenity=baby hatch
+    amenity=bank: Tag:amenity=bank
+    amenity=bar: Tag:amenity=bar
+    amenity=bench: Tag:amenity=bench
+    amenity=bicycle_parking: Tag:amenity=bicycle parking
+    amenity=bicycle_rental: Tag:amenity=bicycle rental
+    amenity=biergarten: Tag:amenity=biergarten
+    amenity=brothel: Tag:amenity=brothel
+    amenity=bureau_de_change: Tag:amenity=bureau de change
+    amenity=bus_station: Tag:amenity=bus station
+    amenity=cafe: Tag:amenity=cafe
+    amenity=car_rental: Tag:amenity=car rental
+    amenity=car_sharing: Tag:amenity=car sharing
+    amenity=cinema: Tag:amenity=cinema
+    amenity=clock: Tag:amenity=clock
+    amenity=coast_guard: Tag:amenity=coast guard
+    amenity=college: Tag:amenity=college
+    amenity=community_centre: Tag:amenity=community centre
+    amenity=compressed_air: Tag:amenity=compressed air
+    amenity=courthouse: Tag:amenity=courthouse
+    amenity=crematorium: Tag:amenity=crematorium
+    amenity=drinking_water: Tag:amenity=drinking water
+    amenity=embassy: Tag:amenity=embassy
+    amenity=emergency_phone: Tag:amenity=emergency phone
+    amenity=fast_food: Tag:amenity=fast food
+    amenity=ferry_terminal: Tag:amenity=ferry terminal
+    amenity=fire_hydrant: Tag:amenity=fire hydrant
+    amenity=fire_station: Tag:amenity=fire station
+    amenity=fountain: Tag:amenity=fountain
+    amenity=fuel: Tag:amenity=fuel
+    amenity=grave_yard: Tag:amenity=grave yard
+    amenity=grit_bin: Tag:amenity=grit bin
+    amenity=hospital: Tag:amenity=hospital
+    amenity=hunting_stand: Tag:amenity=hunting stand
+    amenity=kindergarten: Tag:amenity=kindergarten
+    amenity=library: Tag:amenity=library
+    amenity=life_ring: Tag:amenity=life ring
+    amenity=marketplace: Tag:amenity=marketplace
+    amenity=milk_dispenser: Tag:amenity=milk dispenser
+    amenity=nightclub: Tag:amenity=nightclub
+    amenity=nursing_home: Tag:amenity=nursing home
+    amenity=parking: Tag:amenity=parking
+    amenity=pharmacy: Tag:amenity=pharmacy
+    amenity=place_of_worship: Tag:amenity=place of worship
+    amenity=police: Tag:amenity=police
+    amenity=post_box: Tag:amenity=post box
+    amenity=post_office: Tag:amenity=post office
+    amenity=prison: Tag:amenity=prison
+    amenity=pub: Tag:amenity=pub
+    amenity=public_building: Tag:amenity=public building
+    amenity=recycling: Tag:amenity=recycling
+    amenity=register_office: Tag:amenity=register office
+    amenity=restaurant: Tag:amenity=restaurant
+    amenity=sauna: Tag:amenity=sauna
+    amenity=school: Tag:amenity=school
+    amenity=stripclub: Tag:amenity=stripclub
+    amenity=studio: Tag:amenity=studio
+    amenity=taxi: Tag:amenity=taxi
+    amenity=telephone: Tag:amenity=telephone
+    amenity=theatre: Tag:amenity=theatre
+    amenity=toilets: Tag:amenity=toilets
+    amenity=townhall: Tag:amenity=townhall
+    amenity=university: Tag:amenity=university
+    amenity=vending_machine: Tag:amenity=vending machine
+    amenity=veterinary: Tag:amenity=veterinary
+    amenity=waste_basket: Tag:amenity=waste basket
+    amenity=waste_disposal: Tag:amenity=waste disposal
+    amenity=watering_place: Tag:amenity=watering place
+    atm=no: Tag:atm=no
+    atm=yes: Tag:atm=yes
+    barrier=block: Tag:barrier=block
+    barrier=bollard: Tag:barrier=bollard
+    barrier=cattle_grid: Tag:barrier=cattle grid
+    barrier=city_wall: Tag:barrier=city wall
+    barrier=cycle_barrier: Tag:barrier=cycle barrier
+    barrier=ditch: Tag:barrier=ditch
+    barrier=fence: Tag:barrier=fence
+    barrier=gate: Tag:barrier=gate
+    barrier=hedge: Tag:barrier=hedge
+    barrier=kissing_gate: Tag:barrier=kissing gate
+    barrier=lift_gate: Tag:barrier=lift gate
+    barrier=retaining_wall: Tag:barrier=retaining wall
+    barrier=sally_port: Tag:barrier=sally port
+    barrier=stile: Tag:barrier=stile
+    barrier=toll_booth: Tag:barrier=toll booth
+    barrier=wall: Tag:barrier=wall
+    boundary=administrative: Tag:boundary=administrative
+    boundary=civil: Tag:boundary=civil
+    boundary=maritime: Tag:boundary=maritime
+    boundary=national: Tag:boundary=national
+    boundary=national_park: Tag:boundary=national park
+    boundary=political: Tag:boundary=political
+    building=dormitory: Tag:building=dormitory
+    building=entrance: Tag:building=entrance
+    building=parliament: Tag:building=parliament
+    bunker_type=munitions: Tag:bunker type=munitions
+    bunker_type=pillbox: Tag:bunker type=pillbox
+    club-mate=yes: Tag:club-mate=yes
+    cycleway=bike_box: Tag:cycleway=bike box
+    denomination=mormon: Tag:denomination=mormon
+    geological=palaeontological_site: Tag:geological=palaeontological site
+    highway=bridleway: Tag:highway=bridleway
+    highway=bus_guideway: Tag:highway=bus guideway
+    highway=bus_stop: Tag:highway=bus stop
+    highway=byway: Tag:highway=byway
+    highway=crossing: Tag:highway=crossing
+    highway=cycleway: Tag:highway=cycleway
+    highway=emergency_access_point: Tag:highway=emergency access point
+    highway=footway: Tag:highway=footway
+    highway=ford: Tag:highway=ford
+    highway=living_street: Tag:highway=living street
+    highway=mini_roundabout: Tag:highway=mini roundabout
+    highway=motorway: Tag:highway=motorway
+    highway=motorway_junction: Tag:highway=motorway junction
+    highway=motorway_link: Tag:highway=motorway link
+    highway=passing_place: Tag:highway=passing place
+    highway=path: Tag:highway=path
+    highway=pedestrian: Tag:highway=pedestrian
+    highway=platform: Tag:highway=platform
+    highway=primary: Tag:highway=primary
+    highway=primary_link: Tag:highway=primary link
+    highway=proposed: Tag:highway=proposed
+    highway=raceway: Tag:highway=raceway
+    highway=residential: Tag:highway=residential
+    highway=road: Tag:highway=road
+    highway=secondary: Tag:highway=secondary
+    highway=secondary_link: Tag:highway=secondary link
+    highway=service: Tag:highway=service
+    highway=services: Tag:highway=services
+    highway=speed_camera: Tag:highway=speed camera
+    highway=steps: Tag:highway=steps
+    highway=stop: Tag:highway=stop
+    highway=street_lamp: Tag:highway=street lamp
+    highway=tertiary: Tag:highway=tertiary
+    highway=track: Tag:highway=track
+    highway=traffic_signals: Tag:highway=traffic signals
+    highway=trail: Tag:highway=trail
+    highway=trunk: Tag:highway=trunk
+    highway=trunk_link: Tag:highway=trunk link
+    highway=turning_circle: Tag:highway=turning circle
+    highway=unclassified: Tag:highway=unclassified
+    historic=archaeological_site: Tag:historic=archaeological site
+    historic=battlefield: Tag:historic=battlefield
+    historic=castle: Tag:historic=castle
+    historic=manor: Tag:historic=manor
+    historic=memorial: Tag:historic=memorial
+    historic=monastery: Tag:historic=monastery
+    historic=monument: Tag:historic=monument
+    historic=paleontological_site: Tag:historic=paleontological site
+    historic=ruins: Tag:historic=ruins
+    historic=wayside_cross: Tag:historic=wayside cross
+    historic=wayside_shrine: Tag:historic=wayside shrine
+    historic=wreck: Tag:historic=wreck
+    hunting=raised_hide: Tag:hunting=raised hide
+    information=guidepost: Tag:information=guidepost
+    junction=roundabout: Tag:junction=roundabout
+    landuse=allotments: Tag:landuse=allotments
+    landuse=basin: Tag:landuse=basin
+    landuse=brownfield: Tag:landuse=brownfield
+    landuse=cemetery: Tag:landuse=cemetery
+    landuse=commercial: Tag:landuse=commercial
+    landuse=construction: Tag:landuse=construction
+    landuse=farm: Tag:landuse=farm
+    landuse=farmyard: Tag:landuse=farmyard
+    landuse=forest: Tag:landuse=forest
+    landuse=garages: Tag:landuse=garages
+    landuse=grass: Tag:landuse=grass
+    landuse=greenfield: Tag:landuse=greenfield
+    landuse=greenhouse_horticulture: Tag:landuse=greenhouse horticulture
+    landuse=industrial: Tag:landuse=industrial
+    landuse=landfill: Tag:landuse=landfill
+    landuse=meadow: Tag:landuse=meadow
+    landuse=military: Tag:landuse=military
+    landuse=orchard: Tag:landuse=orchard
+    landuse=peat_cutting: Tag:landuse=peat cutting
+    landuse=quarry: Tag:landuse=quarry
+    landuse=railway: Tag:landuse=railway
+    landuse=recreation_ground: Tag:landuse=recreation ground
+    landuse=reservoir: Tag:landuse=reservoir
+    landuse=residential: Tag:landuse=residential
+    landuse=retail: Tag:landuse=retail
+    landuse=salt_pond: Tag:landuse=salt pond
+    landuse=village_green: Tag:landuse=village green
+    landuse=vineyard: Tag:landuse=vineyard
+    landuse=wood: Tag:landuse=wood
+    leisure=beach_resort: Tag:leisure=beach resort
+    leisure=common: Tag:leisure=common
+    leisure=dance: Tag:leisure=dance
+    leisure=dog_park: Tag:leisure=dog park
+    leisure=fishing: Tag:leisure=fishing
+    leisure=garden: Tag:leisure=garden
+    leisure=golf_course: Tag:leisure=golf course
+    leisure=hackerspace: Tag:leisure=hackerspace
+    leisure=ice_rink: Tag:leisure=ice rink
+    leisure=marina: Tag:leisure=marina
+    leisure=miniature_golf: Tag:leisure=miniature golf
+    leisure=nature_reserve: Tag:leisure=nature reserve
+    leisure=park: Tag:leisure=park
+    leisure=pitch: Tag:leisure=pitch
+    leisure=playground: Tag:leisure=playground
+    leisure=slipway: Tag:leisure=slipway
+    leisure=sports_centre: Tag:leisure=sports centre
+    leisure=track: Tag:leisure=track
+    leisure=water_park: Tag:leisure=water park
+    man_made=crane: Tag:man made=crane
+    man_made=cutline: Tag:man made=cutline
+    man_made=dyke: Tag:man made=dyke
+    man_made=ground_station: Tag:man made=ground station
+    man_made=jetty: Tag:man made=jetty
+    man_made=lighthouse: Tag:man made=lighthouse
+    man_made=mineshaft: Tag:man made=mineshaft
+    man_made=pier: Tag:man made=pier
+    man_made=pipeline: Tag:man made=pipeline
+    man_made=pumping_rig: Tag:man made=pumping rig
+    man_made=reservoir_covered: Tag:man made=reservoir covered
+    man_made=surveillance: Tag:man made=surveillance
+    man_made=survey_point: Tag:man made=survey point
+    man_made=wastewater_plant: Tag:man made=wastewater plant
+    man_made=water_tower: Tag:man made=water tower
+    man_made=water_works: Tag:man made=water works
+    man_made=watermill: Tag:man made=watermill
+    man_made=windmill: Tag:man made=windmill
+    man_made=works: Tag:man made=works
+    military=airfield: Tag:military=airfield
+    military=bunker: Tag:military=bunker
+    military=naval_base: Tag:military=naval base
+    natural=bay: Tag:natural=bay
+    natural=beach: Tag:natural=beach
+    natural=cave_entrance: Tag:natural=cave entrance
+    natural=cliff: Tag:natural=cliff
+    natural=coastline: Tag:natural=coastline
+    natural=fell: Tag:natural=fell
+    natural=glacier: Tag:natural=glacier
+    natural=heath: Tag:natural=heath
+    natural=lake: Tag:natural=lake
+    natural=land: Tag:natural=land
+    natural=meadow: Tag:natural=meadow
+    natural=peak: Tag:natural=peak
+    natural=spring: Tag:natural=spring
+    natural=stone: Tag:natural=stone
+    natural=tree: Tag:natural=tree
+    natural=volcano: Tag:natural=volcano
+    natural=water: Tag:natural=water
+    natural=wetland: Tag:natural=wetland
+    natural=wood: Tag:natural=wood
+    pipeline=marker: Tag:pipeline=marker
+    pipeline=valve: Tag:pipeline=valve
+    place=city: Tag:place=city
+    place=continent: Tag:place=continent
+    place=country: Tag:place=country
+    place=county: Tag:place=county
+    place=hamlet: Tag:place=hamlet
+    place=island: Tag:place=island
+    place=islet: Tag:place=islet
+    place=locality: Tag:place=locality
+    place=region: Tag:place=region
+    place=state: Tag:place=state
+    place=suburb: Tag:place=suburb
+    place=town: Tag:place=town
+    place=village: Tag:place=village
+    power=cable_distribution_cabinet: Tag:power=cable distribution cabinet
+    power=generator: Tag:power=generator
+    power=line: Tag:power=line
+    power=minor_line: Tag:power=minor line
+    power=pole: Tag:power=pole
+    power=station: Tag:power=station
+    power=sub_station: Tag:power=sub station
+    power=tower: Tag:power=tower
+    public_transport=pay_scale_area: Tag:public transport=pay scale area
+    railway=PRT: Tag:railway=PRT
+    railway=crossing: Tag:railway=crossing
+    railway=halt: Tag:railway=halt
+    railway=level_crossing: Tag:railway=level crossing
+    railway=monorail: Tag:railway=monorail
+    railway=platform: Tag:railway=platform
+    railway=rail: Tag:railway=rail
+    railway=station: Tag:railway=station
+    railway=stop: Tag:railway=stop
+    railway=subway: Tag:railway=subway
+    railway=subway_entrance: Tag:railway=subway entrance
+    railway=tram: Tag:railway=tram
+    railway=tram_stop: Tag:railway=tram stop
+    railway=turntable: Tag:railway=turntable
+    route=bus: Tag:route=bus
+    route=canal: Tag:route=canal
+    route=detour: Tag:route=detour
+    route=ferry: Tag:route=ferry
+    route=railway: Tag:route=railway
+    route=road: Tag:route=road
+    route=share_taxi: Tag:route=share taxi
+    route=ski: Tag:route=ski
+    route=train: Tag:route=train
+    route=tram: Tag:route=tram
+    route=trolleybus: Tag:route=trolleybus
+    service=alley: Tag:service=alley
+    service=drive-through: Tag:service=drive-through
+    service=driveway: Tag:service=driveway
+    service=emergency_access: Tag:service=emergency access
+    service=parking_aisle: Tag:service=parking aisle
+    service=siding: Tag:service=siding
+    service=spur: Tag:service=spur
+    service=yard: Tag:service=yard
+    shop=alcohol: Tag:shop=alcohol
+    shop=bakery: Tag:shop=bakery
+    shop=beverages: Tag:shop=beverages
+    shop=bicycle: Tag:shop=bicycle
+    shop=books: Tag:shop=books
+    shop=butcher: Tag:shop=butcher
+    shop=car: Tag:shop=car
+    shop=car_repair: Tag:shop=car repair
+    shop=cell_phones: Tag:shop=cell phones
+    shop=charity: Tag:shop=charity
+    shop=chemist: Tag:shop=chemist
+    shop=clothes: Tag:shop=clothes
+    shop=computer: Tag:shop=computer
+    shop=confectionery: Tag:shop=confectionery
+    shop=convenience: Tag:shop=convenience
+    shop=department_store: Tag:shop=department store
+    shop=doityourself: Tag:shop=doityourself
+    shop=dry_cleaning: Tag:shop=dry cleaning
+    shop=electronics: Tag:shop=electronics
+    shop=fabrics: Tag:shop=fabrics
+    shop=farm: Tag:shop=farm
+    shop=florist: Tag:shop=florist
+    shop=food: Tag:shop=food
+    shop=funeral_directors: Tag:shop=funeral directors
+    shop=furniture: Tag:shop=furniture
+    shop=garden_centre: Tag:shop=garden centre
+    shop=general: Tag:shop=general
+    shop=gift: Tag:shop=gift
+    shop=glaziery: Tag:shop=glaziery
+    shop=greengrocer: Tag:shop=greengrocer
+    shop=hairdresser: Tag:shop=hairdresser
+    shop=hearing_aids: Tag:shop=hearing aids
+    shop=hifi: Tag:shop=hifi
+    shop=jewelry: Tag:shop=jewelry
+    shop=kiosk: Tag:shop=kiosk
+    shop=laundry: Tag:shop=laundry
+    shop=locksmith: Tag:shop=locksmith
+    shop=mall: Tag:shop=mall
+    shop=massage: Tag:shop=massage
+    shop=motorcycle: Tag:shop=motorcycle
+    shop=newsagent: Tag:shop=newsagent
+    shop=optician: Tag:shop=optician
+    shop=organic: Tag:shop=organic
+    shop=outdoor: Tag:shop=outdoor
+    shop=second_hand: Tag:shop=second hand
+    shop=shoes: Tag:shop=shoes
+    shop=sports: Tag:shop=sports
+    shop=stationery: Tag:shop=stationery
+    shop=supermarket: Tag:shop=supermarket
+    shop=systembolaget: Tag:shop=systembolaget
+    shop=toys: Tag:shop=toys
+    shop=travel_agency: Tag:shop=travel agency
+    shop=video: Tag:shop=video
+    source:ele=barometric: Tag:source:ele=barometric
+    source=GURS: Tag:source=GURS
+    source=IBGE: Tag:source=IBGE
+    sport=9pin: Tag:sport=9pin
+    sport=australian_football: Tag:sport=australian football
+    sport=boules: Tag:sport=boules
+    sport=diving: Tag:sport=diving
+    sport=orienteering: Tag:sport=orienteering
+    sport=rowing: Tag:sport=rowing
+    sport=shooting: Tag:sport=shooting
+    sport=soccer: Tag:sport=soccer
+    sport=toboggan: Tag:sport=toboggan
+    sport=volleyball: Tag:sport=volleyball
+    sub_sea=reef: Tag:sub sea=reef
+    tourism=alpine_hut: Tag:tourism=alpine hut
+    tourism=aquarium: Tag:tourism=aquarium
+    tourism=artwork: Tag:tourism=artwork
+    tourism=attraction: Tag:tourism=attraction
+    tourism=camp_site: Tag:tourism=camp site
+    tourism=caravan_site: Tag:tourism=caravan site
+    tourism=chalet: Tag:tourism=chalet
+    tourism=guest_house: Tag:tourism=guest house
+    tourism=hostel: Tag:tourism=hostel
+    tourism=hotel: Tag:tourism=hotel
+    tourism=information: Tag:tourism=information
+    tourism=motel: Tag:tourism=motel
+    tourism=museum: Tag:tourism=museum
+    tourism=picnic_site: Tag:tourism=picnic site
+    tourism=theme_park: Tag:tourism=theme park
+    tourism=viewpoint: Tag:tourism=viewpoint
+    tourism=zoo: Tag:tourism=zoo
+    type=site: Tag:type=site
+    vending=bicycle_tube: Tag:vending=bicycle tube
+    waterway=boatyard: Tag:waterway=boatyard
+    waterway=canal: Tag:waterway=canal
+    waterway=dam: Tag:waterway=dam
+    waterway=derelict_canal: Tag:waterway=derelict canal
+    waterway=dock: Tag:waterway=dock
+    waterway=drain: Tag:waterway=drain
+    waterway=lock_gate: Tag:waterway=lock gate
+    waterway=river: Tag:waterway=river
+    waterway=riverbank: Tag:waterway=riverbank
+    waterway=stream: Tag:waterway=stream
+    waterway=turning_point: Tag:waterway=turning point
+    waterway=water_point: Tag:waterway=water point
+    waterway=waterfall: Tag:waterway=waterfall
+    waterway=weir: Tag:waterway=weir
+    zoo=petting_zoo: Tag:zoo=petting zoo
+es:
+  tag:
+    amenity=bar: ES:Tag:amenity=bar
+    amenity=recycling: ES:Tag:amenity=recycling
+    highway=bus_stop: ES:Tag:highway=bus stop
+et:
+  key:
+    highway: Et:Key:highway
+fi:
+  key:
+    amenity: Fi:Key:amenity
+    bridge: Fi:Key:bridge
+    crossing: Fi:Key:crossing
+    description: Fi:Key:description
+    disused: Fi:Key:disused
+    ele: Fi:Key:ele
+    embankment: Fi:Key:embankment
+    hazmat: Fi:Key:hazmat
+    lanes: Fi:Key:lanes
+    layer: Fi:Key:layer
+    leisure: Fi:Key:leisure
+    man_made: Fi:Key:man made
+    manhole: Fi:Key:manhole
+    narrow: Fi:Key:narrow
+    natural: Fi:Key:natural
+    note: Fi:Key:note
+    operator: Fi:Key:operator
+    shop: Fi:Key:shop
+    surface: Fi:Key:surface
+    tracktype: Fi:Key:tracktype
+    traffic_calming: Fi:Key:traffic calming
+    tunnel: Fi:Key:tunnel
+    waterway: Fi:Key:waterway
+    wheelchair: Fi:Key:wheelchair
+    width: Fi:Key:width
+  tag:
+    amenity=atm: Fi:Tag:amenity=atm
+    amenity=baby_hatch: Fi:Tag:amenity=baby hatch
+    amenity=bank: Fi:Tag:amenity=bank
+    amenity=bureau_de_change: Fi:Tag:amenity=bureau de change
+    amenity=car_rental: Fi:Tag:amenity=car rental
+    amenity=car_sharing: Fi:Tag:amenity=car sharing
+    amenity=cinema: Fi:Tag:amenity=cinema
+    amenity=courthouse: Fi:Tag:amenity=courthouse
+    amenity=crematorium: Fi:Tag:amenity=crematorium
+    amenity=embassy: Fi:Tag:amenity=embassy
+    amenity=ferry_terminal: Fi:Tag:amenity=ferry terminal
+    amenity=fire_station: Fi:Tag:amenity=fire station
+    amenity=fountain: Fi:Tag:amenity=fountain
+    amenity=fuel: Fi:Tag:amenity=fuel
+    amenity=library: Fi:Tag:amenity=library
+    amenity=nightclub: Fi:Tag:amenity=nightclub
+    amenity=police: Fi:Tag:amenity=police
+    amenity=prison: Fi:Tag:amenity=prison
+    amenity=recycling: Fi:Tag:amenity=recycling
+    amenity=telephone: Fi:Tag:amenity=telephone
+    amenity=theatre: Fi:Tag:amenity=theatre
+    amenity=townhall: Fi:Tag:amenity=townhall
+    amenity=veterinary: Fi:Tag:amenity=veterinary
+    highway=secondary: Fi:Tag:highway=secondary
+    highway=steps: Fi:Tag:highway=steps
+    highway=tertiary: Fi:Tag:highway=tertiary
+    highway=track: Fi:Tag:highway=track
+    highway=unclassified: Fi:Tag:highway=unclassified
+    leisure=dog_park: Fi:Tag:leisure=dog park
+    leisure=slipway: Fi:Tag:leisure=slipway
+    man_made=wastewater_plant: Fi:Tag:man made=wastewater plant
+    man_made=watermill: Fi:Tag:man made=watermill
+    natural=tree: Fi:Tag:natural=tree
+    natural=wetland: Fi:Tag:natural=wetland
+    power=line: Fi:Tag:power=line
+    power=minor_line: Fi:Tag:power=minor line
+    power=pole: Fi:Tag:power=pole
+    power=tower: Fi:Tag:power=tower
+    railway=crossing: Fi:Tag:railway=crossing
+    railway=level_crossing: Fi:Tag:railway=level crossing
+    service=parking_aisle: Fi:Tag:service=parking aisle
+    shop=bakery: Fi:Tag:shop=bakery
+    shop=bicycle: Fi:Tag:shop=bicycle
+    shop=butcher: Fi:Tag:shop=butcher
+    shop=car: Fi:Tag:shop=car
+    shop=dry_cleaning: Fi:Tag:shop=dry cleaning
+    sport=shooting: Fi:Tag:sport=shooting
+    tourism=hotel: Fi:Tag:tourism=hotel
+    tourism=zoo: Fi:Tag:tourism=zoo
+    waterway=river: Fi:Tag:waterway=river
+    waterway=stream: Fi:Tag:waterway=stream
+fr:
+  key:
+    addr: FR:Key:addr
+    amenity: FR:Key:amenity
+    barrier: FR:Key:barrier
+    boundary: FR:Key:boundary
+    bridge: FR:Key:bridge
+    building: FR:Key:building
+    collection_times: FR:Key:collection times
+    cycleway: FR:Key:cycleway
+    enforcement: FR:Key:enforcement
+    highway: FR:Key:highway
+    landuse: FR:Key:landuse
+    lanes: FR:Key:lanes
+    maxweight: FR:Key:maxweight
+    name: FR:Key:name
+    noname: FR:Key:noname
+    opening_hours: FR:Key:opening hours
+    power: FR:Key:power
+    sac_scale: FR:Key:sac scale
+    shop: FR:Key:shop
+    smoothness: FR:Key:smoothness
+    waterway: FR:Key:waterway
+  tag:
+    aeroway=runway: FR:Tag:aeroway=runway
+    amenity=bicycle_rental: FR:Tag:amenity=bicycle rental
+    amenity=pharmacy: FR:Tag:amenity=pharmacy
+    amenity=recycling: FR:Tag:amenity=recycling
+    barrier=gate: FR:Tag:barrier=gate
+    cycleway=bike_box: FR:Tag:cycleway=bike box
+    highway=bus_stop: FR:Tag:highway=bus stop
+    highway=crossing: FR:Tag:highway=crossing
+    highway=cycleway: FR:Tag:highway=cycleway
+    highway=motorway: FR:Tag:highway=motorway
+    landuse=farmyard: FR:Tag:landuse=farmyard
+    landuse=forest: FR:Tag:landuse=forest
+    leisure=playground: FR:Tag:leisure=playground
+    natural=tree: FR:Tag:natural=tree
+    power=generator: FR:Tag:power=generator
+    power=line: FR:Tag:power=line
+    power=tower: FR:Tag:power=tower
+    railway=subway_entrance: FR:Tag:railway=subway entrance
+    shop=bakery: FR:Tag:shop=bakery
+    waterway=riverbank: FR:Tag:waterway=riverbank
+    waterway=stream: FR:Tag:waterway=stream
+hr:
+  key:
+    tracktype: Hr:Key:tracktype
+hu:
+  key:
+    aeroway: HU:Key:aeroway
+    shop: HU:Key:shop
+    tourism: HU:Key:tourism
+it:
+  key:
+    aerialway: IT:Key:aerialway
+    aeroway: IT:Key:aeroway
+    amenity: IT:Key:amenity
+    barrier: IT:Key:barrier
+    boundary: IT:Key:boundary
+    bridge: IT:Key:bridge
+    building: IT:Key:building
+    construction: IT:Key:construction
+    cutting: IT:Key:cutting
+    cycleway: IT:Key:cycleway
+    denomination: IT:Key:denomination
+    embankment: IT:Key:embankment
+    enforcement: IT:Key:enforcement
+    geological: IT:Key:geological
+    highway: IT:Key:highway
+    historic: IT:Key:historic
+    junction: IT:Key:junction
+    landuse: IT:Key:landuse
+    leisure: IT:Key:leisure
+    lock: IT:Key:lock
+    man_made: IT:Key:man made
+    military: IT:Key:military
+    mooring: IT:Key:mooring
+    name: IT:Key:name
+    natural: IT:Key:natural
+    osmc:symbol: IT:Key:osmc:symbol
+    passing_places: IT:Key:passing places
+    place: IT:Key:place
+    power: IT:Key:power
+    proposed: IT:Key:proposed
+    railway: IT:Key:railway
+    ref: IT:Key:ref
+    religion: IT:Key:religion
+    route: IT:Key:route
+    sac_scale: IT:Key:sac scale
+    service: IT:Key:service
+    shop: IT:Key:shop
+    sport: IT:Key:sport
+    stop: IT:Key:stop
+    tourism: IT:Key:tourism
+    tracktype: IT:Key:tracktype
+    traffic_calming: IT:Key:traffic calming
+    trail_visibility: IT:Key:trail visibility
+    tunnel: IT:Key:tunnel
+    type: IT:Key:type
+    waterway: IT:Key:waterway
+    wheelchair: IT:Key:wheelchair
+  tag:
+    amenity=bicycle_rental: IT:Tag:amenity=bicycle rental
+    amenity=college: IT:Tag:amenity=college
+    amenity=fuel: IT:Tag:amenity=fuel
+    amenity=hospital: IT:Tag:amenity=hospital
+    amenity=kindergarten: IT:Tag:amenity=kindergarten
+    amenity=place_of_worship: IT:Tag:amenity=place of worship
+    amenity=police: IT:Tag:amenity=police
+    amenity=post_office: IT:Tag:amenity=post office
+    amenity=school: IT:Tag:amenity=school
+    amenity=university: IT:Tag:amenity=university
+    amenity=waste_basket: IT:Tag:amenity=waste basket
+    barrier=toll_booth: IT:Tag:barrier=toll booth
+    geological=palaeontological_site: IT:Tag:geological=palaeontological site
+    highway=cycleway: IT:Tag:highway=cycleway
+    highway=ford: IT:Tag:highway=ford
+    highway=mini_roundabout: IT:Tag:highway=mini roundabout
+    highway=motorway: IT:Tag:highway=motorway
+    highway=motorway_link: IT:Tag:highway=motorway link
+    highway=primary: IT:Tag:highway=primary
+    highway=primary_link: IT:Tag:highway=primary link
+    highway=trunk: IT:Tag:highway=trunk
+    highway=trunk_link: IT:Tag:highway=trunk link
+    historic=paleontological_site: IT:Tag:historic=paleontological site
+    junction=roundabout: IT:Tag:junction=roundabout
+    landuse=construction: IT:Tag:landuse=construction
+    leisure=beach_resort: IT:Tag:leisure=beach resort
+    leisure=dog_park: IT:Tag:leisure=dog park
+    shop=butcher: IT:Tag:shop=butcher
+    shop=car: IT:Tag:shop=car
+    shop=florist: IT:Tag:shop=florist
+ja:
+  key:
+    abutters: Ja:Key:abutters
+    access: Ja:Key:access
+    aerialway: Ja:Key:aerialway
+    aeroway: Ja:Key:aeroway
+    amenity: Ja:Key:amenity
+    barrier: Ja:Key:barrier
+    boundary: Ja:Key:boundary
+    bridge: Ja:Key:bridge
+    building: Ja:Key:building
+    crossing: Ja:Key:crossing
+    cuisine: Ja:Key:cuisine
+    cycleway: Ja:Key:cycleway
+    fixme: Ja:Key:fixme
+    foot: Ja:Key:foot
+    highway: Ja:Key:highway
+    historic: Ja:Key:historic
+    incline: Ja:Key:incline
+    information: Ja:Key:information
+    internet_access: Ja:Key:internet access
+    landuse: Ja:Key:landuse
+    leisure: Ja:Key:leisure
+    man_made: Ja:Key:man made
+    military: Ja:Key:military
+    name: Ja:Key:name
+    natural: Ja:Key:natural
+    operator: Ja:Key:operator
+    phone: Ja:Key:phone
+    power: Ja:Key:power
+    railway: Ja:Key:railway
+    ref: Ja:Key:ref
+    route: Ja:Key:route
+    shop: Ja:Key:shop
+    step_count: Ja:Key:step count
+    surface: Ja:Key:surface
+    tactile_paving: Ja:Key:tactile paving
+    tourism: Ja:Key:tourism
+    tracktype: Ja:Key:tracktype
+    waterway: Ja:Key:waterway
+    wheelchair: Ja:Key:wheelchair
+    wood: Ja:Key:wood
+  tag:
+    amenity=arts_centre: Ja:Tag:amenity=arts centre
+    amenity=baby_hatch: Ja:Tag:amenity=baby hatch
+    amenity=cafe: Ja:Tag:amenity=cafe
+    amenity=drinking_water: Ja:Tag:amenity=drinking water
+    amenity=fast_food: Ja:Tag:amenity=fast food
+    amenity=fire_station: Ja:Tag:amenity=fire station
+    amenity=parking: Ja:Tag:amenity=parking
+    amenity=place_of_worship: Ja:Tag:amenity=place of worship
+    amenity=pub: Ja:Tag:amenity=pub
+    amenity=restaurant: Ja:Tag:amenity=restaurant
+    amenity=toilets: Ja:Tag:amenity=toilets
+    amenity=vending_machine: Ja:Tag:amenity=vending machine
+    amenity=veterinary: Ja:Tag:amenity=veterinary
+    highway=crossing: Ja:Tag:highway=crossing
+    highway=footway: Ja:Tag:highway=footway
+    highway=pedestrian: Ja:Tag:highway=pedestrian
+    highway=residential: Ja:Tag:highway=residential
+    highway=steps: Ja:Tag:highway=steps
+    highway=track: Ja:Tag:highway=track
+    highway=traffic_signals: Ja:Tag:highway=traffic signals
+    historic=archaeological_site: Ja:Tag:historic=archaeological site
+    landuse=forest: Ja:Tag:landuse=forest
+    landuse=wood: Ja:Tag:landuse=wood
+    leisure=ice_rink: Ja:Tag:leisure=ice rink
+    man_made=lighthouse: Ja:Tag:man made=lighthouse
+    natural=coastline: Ja:Tag:natural=coastline
+    natural=wood: Ja:Tag:natural=wood
+    railway=crossing: Ja:Tag:railway=crossing
+    railway=level_crossing: Ja:Tag:railway=level crossing
+    railway=rail: Ja:Tag:railway=rail
+    shop=doityourself: Ja:Tag:shop=doityourself
+    shop=outdoor: Ja:Tag:shop=outdoor
+    tourism=hotel: Ja:Tag:tourism=hotel
+    tourism=information: Ja:Tag:tourism=information
+    waterway=riverbank: Ja:Tag:waterway=riverbank
+    waterway=water_point: Ja:Tag:waterway=water point
+nl:
+  key:
+    cycleway: NL:Key:cycleway
+  tag:
+    highway=motorway: NL:Tag:highway=motorway
+    landuse=industrial: NL:Tag:landuse=industrial
+    shop=car: NL:Tag:shop=car
+    zoo=petting_zoo: NL:Tag:zoo=petting zoo
+no:
+  key:
+    fenced: No:Key:fenced
+    maxheight:marine: No:Key:maxheight:marine
+  tag:
+    amenity=bank: No:Tag:amenity=bank
+    amenity=marketplace: No:Tag:amenity=marketplace
+    amenity=pharmacy: No:Tag:amenity=pharmacy
+    amenity=place_of_worship: No:Tag:amenity=place of worship
+pl:
+  key:
+    height: Pl:Key:height
+    oneway: Pl:Key:oneway
+pt-br:
+  key:
+    access: Pt-br:Key:access
+    addr: Pt-br:Key:addr
+    aeroway: Pt-br:Key:aeroway
+    amenity: Pt-br:Key:amenity
+    barrier: Pt-br:Key:barrier
+    bicycle: Pt-br:Key:bicycle
+    boat: Pt-br:Key:boat
+    border_type: Pt-br:Key:border type
+    boundary: Pt-br:Key:boundary
+    bridge: Pt-br:Key:bridge
+    building: Pt-br:Key:building
+    cep: Pt-br:Key:cep
+    construction: Pt-br:Key:construction
+    ele: Pt-br:Key:ele
+    emergency: Pt-br:Key:emergency
+    fenced: Pt-br:Key:fenced
+    foot: Pt-br:Key:foot
+    hgv: Pt-br:Key:hgv
+    highway: Pt-br:Key:highway
+    horse: Pt-br:Key:horse
+    landuse: Pt-br:Key:landuse
+    lanes: Pt-br:Key:lanes
+    leisure: Pt-br:Key:leisure
+    man_made: Pt-br:Key:man made
+    maxdraught: Pt-br:Key:maxdraught
+    maxheight: Pt-br:Key:maxheight
+    maxheight:legal: Pt-br:Key:maxheight:legal
+    maxheight:marine: Pt-br:Key:maxheight:marine
+    maxheight:physical: Pt-br:Key:maxheight:physical
+    maxspeed: Pt-br:Key:maxspeed
+    maxweight: Pt-br:Key:maxweight
+    military: Pt-br:Key:military
+    motorcar: Pt-br:Key:motorcar
+    motorcycle: Pt-br:Key:motorcycle
+    name: Pt-br:Key:name
+    natural: Pt-br:Key:natural
+    noname: Pt-br:Key:noname
+    oneway: Pt-br:Key:oneway
+    operator: Pt-br:Key:operator
+    psv: Pt-br:Key:psv
+    religion: Pt-br:Key:religion
+    seamark: Pt-br:Key:seamark
+    shop: Pt-br:Key:shop
+    ski: Pt-br:Key:ski
+    source: Pt-br:Key:source
+    sport: Pt-br:Key:sport
+    surface: Pt-br:Key:surface
+    type: Pt-br:Key:type
+    waterway: Pt-br:Key:waterway
+  tag:
+    amenity=bank: Pt-br:Tag:amenity=bank
+    amenity=brothel: Pt-br:Tag:amenity=brothel
+    amenity=fuel: Pt-br:Tag:amenity=fuel
+    amenity=marketplace: Pt-br:Tag:amenity=marketplace
+    amenity=nightclub: Pt-br:Tag:amenity=nightclub
+    amenity=place_of_worship: Pt-br:Tag:amenity=place of worship
+    amenity=stripclub: Pt-br:Tag:amenity=stripclub
+    boundary=maritime: Pt-br:Tag:boundary=maritime
+    highway=road: Pt-br:Tag:highway=road
+    highway=stop: Pt-br:Tag:highway=stop
+    highway=unclassified: Pt-br:Tag:highway=unclassified
+    landuse=cemetery: Pt-br:Tag:landuse=cemetery
+    man_made=survey_point: Pt-br:Tag:man made=survey point
+    natural=wetland: Pt-br:Tag:natural=wetland
+    railway=rail: Pt-br:Tag:railway=rail
+    shop=mall: Pt-br:Tag:shop=mall
+    shop=stationery: Pt-br:Tag:shop=stationery
+    source=IBGE: Pt-br:Tag:source=IBGE
+    tourism=viewpoint: Pt-br:Tag:tourism=viewpoint
+    waterway=riverbank: Pt-br:Tag:waterway=riverbank
+ro:
+  tag:
+    junction=roundabout: Ro:Tag:junction=roundabout
+ro-md:
+  tag:
+    amenity=nightclub: Ro-md:Tag:amenity=nightclub
+ru:
+  key:
+    abutters: RU:Key:abutters
+    access: RU:Key:access
+    addr: RU:Key:addr
+    aerialway: RU:Key:aerialway
+    aeroway: RU:Key:aeroway
+    amenity: RU:Key:amenity
+    area: RU:Key:area
+    bicycle: RU:Key:bicycle
+    boat: RU:Key:boat
+    border_type: RU:Key:border type
+    boundary: RU:Key:boundary
+    building: RU:Key:building
+    bunker_type: RU:Key:bunker type
+    capacity: RU:Key:capacity
+    comment: RU:Key:comment
+    construction: RU:Key:construction
+    created_by: RU:Key:created by
+    crossing: RU:Key:crossing
+    cuisine: RU:Key:cuisine
+    cutting: RU:Key:cutting
+    denomination: RU:Key:denomination
+    description: RU:Key:description
+    direction: RU:Key:direction
+    disused: RU:Key:disused
+    ele: RU:Key:ele
+    embankment: RU:Key:embankment
+    fee: RU:Key:fee
+    fixme: RU:Key:fixme
+    foot: RU:Key:foot
+    gauge: RU:Key:gauge
+    height: RU:Key:height
+    highway: RU:Key:highway
+    historic: RU:Key:historic
+    horse: RU:Key:horse
+    information: RU:Key:information
+    internet_access: RU:Key:internet access
+    junction: RU:Key:junction
+    landuse: RU:Key:landuse
+    lanes: RU:Key:lanes
+    leisure: RU:Key:leisure
+    man_made: RU:Key:man made
+    maxheight: RU:Key:maxheight
+    maxlength: RU:Key:maxlength
+    maxspeed: RU:Key:maxspeed
+    maxweight: RU:Key:maxweight
+    maxwidth: RU:Key:maxwidth
+    military: RU:Key:military
+    minspeed: RU:Key:minspeed
+    name: RU:Key:name
+    natural: RU:Key:natural
+    noexit: RU:Key:noexit
+    note: RU:Key:note
+    oneway: RU:Key:oneway
+    opening_hours: RU:Key:opening hours
+    operator: RU:Key:operator
+    parking: RU:Key:parking
+    passing_places: RU:Key:passing places
+    paved:date: RU:Key:paved:date
+    phone: RU:Key:phone
+    place: RU:Key:place
+    population: RU:Key:population
+    power: RU:Key:power
+    railway: RU:Key:railway
+    ref: RU:Key:ref
+    religion: RU:Key:religion
+    route: RU:Key:route
+    service: RU:Key:service
+    shop: RU:Key:shop
+    smoothness: RU:Key:smoothness
+    source: RU:Key:source
+    surface: RU:Key:surface
+    tourism: RU:Key:tourism
+    tracktype: RU:Key:tracktype
+    traffic_calming: RU:Key:traffic calming
+    type: RU:Key:type
+    waterway: RU:Key:waterway
+    website: RU:Key:website
+    width: RU:Key:width
+    wikipedia: RU:Key:wikipedia
+    wood: RU:Key:wood
+  tag:
+    access=designated: RU:Tag:access=designated
+    aeroway=aerodrome: RU:Tag:aeroway=aerodrome
+    aeroway=apron: RU:Tag:aeroway=apron
+    aeroway=gate: RU:Tag:aeroway=gate
+    aeroway=helipad: RU:Tag:aeroway=helipad
+    aeroway=runway: RU:Tag:aeroway=runway
+    aeroway=taxiway: RU:Tag:aeroway=taxiway
+    aeroway=terminal: RU:Tag:aeroway=terminal
+    amenity=bank: RU:Tag:amenity=bank
+    amenity=bicycle_rental: RU:Tag:amenity=bicycle rental
+    amenity=brothel: RU:Tag:amenity=brothel
+    amenity=bus_station: RU:Tag:amenity=bus station
+    amenity=car_rental: RU:Tag:amenity=car rental
+    amenity=car_sharing: RU:Tag:amenity=car sharing
+    amenity=crematorium: RU:Tag:amenity=crematorium
+    amenity=fast_food: RU:Tag:amenity=fast food
+    amenity=fire_station: RU:Tag:amenity=fire station
+    amenity=fuel: RU:Tag:amenity=fuel
+    amenity=grave_yard: RU:Tag:amenity=grave yard
+    amenity=nightclub: RU:Tag:amenity=nightclub
+    amenity=parking: RU:Tag:amenity=parking
+    amenity=pharmacy: RU:Tag:amenity=pharmacy
+    amenity=place_of_worship: RU:Tag:amenity=place of worship
+    amenity=restaurant: RU:Tag:amenity=restaurant
+    amenity=school: RU:Tag:amenity=school
+    amenity=stripclub: RU:Tag:amenity=stripclub
+    amenity=taxi: RU:Tag:amenity=taxi
+    amenity=telephone: RU:Tag:amenity=telephone
+    amenity=theatre: RU:Tag:amenity=theatre
+    amenity=toilets: RU:Tag:amenity=toilets
+    amenity=vending_machine: RU:Tag:amenity=vending machine
+    amenity=waste_basket: RU:Tag:amenity=waste basket
+    amenity=waste_disposal: RU:Tag:amenity=waste disposal
+    atm=yes: RU:Tag:atm=yes
+    barrier=lift_gate: RU:Tag:barrier=lift gate
+    building=entrance: RU:Tag:building=entrance
+    highway=bridleway: RU:Tag:highway=bridleway
+    highway=bus_stop: RU:Tag:highway=bus stop
+    highway=crossing: RU:Tag:highway=crossing
+    highway=cycleway: RU:Tag:highway=cycleway
+    highway=emergency_access_point: RU:Tag:highway=emergency access point
+    highway=footway: RU:Tag:highway=footway
+    highway=ford: RU:Tag:highway=ford
+    highway=living_street: RU:Tag:highway=living street
+    highway=mini_roundabout: RU:Tag:highway=mini roundabout
+    highway=motorway: RU:Tag:highway=motorway
+    highway=motorway_junction: RU:Tag:highway=motorway junction
+    highway=motorway_link: RU:Tag:highway=motorway link
+    highway=passing_place: RU:Tag:highway=passing place
+    highway=path: RU:Tag:highway=path
+    highway=pedestrian: RU:Tag:highway=pedestrian
+    highway=platform: RU:Tag:highway=platform
+    highway=primary: RU:Tag:highway=primary
+    highway=primary_link: RU:Tag:highway=primary link
+    highway=residential: RU:Tag:highway=residential
+    highway=road: RU:Tag:highway=road
+    highway=secondary: RU:Tag:highway=secondary
+    highway=secondary_link: RU:Tag:highway=secondary link
+    highway=service: RU:Tag:highway=service
+    highway=services: RU:Tag:highway=services
+    highway=speed_camera: RU:Tag:highway=speed camera
+    highway=steps: RU:Tag:highway=steps
+    highway=stop: RU:Tag:highway=stop
+    highway=tertiary: RU:Tag:highway=tertiary
+    highway=track: RU:Tag:highway=track
+    highway=traffic_signals: RU:Tag:highway=traffic signals
+    highway=trunk: RU:Tag:highway=trunk
+    highway=trunk_link: RU:Tag:highway=trunk link
+    highway=turning_circle: RU:Tag:highway=turning circle
+    highway=unclassified: RU:Tag:highway=unclassified
+    historic=archaeological_site: RU:Tag:historic=archaeological site
+    historic=battlefield: RU:Tag:historic=battlefield
+    information=guidepost: RU:Tag:information=guidepost
+    junction=roundabout: RU:Tag:junction=roundabout
+    landuse=allotments: RU:Tag:landuse=allotments
+    landuse=cemetery: RU:Tag:landuse=cemetery
+    landuse=forest: RU:Tag:landuse=forest
+    landuse=garages: RU:Tag:landuse=garages
+    landuse=industrial: RU:Tag:landuse=industrial
+    landuse=meadow: RU:Tag:landuse=meadow
+    landuse=military: RU:Tag:landuse=military
+    landuse=railway: RU:Tag:landuse=railway
+    landuse=reservoir: RU:Tag:landuse=reservoir
+    landuse=residential: RU:Tag:landuse=residential
+    leisure=marina: RU:Tag:leisure=marina
+    leisure=water_park: RU:Tag:leisure=water park
+    man_made=beacon: RU:Tag:man made=beacon
+    man_made=cutline: RU:Tag:man made=cutline
+    man_made=lighthouse: RU:Tag:man made=lighthouse
+    man_made=pier: RU:Tag:man made=pier
+    natural=fell: RU:Tag:natural=fell
+    natural=spring: RU:Tag:natural=spring
+    natural=tree: RU:Tag:natural=tree
+    natural=water: RU:Tag:natural=water
+    natural=wetland: RU:Tag:natural=wetland
+    natural=wood: RU:Tag:natural=wood
+    opening_hours=24/7: RU:Tag:opening hours=24/7
+    place=island: RU:Tag:place=island
+    place=town: RU:Tag:place=town
+    place=village: RU:Tag:place=village
+    power=line: RU:Tag:power=line
+    power=sub_station: RU:Tag:power=sub station
+    power=tower: RU:Tag:power=tower
+    railway=crossing: RU:Tag:railway=crossing
+    railway=subway_entrance: RU:Tag:railway=subway entrance
+    route=bus: RU:Tag:route=bus
+    route=railway: RU:Tag:route=railway
+    route=train: RU:Tag:route=train
+    route=tram: RU:Tag:route=tram
+    service=alley: RU:Tag:service=alley
+    service=driveway: RU:Tag:service=driveway
+    service=parking_aisle: RU:Tag:service=parking aisle
+    shop=bakery: RU:Tag:shop=bakery
+    shop=bicycle: RU:Tag:shop=bicycle
+    shop=car: RU:Tag:shop=car
+    shop=clothes: RU:Tag:shop=clothes
+    shop=computer: RU:Tag:shop=computer
+    shop=confectionery: RU:Tag:shop=confectionery
+    shop=department_store: RU:Tag:shop=department store
+    shop=fabrics: RU:Tag:shop=fabrics
+    shop=hairdresser: RU:Tag:shop=hairdresser
+    shop=kiosk: RU:Tag:shop=kiosk
+    shop=supermarket: RU:Tag:shop=supermarket
+    shop=travel_agency: RU:Tag:shop=travel agency
+    tourism=hotel: RU:Tag:tourism=hotel
+    tourism=information: RU:Tag:tourism=information
+    waterway=dam: RU:Tag:waterway=dam
+    waterway=rapids: RU:Tag:waterway=rapids
+    waterway=river: RU:Tag:waterway=river
+    waterway=riverbank: RU:Tag:waterway=riverbank
+    waterway=stream: RU:Tag:waterway=stream
+    waterway=weir: RU:Tag:waterway=weir
+sv:
+  tag:
+    amenity=place_of_worship: Sv:Tag:amenity=place of worship
+tr:
+  key:
+    amenity: Tr:Key:amenity
+    boundary: Tr:Key:boundary
+    highway: Tr:Key:highway
+    historic: Tr:Key:historic
+    leisure: Tr:Key:leisure
+    shop: Tr:Key:shop
+    sport: Tr:Key:sport
+uk:
+  key:
+    access: Uk:Key:access
+    highway: Uk:Key:highway
+    place: Uk:Key:place
+  tag:
+    highway=motorway: Uk:Tag:highway=motorway
+    highway=motorway_link: Uk:Tag:highway=motorway link
+    highway=primary: Uk:Tag:highway=primary
+    highway=primary_link: Uk:Tag:highway=primary link
+    highway=secondary: Uk:Tag:highway=secondary
+    highway=secondary_link: Uk:Tag:highway=secondary link
+    highway=tertiary: Uk:Tag:highway=tertiary
+    highway=trunk: Uk:Tag:highway=trunk
+    highway=trunk_link: Uk:Tag:highway=trunk link
+zh-hans:
+  key:
+    place: Zh-hans:Key:place
+
diff --git a/db/.gitignore b/db/.gitignore
new file mode 100644 (file)
index 0000000..6cd6b64
--- /dev/null
@@ -0,0 +1 @@
+*_structure.sql
diff --git a/db/functions/.gitignore b/db/functions/.gitignore
new file mode 100644 (file)
index 0000000..9d22eb4
--- /dev/null
@@ -0,0 +1,2 @@
+*.o
+*.so
index 496aa201e20e4067a3f6550da79ca234d27f02cd..c0e70dfd8fb1df6eba249202386438e89184ec32 100644 (file)
@@ -22,7 +22,7 @@ Disallow: /*relation=
 
 User-agent: Slurp
 Disallow: /user/*/traces/
-Disallow: /user/*/edits/
+Disallow: /user/*/edits
 Disallow: /user/*/diary/
 Allow: /user/
 Disallow: /traces/tag/
@@ -48,7 +48,7 @@ Disallow: /*relation=
 
 User-agent: Googlebot
 Disallow: /user/*/traces/
-Disallow: /user/*/edits/
+Disallow: /user/*/edits
 Disallow: /user/*/diary/
 Allow: /user/
 Disallow: /traces/tag/
diff --git a/script/misc/update-wiki-pages b/script/misc/update-wiki-pages
new file mode 100644 (file)
index 0000000..ffb1105
--- /dev/null
@@ -0,0 +1,149 @@
+#!/usr/bin/env perl
+use 5.010;
+use strict;
+use warnings;
+
+use Pod::Usage ();
+use Getopt::Long ();
+
+BEGIN {
+    eval "require MediaWiki::API; require YAML::XS;" or do {
+        print "You have to install some modules via CPAN to run this:\n";
+        print "   sudo cpanp MediaWiki::API YAML::XS\n";
+        exit 1;
+    };
+}
+
+use MediaWiki::API;
+use YAML::XS qw(Dump);
+use Test::More 'no_plan';
+
+=head1 NAME
+
+update-wiki-pages - Scrape the wiki for key/value wiki description pages
+
+=head1 SYNOPSIS
+
+    perl script/misc/update-wiki-pages config/wiki_pages.yml 
+
+Or with prove(1):
+
+    prove -e 'perl script/misc/update-wiki-pages' config/wiki_pages.yml
+
+=cut
+
+# Get the command-line options
+Getopt::Long::Parser->new(
+    config => [ qw< bundling no_ignore_case no_require_order pass_through > ],
+)->getoptions(
+    'h|help' => \my $help,
+) or help();
+
+# On --help
+help() if $help;
+
+help() unless $ARGV[0];
+
+# Get a API interface
+my $mw = MediaWiki::API->new();
+ok($mw, "Got a MediaWiki API");
+$mw->{config}->{api_url} = 'http://wiki.openstreetmap.org/w/api.php';
+
+# All our goodies
+my (%feature, %count);
+
+# This is what you get on:
+## http://wiki.openstreetmap.org/w/index.php?search=Template:KeyDescription&fulltext=Search&fulltext=Search
+for my $lang ('', map { "${_}:" } qw[ Pt Fi De It HU Cz Fr RU Pl ]) {
+    ok(1, "  Templates for language '$lang'");
+
+    # Key pages
+    ok(1, "    Getting key pages");
+    my $cnt = stick_content_in_hash("key", "Template:${lang}KeyDescription", \%feature);
+    ok(1, "    Got $cnt key pages");
+    $count{key} += $cnt;
+
+    # Value pages
+    ok(1, "    Getting value pages");
+    $cnt = stick_content_in_hash("tag", "Template:${lang}ValueDescription", \%feature);
+    ok(1, "    Got $cnt value pages");
+    $count{value} += $cnt;
+}
+
+ok(1, "Got a total of $count{$_} ${_}s") for qw[ key value ];
+
+# Dump to .yml file
+open my $out, ">", $ARGV[0] or die "Can't open file '$ARGV[0]' supplied on the command line";
+say $out "# THIS FILE IS AUTOGENERATED WITH THE script/misc/update-wiki-pages";
+say $out "# PROGRAM DO NOT MANUALLY EDIT IT";
+say $out "";
+say $out Dump(\%feature);
+close $out;
+
+exit 0;
+
+sub stick_content_in_hash
+{
+    my ($key, $title, $hash) = @_;
+    my $ukey = ucfirst $key;
+
+    my $space_to_underscore = sub {
+        my $txt = shift;
+        $txt =~ s/ /_/g;
+        $txt;
+    };
+
+    my $count = 0;
+    get_embeddedin(
+        $title,
+        sub {
+            my ($links) = @_;
+            my (@links) = @$links;
+            ok(1, "    ... got " . scalar(@links) . " more links");
+            for my $link (@links) {
+                $count++;
+                my $title = $link->{title};
+
+                if ($title =~ /^$ukey:(?<key_name>.*?)$/) {
+                    # English by default
+                    $hash->{en}->{$key}->{ $space_to_underscore->($+{key_name}) } = $title;
+                } elsif ($title =~ /^(?<lang>[^:]+):$ukey:(?<key_name>.*?)$/) {
+                    $hash->{lc $+{lang}}->{$key}->{ $space_to_underscore->($+{key_name}) } = $title;
+                }
+            }
+        }
+    );
+
+    return $count;
+}
+
+sub get_embeddedin
+{
+    my ($title, $callback) = @_;
+    my $articles = $mw->list(
+        {
+            action => 'query',
+            list => 'embeddedin',
+            eititle => $title,
+            eifilterredir => 'nonredirects',
+            # Doesn't work for De:* and anything non-en. Odd.
+            # einamespace => '0|8',
+            eilimit => '200',
+        },
+        {
+            max => '0',
+            hook => $callback,
+            skip_encoding => 1,
+        }
+    ) || die $mw->{error}->{code} . ': ' . $mw->{error}->{details};
+}
+
+sub help
+{
+    my %arg = @_;
+
+    Pod::Usage::pod2usage(
+        -verbose => $arg{ verbose },
+        -exitval => $arg{ exitval } || 0,
+    );
+}