+ sync utils
This commit is contained in:
1 parent
238e4b9682
commit
0693e7c758
10 files changed
+736
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import os
|
||||
import re
|
||||
import settings
|
||||
|
||||
__author__ = 'Roman Timashev'
|
||||
|
||||
__check_description_filename_exp = re.compile('^[%s]+(\[\d+\])\.md$' % settings.description_available_chars)
|
||||
|
||||
|
||||
def check_description_filename(filename):
|
||||
return __check_description_filename_exp.match(filename)
|
||||
|
||||
|
||||
def suggest_description_filename(filename):
|
||||
bn = os.path.basename(filename)
|
||||
bn = os.path.splitext(bn)[0]
|
||||
v = settings.default_description_version
|
||||
return '%s [%s].md' % (bn, v)
|
||||
Reference in new issue
Block a user