Preview Rst Document Instantly
Project description
This is a server for preview rst document instantly.
Install
sudo pip install instant_rst
Useage
usage: instant_rst.py [-h] [-f FILENAME] [-b BROWSER] [-p PORT]
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’
- To convert a rst document
You can start with python server.py -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 ommited, 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 ommited, 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 |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for instant_rst-0.9.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3988028d35bdb0182da1b05f0699beeebecde211ae9640eb94b967ba81595db |
|
MD5 | a8cd00d6ce6646c8f79939a9f0e6a780 |
|
BLAKE2b-256 | b263afbf071866ff1d8f2b343713cb8eff3b50035989b6fb7d4dfb7b40567824 |