implement quit api. indicate if backend is offline
This commit is contained in:
parent
67ad0a82e9
commit
5d4ed8ffbc
8 changed files with 83 additions and 35 deletions
|
|
@ -6,8 +6,7 @@ from ox.cache import get_json, store
|
|||
import ox.web.google
|
||||
import stdnum.isbn
|
||||
|
||||
from oml.utils import get_language
|
||||
from .utils import find_isbns
|
||||
from .utils import find_isbns, get_language
|
||||
|
||||
import logging
|
||||
logger = logging.getLogger(__name__)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue