1+ .. image :: https://raw.githubusercontent.com/PtPrashantTripathi/markdown-server/master/markdownserver-logo.webp
2+ :alt: "Markdown Server Logo"
3+ :width: 300px
4+ :align: center
5+
16===============
27Markdown Server
38===============
49
510Markdown-server is a simple web application.
6- It converts markdown file to HTML and response by `text/html `.
11+ It converts markdown files to HTML and responds with `text/html `.
712
813How to use
914==========
@@ -29,63 +34,112 @@ Just try
2934Start server
3035------------
3136
32- You don't need any special preparation to try to start server. Just execute below commands .
37+ You can install ` markdown-server ` from ** PyPi ** or run it directly from the repository .
3338
39+ ### Install from PyPi:
40+ ::
41+
42+ (.venv)$ pip install markdown-server
43+ (.venv)$ markdownserver --host localhost --port 8009 --debug
44+
45+ Bottle v0.12.8 server starting up (using WSGIRefServer())...
46+ Listening on http://localhost:8009/
47+
48+ ### Install from GitHub:
3449::
3550
3651 $ git clone https://github.com/ohbarye/markdown-server
3752 $ cd markdown-server
3853 $ virtualenv .venv
3954 $ source .venv/bin/activate
4055 (.venv)$ pip install -r requirements.txt
41- (.venv)$ markdownserver
56+ (.venv)$ markdownserver --host localhost --port 8009 --debug
4257 Bottle v0.12.8 server starting up (using WSGIRefServer())...
4358 Listening on http://localhost:8009/
4459
45- Or, you can install from PyPi .
60+ If the server starts up successfully, browse the below URL and check the converted result .
4661
4762::
4863
49- (.venv)$ pip install markdown-server
50- (.venv)$ markdownserver
51- Bottle v0.12.8 server starting up (using WSGIRefServer())...
52- Listening on http://localhost:8009/
64+ $ open http://localhost:8009/sample.md
5365
66+ MarkdownServer CLI
67+ ------------------
5468
55- If server start up successfully, browse below URL and check the converted result.
69+ You can run the ` markdownserver ` command to start the server with the following examples:
5670
71+ ### Example 1: Using Default Arguments
5772::
5873
59- $ open http://localhost:8009/sample.md
74+ (.venv)$ markdownserver
75+
76+ This will run the server on the default host (`localhost `) and port (`8009 `), with debugging disabled.
77+
78+ ### Example 2: Custom Host, Port, and Debug
79+ ::
80+
81+ (.venv)$ markdownserver --host 0.0.0.0 --port 8080 --debug
82+
83+ This will run the server on `0.0.0.0:8080 ` with debugging enabled, allowing you to access the server from any device on your local network.
84+
85+ **Arguments: **
86+ - `--host `: Specify the host to run the server on (default is `localhost `).
87+ - `--port `: Specify the port to run the server on (default is `8009 `).
88+ - `--debug `: Enable or disable debugging mode (default is `False `).
6089
6190Only Conversion
6291---------------
6392
64- Additionally, You can use the conversion function alone.
93+ Additionally, you can use the conversion function alone from the command line.
94+
95+ ::
96+
97+ (.venv)$ markdownconvert source_md_file target_html_file
98+
99+ This will convert the provided markdown file (`source_md_file `) into an HTML file (`target_html_file `).
100+
101+ MarkdownConverter CLI
102+ ---------------------
103+
104+ The `markdownconvert ` command can be used with the following options:
65105
66106::
67107
68- (.venv)$ convert source_md_file target_html_file
108+ $ markdownconvert source_md_file target_html_file
109+
110+ **Arguments: **
111+ - `source_md_file `: The markdown file you want to convert to HTML.
112+ - `target_html_file `: The output HTML file to save the converted content.
113+
114+ Example:
115+
116+ ::
117+
118+ $ markdownconvert sample.md sample.md.html
119+
120+ This will convert the `sample.md ` file into a `sample.md.html ` file in the current directory.
69121
70122--------------
71123Do as you like
72124--------------
73125
74- - Markdown server purvey `http://host/[file_name] ` URL. This corresponds to `resources/markdown/[file_name] `.You can put any markdown file here.
75-
76- - Converted file will be placed to `resources/html ` directory. Generated html file includes CSS so it's ease to distribute.
77-
78- - Environment variables like *host name * or *port number * are set in `env.py `. Edit arbitrarily.
126+ - The Markdown server provides `http://host/[file_name] ` URL. You can place any markdown file here.
79127
80- ::
128+ - The converted HTML file will be placed in the ` resources/html ` directory. The generated HTML file includes CSS for easy distribution.
81129
82- ms_port = '8009'
83- ms_host = 'localhost'
130+ Developers Information
131+ ======================
84132
133+ 1. **Masato Ohba **
134+ - GitHub: `@ohbarye <https://github.com/ohbarye> `
135+ .. image :: https://avatars.githubusercontent.com/u/1811616
136+ :alt: "Masato Ohba"
137+ :width: 200px
85138
86- - The default markdown engine is Github flavored Markdown. If you want to use another style, add CSS and edit `env.py `.
139+ 2. **Pt. Prashant Tripathi **
140+ - GitHub: `@ptprashanttripathi <https://github.com/ptprashanttripathi> `
141+ .. image :: https://avatars.githubusercontent.com/u/26687933
142+ :alt: "Pt. Prashant Tripathi"
143+ :width: 200px
87144
88- ::
89145
90- css_name = 'github.css'
91- markdown_type = 'gfm'
0 commit comments