Skip to main content

Preview Rst Document Instantly

Project description

Version:
0.9.0.9
WHAT’S NEW

Now, You Can View The Page within lan.

This is a server for preview rst document instantly.

You can use it with instantRst.vim

https://github.com/Rykka/github_things/raw/master/image/rst_quick_start.gif

riv.vim (vim) + InstantRst (web server) + rhythm.css (theme)


Install

# Got some issue on pypi
# sudo pip install instant-rst
sudo pip install https://github.com/Rykka/instant-rst.py/archive/master.zip

Useage

usage: instantRst [-h] [-f FILENAME] [-b BROWSER] [-p PORT] [-s STATIC_DIR] [-t TEMPLATE_DIR]

optional arguments:

-h, --help

show this help message and exit

-f FILENAME, --file FILENAME

The local filename for Converting

-b BROWSER, --browser BROWSER

The browser command for viewing Default is ‘firefox’

-p PORT, --port PORT

The port for server to use Default is ‘5676’

-t TEMPLATE_DIR, --template-dir TEMPLATE_DIR

Directory containing a template to be used when rendering the output. Defaults to a bundled rhythm.css

-s STATIC_DIR, --static-dir STATIC_DIR

The directory containing static files used by the template. Defaults to a bundled rhythm.css

-l, --localhost-only

Only use localhost, disable lan ip default: False

To convert a rst document

You can start with instantRst -f file.rst

Then the brower will opened the converted file at http://localhost:<port>

API

Action

Http Method

Request Body or Param

Curl Command

Show Converted file

GET

?file=/pat/to/file.rst

When file is omitted, Then a default index page will be opened.

curl http://localhost:5676?file=/tmp/test.rst

Refresh window with

a file and scroll to a position(a float)

POST

or PUT

{file:file.rst, p:pos}

When file is omitted, Then will only scroll to that pos

curl -d file='file.name' -d p='0.3' http://localhost:5676

Close Server

DELETE

curl -X DELETE http://localhost:5676

Issues

for debian user, you may need to install gevent manually

sudo apt-get install libevent-dev
sudo apt-get install python-all-dev
sudo pip install greenlet
sudo pip install gevent

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

instant-rst-0.9.1.0.tar.gz (11.9 kB view details)

Uploaded Source

File details

Details for the file instant-rst-0.9.1.0.tar.gz.

File metadata

File hashes

Hashes for instant-rst-0.9.1.0.tar.gz
Algorithm Hash digest
SHA256 fdc2e127ae6271ef6ce059df2d3aeeeabff59ad3bfdf87e055c4f1280d1c8da5
MD5 262efd57561e2416d93a0cd9f2dea513
BLAKE2b-256 e7f0814d423a737fa67ffe4996b798c5b5c66bd6cd66265173e9f1ce85e254f5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page