value = re.sub('[^a-zA-Z0-9\\s\\-]{1}', replace_char, value)
value = value.lower()
value = re.sub(r'[^a-z0-9{|}]+', '~', value)
-
+
return value.encode('ascii', 'ignore')
'initial.db-%d' % last_checked,
target,
)
-
+
book_sql = """
(:id, :category, :name, :sort_key, :book_ids);
"""
categories = {'author': 'autor',
- 'epoch': 'epoka',
- 'genre': 'gatunek',
- 'kind': 'rodzaj',
+ 'epoch': 'epoka',
+ 'genre': 'gatunek',
+ 'kind': 'rodzaj',
'theme': 'motyw'
}
def add_tag(db, tag):
id = tag.id
- # category = categories[tag.category] # localized names here?
- category = tag.category
+ category = categories[tag.category]
name = tag.name
sort_key = tag.sort_key