std response format for sync data
[wolnelektury.git] / src / catalogue / api / tojson.py
index fa6bafd..3d47cd9 100644 (file)
@@ -82,7 +82,7 @@ tags = {
 
     'begin': ('_ignore', True, {'class': 'reference'}, {'data-uri': 'href'}, False),
     'end': ('_ignore', True, {'class': 'reference'}, {'data-uri': 'href'}, False),
-    'motyw': ('a', True, {'class': 'theme'}, None, False),
+    'motyw': ('_ignore', True, {'class': 'theme'}, None, False),
 
     'pa': ('a', True, {'class': 'footnote footnote-pa'}, None, False),
     'pe': ('a', True, {'class': 'footnote footnote-pe'}, None, False),
@@ -121,7 +121,7 @@ front2 = set(['autor_utworu'])
 
 
 def norm(text):
-    text = text.replace('---', '—').replace('--', '–').replace('...', '…').replace(',,', '„').replace('"', '”')
+    text = text.replace('---', '—').replace('--', '–').replace('...', '…').replace(',,', '„').replace('"', '”').replace('\n', ' ')
     return text