summaryrefslogtreecommitdiff
path: root/sphinx/util/osutil.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-11-11 19:48:50 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-11-11 21:57:14 +0900
commitbdaedbcbe496a84ae56160c36637b01bb91ed3ff (patch)
tree9c6b4b9087c67e899fa01f3be1405391fb6399b3 /sphinx/util/osutil.py
parent4c96c6efce9975919f0bdd675eff4f862c0beeae (diff)
downloadsphinx-git-bdaedbcbe496a84ae56160c36637b01bb91ed3ff.tar.gz
quickstart: Simplify generated conf.py (for texinfo)
Diffstat (limited to 'sphinx/util/osutil.py')
-rw-r--r--sphinx/util/osutil.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/sphinx/util/osutil.py b/sphinx/util/osutil.py
index c7c0b0690..1dd8e67dc 100644
--- a/sphinx/util/osutil.py
+++ b/sphinx/util/osutil.py
@@ -145,6 +145,7 @@ def copyfile(source, dest):
no_fn_re = re.compile(r'[^a-zA-Z0-9_-]')
+project_suffix_re = re.compile(' Documentation$')
def make_filename(string):
@@ -152,6 +153,11 @@ def make_filename(string):
return no_fn_re.sub('', string) or 'sphinx'
+def make_filename_from_project(project):
+ # type: (str) -> unicode
+ return make_filename(project_suffix_re.sub('', project)).lower()
+
+
def ustrftime(format, *args):
# type: (unicode, Any) -> unicode
"""[DEPRECATED] strftime for unicode strings."""