diff options
author | Jochen Topf <jochen@topf.org> | 2014-09-14 16:32:42 +0200 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2014-09-14 16:41:57 +0200 |
commit | 0bce8570acd121ffb6b65ec58d7e678cbd89798f (patch) | |
tree | e38ae0d288bdf4542ee2d5ae708eada7392be602 | |
parent | 8685384c806e75457c44ea542d39f961e9658dfc (diff) | |
download | taginfo-0bce8570acd121ffb6b65ec58d7e678cbd89798f.tar taginfo-0bce8570acd121ffb6b65ec58d7e678cbd89798f.tar.gz |
Removed unused Potlatch-related code.
-rw-r--r-- | sources/master/master.sql | 16 | ||||
-rw-r--r-- | sources/master/selection.sql | 7 | ||||
-rw-r--r-- | taginfo-config-example.json | 2 | ||||
-rw-r--r-- | web/i18n/de.yml | 3 | ||||
-rw-r--r-- | web/i18n/en.yml | 3 | ||||
-rw-r--r-- | web/i18n/es.yml | 3 | ||||
-rw-r--r-- | web/i18n/fr.yml | 3 | ||||
-rw-r--r-- | web/i18n/hu.yml | 3 | ||||
-rw-r--r-- | web/i18n/it.yml | 3 | ||||
-rw-r--r-- | web/i18n/pl.yml | 3 | ||||
-rw-r--r-- | web/i18n/pt.yml | 3 | ||||
-rw-r--r-- | web/i18n/ru.yml | 3 | ||||
-rw-r--r-- | web/i18n/uk.yml | 3 | ||||
-rw-r--r-- | web/i18n/vi.yml | 3 | ||||
-rw-r--r-- | web/lib/api/v4/keys.rb | 3 | ||||
-rw-r--r-- | web/lib/ui/test.rb | 34 | ||||
-rw-r--r-- | web/views/test/index.erb | 1 | ||||
-rw-r--r-- | web/views/test/potlatch/categories.erb | 36 | ||||
-rw-r--r-- | web/views/test/potlatch/category.erb | 17 | ||||
-rw-r--r-- | web/views/test/potlatch/feature.erb | 24 | ||||
-rw-r--r-- | web/views/test/potlatch/index.erb | 6 |
21 files changed, 12 insertions, 167 deletions
diff --git a/sources/master/master.sql b/sources/master/master.sql index a3c250b..ebd8202 100644 --- a/sources/master/master.sql +++ b/sources/master/master.sql @@ -8,12 +8,11 @@ .bail ON -ATTACH DATABASE '__DIR__/db/taginfo-db.db' AS db; -ATTACH DATABASE '__DIR__/wiki/taginfo-wiki.db' AS wiki; -ATTACH DATABASE '__DIR__/languages/taginfo-languages.db' AS languages; -ATTACH DATABASE '__DIR__/josm/taginfo-josm.db' AS josm; -ATTACH DATABASE '__DIR__/projects/taginfo-projects.db' AS projects; -ATTACH DATABASE '__DIR__/potlatch/taginfo-potlatch.db' AS potlatch; +ATTACH DATABASE '__DIR__/db/taginfo-db.db' AS db; +ATTACH DATABASE '__DIR__/wiki/taginfo-wiki.db' AS wiki; +ATTACH DATABASE '__DIR__/languages/taginfo-languages.db' AS languages; +ATTACH DATABASE '__DIR__/josm/taginfo-josm.db' AS josm; +ATTACH DATABASE '__DIR__/projects/taginfo-projects.db' AS projects; -- ============================================================================ @@ -35,8 +34,7 @@ INSERT INTO sources SELECT 1, 1, * FROM db.source UNION SELECT 2, 1, * FROM wiki.source UNION SELECT 3, 1, * FROM languages.source UNION SELECT 4, 1, * FROM josm.source - UNION SELECT 5, 1, * FROM projects.source - UNION SELECT 6, 0, * FROM potlatch.source; + UNION SELECT 5, 1, * FROM projects.source; DROP TABLE IF EXISTS master_stats; CREATE TABLE master_stats ( @@ -47,7 +45,7 @@ CREATE TABLE master_stats ( INSERT INTO master_stats SELECT * FROM db.stats UNION SELECT * FROM wiki.stats UNION SELECT * FROM josm.stats - UNION SELECT * FROM potlatch.stats; + UNION SELECT * FROM projects.stats; -- ============================================================================ diff --git a/sources/master/selection.sql b/sources/master/selection.sql index 7793a65..053faad 100644 --- a/sources/master/selection.sql +++ b/sources/master/selection.sql @@ -15,10 +15,9 @@ -- ============================================================================ -ATTACH DATABASE '__DIR__/db/taginfo-db.db' AS db; -ATTACH DATABASE '__DIR__/wiki/taginfo-wiki.db' AS wiki; -ATTACH DATABASE '__DIR__/josm/taginfo-josm.db' AS josm; -ATTACH DATABASE '__DIR__/potlatch/taginfo-potlatch.db' AS potlatch; +ATTACH DATABASE '__DIR__/db/taginfo-db.db' AS db; +ATTACH DATABASE '__DIR__/wiki/taginfo-wiki.db' AS wiki; +ATTACH DATABASE '__DIR__/josm/taginfo-josm.db' AS josm; -- ============================================================================ diff --git a/taginfo-config-example.json b/taginfo-config-example.json index 53365ac..50fa178 100644 --- a/taginfo-config-example.json +++ b/taginfo-config-example.json @@ -67,7 +67,7 @@ // Note that this will NOT work for the "db" source! Well, you can download it, // but it will fail later, because the database is changed by the master.sql // scripts. - "download": "languages josm potlatch wiki", + "download": "languages josm wiki", // These sources will be created from the actual sources. "create": "db", "db": { diff --git a/web/i18n/de.yml b/web/i18n/de.yml index 7ff3cf1..33ec493 100644 --- a/web/i18n/de.yml +++ b/web/i18n/de.yml @@ -386,9 +386,6 @@ sources: josm: name: JOSM description: Einstellungen des OSM-Editors "JOSM". - potlatch: - name: Potlatch - description: Einstellungen des OSM-Editors "Potlatch2". languages: name: Sprachen description: Namen, Codes, usw. zu Sprachen aus IANA- und Unicode-Registrierungen. diff --git a/web/i18n/en.yml b/web/i18n/en.yml index 299229d..5562e5e 100644 --- a/web/i18n/en.yml +++ b/web/i18n/en.yml @@ -456,9 +456,6 @@ sources: josm: name: JOSM description: Configuration data from the JOSM OSM editor. - potlatch: - name: Potlatch - description: Configuration data from the Potlatch2 OSM editor. languages: name: Languages description: Language names, codes, etc. from IANA and Unicode registries. diff --git a/web/i18n/es.yml b/web/i18n/es.yml index d8bcf86..4052ccb 100644 --- a/web/i18n/es.yml +++ b/web/i18n/es.yml @@ -426,9 +426,6 @@ sources: josm: name: JOSM description: Datos de la configuración del editor JOSM de OSM. - potlatch: - name: Potlatch - description: Datos de la configuración del editor Potlatch2 de OSM. languages: name: Idiomas description: Nombres de idiomas, códigos, etc. de los registros IANA y Unicode. diff --git a/web/i18n/fr.yml b/web/i18n/fr.yml index 11e10aa..56de49e 100644 --- a/web/i18n/fr.yml +++ b/web/i18n/fr.yml @@ -339,9 +339,6 @@ sources: josm: name: JOSM description: Configuration pour l'éditeur JOSM. - potlatch: - name: Potlatch - description: Configuration pour l'éditeur Potlatch2. languages: name: Langues description: Noms et codes des langues, depuis les registres IANA et Unicode. diff --git a/web/i18n/hu.yml b/web/i18n/hu.yml index a1ed4f1..102ea36 100644 --- a/web/i18n/hu.yml +++ b/web/i18n/hu.yml @@ -343,9 +343,6 @@ sources: josm: name: JOSM description: A JOSM szerkesztő konfigurációs fájljaiból származó adatok. - potlatch: - name: Potlatch - description: A Potlatch2 szerkesztő konfigurációs fájljaiból származó adatok. languages: name: Nyelvek description: Nyelvek nevei, kótjai, stb. az IANA és Unicode nyilvántartásokból. diff --git a/web/i18n/it.yml b/web/i18n/it.yml index a36581a..4c7de31 100644 --- a/web/i18n/it.yml +++ b/web/i18n/it.yml @@ -141,9 +141,6 @@ sources: josm: name: JOSM description: Dati di configurazione dall'editor JOSM di OSM. - potlatch: - name: Potlatch - description: Dati di configurazione dall'editor Potlatch2 di OSM. reports: characters_in_keys: diff --git a/web/i18n/pl.yml b/web/i18n/pl.yml index 0603b1f..f38c9c9 100644 --- a/web/i18n/pl.yml +++ b/web/i18n/pl.yml @@ -345,9 +345,6 @@ sources: josm: name: JOSM description: Dane konfiguracyjne z edytora JOSM. - potlatch: - name: Potlatch - description: Dane konfiguracyjne z edytora Potlatch2. languages: name: Języki description: Język nazw, kodów, itd. z IANA i rejestrów Unicode. diff --git a/web/i18n/pt.yml b/web/i18n/pt.yml index 6bb9367..a72043d 100644 --- a/web/i18n/pt.yml +++ b/web/i18n/pt.yml @@ -319,9 +319,6 @@ sources: josm: name: JOSM description: Configuration data from the JOSM OSM editor. - potlatch: - name: Potlatch - description: Configuration data from the Potlatch2 OSM editor. languages: name: Languages description: Language names, codes, etc. from IANA and Unicode registries. diff --git a/web/i18n/ru.yml b/web/i18n/ru.yml index 7629dfd..1fc32fd 100644 --- a/web/i18n/ru.yml +++ b/web/i18n/ru.yml @@ -319,9 +319,6 @@ sources: josm: name: JOSM description: Конфигурационные файлы редактора JOSM. - potlatch: - name: Potlatch - description: Конфигурационные файлы редактора Potlatch 2. languages: name: Languages description: Языковые названия, коды, и прочее из реестров IANA и Unicode. diff --git a/web/i18n/uk.yml b/web/i18n/uk.yml index 03b8adb..e88d47f 100644 --- a/web/i18n/uk.yml +++ b/web/i18n/uk.yml @@ -319,9 +319,6 @@ sources: josm: name: JOSM description: Конфігураційні файли редактора JOSM. - potlatch: - name: Potlatch - description: Конфігураційні файли редактора Potlatch 2. languages: name: Languages description: Мовні назви, коди, та інше з реєстрів IANA і Unicode. diff --git a/web/i18n/vi.yml b/web/i18n/vi.yml index e05a477..62f4f0f 100644 --- a/web/i18n/vi.yml +++ b/web/i18n/vi.yml @@ -336,9 +336,6 @@ sources: josm: name: JOSM description: Dữ liệu cấu hình từ trình vẽ OSM JOSM. - potlatch: - name: Potlatch - description: Dữ liệu cấu hình từ trình vẽ OSM Potlatch 2. languages: name: Ngôn ngữ description: Tên ngôn ngữ, mã ngôn ngữ, v.v. từ các kho IANA và Unicode. diff --git a/web/lib/api/v4/keys.rb b/web/lib/api/v4/keys.rb index 98d60c6..b0072ff 100644 --- a/web/lib/api/v4/keys.rb +++ b/web/lib/api/v4/keys.rb @@ -13,7 +13,7 @@ class Taginfo < Sinatra::Base :parameters => { :query => 'Only show keys matching this query (substring match, optional).' }, :paging => :optional, :filter => @@filters, - :sort => %w( key count_all count_nodes count_ways count_relations values_all users_all in_wiki in_josm in_potlatch length ), + :sort => %w( key count_all count_nodes count_ways count_relations values_all users_all in_wiki in_josm length ), :result => paging_results([ [:key, :STRING, 'Key'], [:count_all, :INT, 'Number of objects in the OSM database with this key.'], @@ -64,7 +64,6 @@ class Taginfo < Sinatra::Base o.users_all o.in_wiki o.in_josm - o.in_potlatch o.length 'length(key)' o.length :key }. diff --git a/web/lib/ui/test.rb b/web/lib/ui/test.rb index 59a68ed..4b79765 100644 --- a/web/lib/ui/test.rb +++ b/web/lib/ui/test.rb @@ -14,38 +14,4 @@ class Taginfo < Sinatra::Base erb :'test/wiki_import' end - get! '/test/potlatch' do - @title = 'Potlatch' - - erb :'test/potlatch/index' - end - - get '/test/potlatch/categories' do - @title = 'Potlatch Features' - - @categories = @db.execute('SELECT * FROM potlatch.categories ORDER BY name') - - erb :'test/potlatch/categories' - end - - get '/test/potlatch/categories/:category' do - @category = params[:category] - @features = @db.execute('SELECT * FROM potlatch.features WHERE category_id=? ORDER BY name', @category) - - erb :'test/potlatch/category', :layout => false - end - - get '/test/potlatch/features/:feature' do - @feature_name = params[:feature] - @feature = @db.execute('SELECT * FROM potlatch.features WHERE name=?', @feature_name)[0] - @tags = @db.execute('SELECT * FROM potlatch.tags WHERE feature_name=? ORDER BY key, value', @feature_name) - - erb :'test/potlatch/feature', :layout => false - end - - get %r{/test/potlatch/icon/(.*)} do |icon| - content_type :png - send_file('../../var/sources/potlatch/resources/' + icon) - end - end diff --git a/web/views/test/index.erb b/web/views/test/index.erb index 00da1c9..b7de9c5 100644 --- a/web/views/test/index.erb +++ b/web/views/test/index.erb @@ -6,6 +6,5 @@ <h2>Test pages</h2> <ul> <li><a href="/test/wiki_import">Wiki import</a></li> - <li><a href="/test/potlatch">Potlatch</a></li> </ul> </div> diff --git a/web/views/test/potlatch/categories.erb b/web/views/test/potlatch/categories.erb deleted file mode 100644 index 97725a3..0000000 --- a/web/views/test/potlatch/categories.erb +++ /dev/null @@ -1,36 +0,0 @@ -<h1><img src="/img/sources/potlatch.32.png" alt="" title="Potlatch"/> Potlatch</h1> - -<table class="drilldown"><tr> - <th><h2>➊ Categories</h2></th> - <th></th> - <th><h2>➋ Features</h2></th> - <th></th> - <th><h2>➌ Feature</h2></th> -</tr><tr> - <td class="content" id="categories"> - <% @categories.each do |row| %> - <div> <a href="/test/potlatch/categories#<%= escape row['id'] %>"><%= row['name'] %></a></div> - <% end %> - </div> - <td class="arrow">❱</td> - <td class="content" id="features"></td> - <td class="arrow">❱</td> - <td class="content" id="feature"></td> -</tr></table> - -<script type="text/javascript"> - -jQuery('#categories a').bind('click', function() { - jQuery('#categories div').removeClass('current'); - jQuery(this).parent().addClass('current'); - jQuery('#feature').html(''); - jQuery.ajax({ - url: this.href.replace(/#/, '/'), - success: function(html) { - jQuery('#features').html(html); - } - }); - return false; -}); - -</script> diff --git a/web/views/test/potlatch/category.erb b/web/views/test/potlatch/category.erb deleted file mode 100644 index 396e426..0000000 --- a/web/views/test/potlatch/category.erb +++ /dev/null @@ -1,17 +0,0 @@ -<% @features.each do |row| %> - <div> <a href="/test/potlatch/features/<%= escape row['name'] %>"><%= row['name'] %></a></div> -<% end %> -<script type="text/javascript"> -jQuery('#features a').bind('click', function() { - jQuery('#features div').removeClass('current'); - jQuery(this).parent().addClass('current'); - jQuery.ajax({ - url: this.href, - success: function(html) { - jQuery('#feature').html(html); - } - }); - return false; -}); - -</script> diff --git a/web/views/test/potlatch/feature.erb b/web/views/test/potlatch/feature.erb deleted file mode 100644 index fd864c9..0000000 --- a/web/views/test/potlatch/feature.erb +++ /dev/null @@ -1,24 +0,0 @@ -<p style="text-align: center;"><b><%= @feature_name %></b></p> - -<p style="background: #ffffff; padding: 4px; -moz-border-radius: 3px; text-align: center; min-height: 36px; vertical-align: middle;"> -<% if @feature['icon_image'] %> - <img src="/test/potlatch/icon/<%= @feature['icon_image'] %>" alt="Icon" title="Icon"/> -<% end %> -</p> - -<p style="text-align: center;"> -<% [:point, :line, :area, :relation].each do |otype| %> - <% imgmatch = { :point => 'node', :line => 'way', :area => 'area', :relation => 'relation' }; - image = @feature['on_' + otype.to_s] == '1' ? imgmatch[otype] : 'none' %> - <img src="/img/types/<%= image %>.16.png" alt="" title="<%= otype.to_s.capitalize %>"/> -<% end %> -</p> - -<p style="text-align: center;"><%= external_link('Help text', @feature['help']) %></p> - -<p style="text-align: center;">Tags:<br/> - <% @tags.each do |tag| %> - <%= link_to_tag(tag['key'], tag['value']) %><br/> - <% end %> -</p> - diff --git a/web/views/test/potlatch/index.erb b/web/views/test/potlatch/index.erb deleted file mode 100644 index 3fb0428..0000000 --- a/web/views/test/potlatch/index.erb +++ /dev/null @@ -1,6 +0,0 @@ -<h1>Potlatch</h1> - -<ul> - <li><a href="/test/potlatch/categories">Categories</a></li> -</ul> - |