Commit 293309d2 authored by Stefan Müller's avatar Stefan Müller

Diversa.

parent c082a5f2
......@@ -181,9 +181,13 @@ class Geist(bottle.Bottle):
{'data': tuple(
db.get_urdata_items(lang_id, pub_id, form, path))},
separators = (',', ':'))
elif form.startswith('tr_'):
for tr in db.get_urdata_items(lang_id, pub_id, form, path):
yield tr
elif form.startswith('tr_') and pub_id == 'bwb':
response.content_type = 'application/json'
response.set_header('Access-Control-Allow-Origin', '*')
yield json.dumps({
'data':
''.join(db.get_urdata_items(lang_id, pub_id, form, path))
})
# No ``else: raise HTTPError``, for it would rise after any stream.
@self.route('/<_>/api/oai')
......
% # Licensed under http://www.apache.org/licenses/LICENSE-2.0
% # Attribution notice: by Stefan Müller in 2015 ff. (© http://badw.de)
% # Attribution notice: by Manuel Raab, Stefan Müller in 2020 ff. (© http://badw.de)
% num, lem, sem, vol, col = kwargs['item']
<artikel id="{{kwargs['pub_id']}}_{{num}}" wb="{{kwargs['pub_id']}}" handverlesen="nein" dummy="ja">
<artikel id="{{kwargs['pub_id']}}_{{lem.replace(' ', '_')}}" wb="{{kwargs['pub_id']}}" sort="{{lem.strip('-')}}" handverlesen="nein" dummy="ja">
<lemma-position>
<such-lemma>{{lem}}</such-lemma>
<lemma>{{lem}}</lemma>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment