-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
metadata.yaml
69 lines (68 loc) · 2.23 KB
/
metadata.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
title: www.niche-museums.com
databases:
browse:
queries:
nearby: |-
select *, haversine(latitude, longitude, cast(:latitude as real), cast(:longitude as real), 'mi') as distance_mi
from museums order by distance_mi
feed:
title: Niche Museums
sql: |-
SELECT
'tag:niche-museums.com,' || substr(m.created, 0, 11) || ':' || m.id as atom_id,
m.name as atom_title,
m.created as atom_updated,
'https://www.niche-museums.com/' || m.id as atom_link,
coalesce(
'<img src="' || m.photo_url || '?w=800&h=400&fit=crop&auto=compress">',
''
) || render_markdown(
m.description || '
' || coalesce(
(
select
group_concat(
'* [' || json_extract(p.value, '$.title') || '](' || json_extract(p.value, '$.url') || ') ' || json_extract(p.value, '$.author') || ', ' || json_extract(p.value, '$.publication') || ', ' || json_extract(p.value, '$.date'),
'
'
)
from
json_each(coalesce(m.press, '[{}]')) as p
),
''
)
) || coalesce(
(
select
group_concat(
'<p><img src="' || json_extract(ph.value, '$.url') || '?w=400&auto=compress"></p>',
''
)
from
json_each(coalesce(m.photos, '[{}]')) as ph
),
''
) as atom_content_html,
'Simon Willison' as atom_author_name,
'https://simonwillison.net/' as atom_author_uri
FROM
museums m
order by
m.created desc
limit
15
search: |-
select
museums_fts.rank,
museums.*
from
museums
join museums_fts on museums.id = museums_fts.rowid
where
museums_fts match case
:q
when '' then '*'
else escape_fts_query(:q)
end
order by
museums_fts.rank