Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ohbarye/markdown-server
Simple markdown server written in Python. It converts your markdown file to HTML and returns a response as text/html.
https://github.com/ohbarye/markdown-server
markdown python
Last synced: 17 days ago
JSON representation
Simple markdown server written in Python. It converts your markdown file to HTML and returns a response as text/html.
- Host: GitHub
- URL: https://github.com/ohbarye/markdown-server
- Owner: ohbarye
- License: mit
- Created: 2015-04-15T12:01:47.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-07-20T13:10:41.000Z (over 1 year ago)
- Last Synced: 2024-10-20T07:30:26.209Z (24 days ago)
- Topics: markdown, python
- Language: Python
- Homepage: https://pypi.python.org/pypi/markdown-server
- Size: 34.2 KB
- Stars: 44
- Watchers: 4
- Forks: 20
- Open Issues: 10
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.txt
Awesome Lists containing this project
README
===============
Markdown Server
===============Markdown-server is a simple web application.
It converts markdown file to HTML and response by `text/html`.How to use
==========--------------------
Runtime Environment
--------------------:Python: 3.7
:pip: 19.1.1--------------------
Library Dependencies
--------------------See `requirements.txt`.
--------
Just try
--------Start server
------------You don't need any special preparation to try to start server. Just execute below commands.
::
$ git clone https://github.com/ohbarye/markdown-server
$ cd markdown-server
$ virtualenv .venv
$ source .venv/bin/activate
(.venv)$ pip install -r requirements.txt
(.venv)$ markdownserver
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.
::
$ open http://localhost:8009/sample.md
Only Conversion
---------------Additionally, You can use the conversion function alone.
::
(.venv)$ convert source_md_file target_html_file
--------------
Do as you like
--------------- Markdown server purvey `http://host/[file_name]` URL. This corresponds to `resources/markdown/[file_name]`.You can put any markdown file here.
- Converted file will be placed to `resources/html` directory. Generated html file includes CSS so it's ease to distribute.
- Environment variables like *host name* or *port number* are set in `env.py`. Edit arbitrarily.
::
ms_port = '8009'
ms_host = 'localhost'- The default markdown engine is Github flavored Markdown. If you want to use another style, add CSS and edit `env.py`.
::
css_name = 'github.css'
markdown_type = 'gfm'