openvibers/openvibe.search Commits

Search accepts OpenVibe.Tours' places, cities and walks (#195)

OP OpenVibers committed 11 days ago · 13f7b32bea · 2 files, +4 −0

Changes

ddiff --git a/server/config.js b/server/config.js
iindex ef4443d..f71b875 100644
---- a/server/config.js
++++ b/server/config.js
@@@ -52,6 +52,8 @@ const DEFAULT_EVENT_OWNERS = ['wiki', 'blog', 'news', 'reviews', 'deals', 'coupo
'work', 'rent', 'help', 'inventory', 'quest', 'host',
// open.shoes' model pages (contracts 0.273.0): every store's price for one shoe.
'shoes',
++ // OpenVibe.Tours' places, cities and self-guided walks (contracts 0.274.0).
++ 'tours',
// Owner-API writers listed so their front-page card and ?owner= filter exist: OpenVibe.Video's uploads (MediaHub,
// service id media-hub; an event type has no hyphen), OpenVibe.Food's checked recipes and OpenVibe.Bot's model pages.
'media-hub', 'food', 'bot'];
ddiff --git a/server/web/page.js b/server/web/page.js
iindex 4f8e087..d723524 100644
---- a/server/web/page.js
++++ b/server/web/page.js
@@@ -219,6 +219,7 @@ const SOURCES = {
food: ['OpenVibe.Food', 'Budget recipes, costed from the food list.'],
bot: ['OpenVibe.Bot', 'The robots you can drive from a browser, and how to connect each.'],
shoes: ['OpenVibe.Shoes', 'Shoe models with every store\'s price, the history and the size curve.'],
++ tours: ['OpenVibe.Tours', 'Places to see, cities and self-guided walks, from OpenStreetMap and Wikivoyage.'],
};
const ICON_OF = { sources: 'docs', 'media-hub': 'video' };
// What a count of each kind is called on the front page ("10,621 job listings"); a kind not named here is "documents".
@@@ -231,6 +232,7 @@ const KIND_WORDS = {
'quest/quest': ['quest', 'quests'], 'bot/model': ['robot model', 'robot models'], 'wiki/page': ['wiki page', 'wiki pages'], 'news/story': ['story', 'stories'],
'deals/offer': ['deal', 'deals'], 'games/world': ['creator world', 'creator worlds'], 'media-hub/video': ['video', 'videos'], 'food/recipe': ['recipe', 'recipes'],
'shoes/shoe': ['shoe model', 'shoe models'],
++ 'tours/place': ['place to see', 'places to see'], 'tours/city': ['travel city', 'travel cities'], 'tours/route': ['self-guided walk', 'self-guided walks'],
};
const fmt = (n) => Number(n).toLocaleString('en-US');
const kindWords = (owner, type, n) => { const w = KIND_WORDS[`${owner}/${type}`]; return `${fmt(n)} ${w ? w[n === 1 ? 0 : 1] : n === 1 ? 'document' : 'documents'}`; };