From eb9920ac382e606dada283a03fca6ddee80064a3 Mon Sep 17 00:00:00 2001 From: Charpentier Johan Date: Wed, 26 Sep 2012 17:02:44 +0200 Subject: Fix bug with relative/real path --- mkdocs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkdocs.py b/mkdocs.py index 8e1010db..268142f4 100755 --- a/mkdocs.py +++ b/mkdocs.py @@ -6,7 +6,7 @@ import re import shutil import sys -root_dir = os.path.dirname(__file__) +root_dir = os.path.abspath(os.path.split(__file__)[0]) docs_dir = os.path.join(root_dir, 'docs') html_dir = os.path.join(root_dir, 'html') @@ -60,7 +60,7 @@ for (dirpath, dirnames, filenames) in os.walk(docs_dir): content = markdown.markdown(text, ['headerid']) - build_dir = os.path.join(html_dir, dirpath.lstrip(docs_dir)) + build_dir = os.path.join(html_dir, dirpath.partition(docs_dir)[2].lstrip("/")) build_file = os.path.join(build_dir, filename[:-3] + '.html') if not os.path.exists(build_dir): -- cgit v1.2.3 From efe26e3a3281c4663a5e500f764fb9a7068049cd Mon Sep 17 00:00:00 2001 From: Charpentier Johan Date: Thu, 27 Sep 2012 13:43:35 +0200 Subject: Improve changes with upstream's advices --- mkdocs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mkdocs.py b/mkdocs.py index 268142f4..e88b210d 100755 --- a/mkdocs.py +++ b/mkdocs.py @@ -6,7 +6,7 @@ import re import shutil import sys -root_dir = os.path.abspath(os.path.split(__file__)[0]) +root_dir = os.path.abspath(os.path.dirname(__file__)) docs_dir = os.path.join(root_dir, 'docs') html_dir = os.path.join(root_dir, 'html') @@ -60,7 +60,8 @@ for (dirpath, dirnames, filenames) in os.walk(docs_dir): content = markdown.markdown(text, ['headerid']) - build_dir = os.path.join(html_dir, dirpath.partition(docs_dir)[2].lstrip("/")) + category_dir = dirpath.replace(docs_dir, '').lstrip(os.path.sep) + build_dir = os.path.join(html_dir, category_dir) build_file = os.path.join(build_dir, filename[:-3] + '.html') if not os.path.exists(build_dir): -- cgit v1.2.3 From f3e7acde145974ae23a2ae08ea6b72b53011bde9 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Thu, 27 Sep 2012 14:27:40 +0200 Subject: Rename category_dir to relative_dir --- mkdocs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkdocs.py b/mkdocs.py index e88b210d..8ccd75e5 100755 --- a/mkdocs.py +++ b/mkdocs.py @@ -60,8 +60,8 @@ for (dirpath, dirnames, filenames) in os.walk(docs_dir): content = markdown.markdown(text, ['headerid']) - category_dir = dirpath.replace(docs_dir, '').lstrip(os.path.sep) - build_dir = os.path.join(html_dir, category_dir) + relative_dir = dirpath.replace(docs_dir, '').lstrip(os.path.sep) + build_dir = os.path.join(html_dir, relative_dir) build_file = os.path.join(build_dir, filename[:-3] + '.html') if not os.path.exists(build_dir): -- cgit v1.2.3 From 8582b18ac4f7258acd559c3deac21cee9ae7727d Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Thu, 27 Sep 2012 14:29:14 +0200 Subject: Added @cyberj. Thanks! --- docs/topics/credits.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/topics/credits.md b/docs/topics/credits.md index 3111254d..b280dba2 100644 --- a/docs/topics/credits.md +++ b/docs/topics/credits.md @@ -42,6 +42,7 @@ The following people have helped make REST framework great. * Alec Perkins - [alecperkins] * Michael Barrett - [phobologic] * Mathieu Dhondt - [laundromat] +* Johan Charpentier - [cyberj] Many thanks to everyone who's contributed to the project. @@ -105,4 +106,5 @@ To contact the author directly: [shawnlewis]: https://github.com/shawnlewis [alecperkins]: https://github.com/alecperkins [phobologic]: https://github.com/phobologic -[laundromat]: https://github.com/laundromat \ No newline at end of file +[laundromat]: https://github.com/laundromat +[cyberj]: https://github.com/cyberj \ No newline at end of file -- cgit v1.2.3