diff options
-rwxr-xr-x | sources/wiki/get_image_info.rb | 1 | ||||
-rwxr-xr-x | sources/wiki/get_page_list.rb | 1 | ||||
-rwxr-xr-x | sources/wiki/get_wiki_data.rb | 1 | ||||
-rw-r--r-- | sources/wiki/lib/mediawikiapi.rb | 3 |
4 files changed, 2 insertions, 4 deletions
diff --git a/sources/wiki/get_image_info.rb b/sources/wiki/get_image_info.rb index 5a08cd8..cabd169 100755 --- a/sources/wiki/get_image_info.rb +++ b/sources/wiki/get_image_info.rb @@ -50,7 +50,6 @@ require 'lib/mediawikiapi.rb' dir = ARGV[0] || '.' api = MediaWikiAPI::API.new('wiki.openstreetmap.org') -api.add_header('User-agent', 'taginfo/0.1 (jochen@remote.org)') db = SQLite3::Database.new(dir + '/taginfo-wiki.db') db.results_as_hash = true diff --git a/sources/wiki/get_page_list.rb b/sources/wiki/get_page_list.rb index 7cdbafa..0ea5976 100755 --- a/sources/wiki/get_page_list.rb +++ b/sources/wiki/get_page_list.rb @@ -89,7 +89,6 @@ end dir = ARGV[0] || '.' api = MediaWikiAPI::API.new('wiki.openstreetmap.org') -api.add_header('User-agent', 'taginfo/0.1 (jochen@remote.org)') namespaces = get_namespaces(api) diff --git a/sources/wiki/get_wiki_data.rb b/sources/wiki/get_wiki_data.rb index 0213b1c..8dc4252 100755 --- a/sources/wiki/get_wiki_data.rb +++ b/sources/wiki/get_wiki_data.rb @@ -256,7 +256,6 @@ end dir = ARGV[0] || '.' api = MediaWikiAPI::API.new('wiki.openstreetmap.org', 80, '/w/index.php?') -api.add_header('User-agent', 'taginfo/0.1 (jochen@remote.org)') db = SQLite3::Database.new(dir + '/taginfo-wiki.db') db.results_as_hash = true diff --git a/sources/wiki/lib/mediawikiapi.rb b/sources/wiki/lib/mediawikiapi.rb index 293aa6f..d799041 100644 --- a/sources/wiki/lib/mediawikiapi.rb +++ b/sources/wiki/lib/mediawikiapi.rb @@ -8,7 +8,7 @@ # #------------------------------------------------------------------------------ # -# Copyright (C) 2012 Jochen Topf <jochen@remote.org> +# Copyright (C) 2013 Jochen Topf <jochen@remote.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -37,6 +37,7 @@ module MediaWikiAPI @port = port @path = path @headers = {} + add_header('User-agent', 'taginfo/1.0 (http://wiki.osm.org/wiki/Taginfo)') end def add_header(name, value) |