From 0bce8570acd121ffb6b65ec58d7e678cbd89798f Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Sun, 14 Sep 2014 16:32:42 +0200 Subject: Removed unused Potlatch-related code. --- sources/master/master.sql | 16 +++++++-------- sources/master/selection.sql | 7 +++---- taginfo-config-example.json | 2 +- web/i18n/de.yml | 3 --- web/i18n/en.yml | 3 --- web/i18n/es.yml | 3 --- web/i18n/fr.yml | 3 --- web/i18n/hu.yml | 3 --- web/i18n/it.yml | 3 --- web/i18n/pl.yml | 3 --- web/i18n/pt.yml | 3 --- web/i18n/ru.yml | 3 --- web/i18n/uk.yml | 3 --- web/i18n/vi.yml | 3 --- web/lib/api/v4/keys.rb | 3 +-- web/lib/ui/test.rb | 34 -------------------------------- web/views/test/index.erb | 1 - web/views/test/potlatch/categories.erb | 36 ---------------------------------- web/views/test/potlatch/category.erb | 17 ---------------- web/views/test/potlatch/feature.erb | 24 ----------------------- web/views/test/potlatch/index.erb | 6 ------ 21 files changed, 12 insertions(+), 167 deletions(-) delete mode 100644 web/views/test/potlatch/categories.erb delete mode 100644 web/views/test/potlatch/category.erb delete mode 100644 web/views/test/potlatch/feature.erb delete mode 100644 web/views/test/potlatch/index.erb 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 @@

Test pages

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 @@ -

Potlatch

- - - - - - - - - - - - -

➊ Categories

➋ Features

➌ Feature

- <% @categories.each do |row| %> - - <% end %> - -
- - 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| %> -
  <%= row['name'] %>
-<% end %> - 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 @@ -

<%= @feature_name %>

- -

-<% if @feature['icon_image'] %> - Icon -<% end %> -

- -

-<% [: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' %> - -<% end %> -

- -

<%= external_link('Help text', @feature['help']) %>

- -

Tags:
- <% @tags.each do |tag| %> - <%= link_to_tag(tag['key'], tag['value']) %>
- <% end %> -

- 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 @@ -

Potlatch

- - - -- cgit v1.2.3