implement quit api. indicate if backend is offline

This commit is contained in:
j 2016-01-08 10:02:24 +05:30
commit 5d4ed8ffbc
8 changed files with 83 additions and 35 deletions

View file

@ -5,6 +5,7 @@
import re
import stdnum.isbn
import ox
def normalize_isbn(value):
return ''.join([s for s in value if s.isdigit() or s == 'X'])
@ -21,3 +22,5 @@ def find_isbns(text):
'0' * 13,
)]
def get_language(lang):
return ox.iso.codeToLang(lang.split('-')[0]) or lang