From 27f48ef26c3a76ae4ccc7d7f4310fc0f499f8b9c Mon Sep 17 00:00:00 2001 From: ohbarye Date: Tue, 2 Aug 2016 02:06:48 +0900 Subject: [PATCH 1/2] Prepare release 0.1.2 --- README.rst | 12 +++++++++++- setup.py | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index c73cb31..bd8775f 100644 --- a/README.rst +++ b/README.rst @@ -30,7 +30,7 @@ Just try Start server ------------ -You don't need any special preparation to try to start server. Just execute below comands. +You don't need any special preparation to try to start server. Just execute below commands. :: @@ -43,6 +43,16 @@ You don't need any special preparation to try to start server. Just execute belo Bottle v0.12.8 server starting up (using WSGIRefServer())... Listening on http://localhost:8009/ +Or, you can install from PyPi. + +:: + + (.venv)$ pip install markdown-server + (.venv)$ markdownserver + Bottle v0.12.8 server starting up (using WSGIRefServer())... + Listening on http://localhost:8009/ + + If server start up successfully, browse below URL and check the converted result. :: diff --git a/setup.py b/setup.py index 292e356..a008a71 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ def read_file(filename): setup( name = 'markdown-server', - version = '0.1.1', + version = '0.1.2', description = 'A simple markdown server.', long_description = read_file('README.rst'), author = 'Masato Ohba', From 67ebac4fad27eaf9284f1192ef507de65042652d Mon Sep 17 00:00:00 2001 From: ohbarye Date: Tue, 2 Aug 2016 02:24:58 +0900 Subject: [PATCH 2/2] Fix bug related to path --- markdownserver/__init__.py | 2 +- markdownserver/markdown_converter.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/markdownserver/__init__.py b/markdownserver/__init__.py index cedd2ca..8b15765 100644 --- a/markdownserver/__init__.py +++ b/markdownserver/__init__.py @@ -9,7 +9,7 @@ converter = MarkdownConverter() def gfmize(resource): html_file_name = os.path.basename(converter.convert(resource)) - return static_file(os.path.join(html_dir, html_file_name), root=root_path) + return static_file(os.path.join('resources/html', html_file_name), root=root_path) def main(): run(host=ms_host,port=ms_port,debug=ms_debug,reloader=ms_reloader) diff --git a/markdownserver/markdown_converter.py b/markdownserver/markdown_converter.py index 45bf2c1..54312a0 100644 --- a/markdownserver/markdown_converter.py +++ b/markdownserver/markdown_converter.py @@ -36,7 +36,7 @@ class MarkdownConverter(object): return md_file.read() def write_html(self,body,file_name,dst): - html_path = os.path.join(html_root, file_name + html_extension) + html_path = os.path.join(html_dir, file_name + html_extension) if dst != "": html_path = dst