This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

WHAT’S NEW

  1. static files are served, the file in the same dir can be get with _static/file
  2. The index file will always show from remote’s main file
  3. Improved Style: Using mars.css
  4. add debug to stop open browser
  5. add error log and error page

This is a server for preview rst document instantly.

You can use it with instantRst.vim

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

Usage

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 ” for using system default
-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
-d, --additional-dir
 Additional directories to serve. One time per directory.
--debug-dir Debug mode, Do not open browser
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

STATIC FILES

  1. Default Static file:

    the static/main.css|js is served there

    The instant rst’s default theme is set there.

    You can pass the -s for default static directory.

  2. Additional Static file:

    You can pass the -d for additional static directory.

    The basename of the directory is used as the static file’s STATIC URL

    e.g.:

    You have a file named test/test.jpg

    You can start instantRst with instantRst -f test/test.rst -d test

    then the file is served with localhost:5676/test/test.jpg

  3. Dynamic static file:

    When using with dynamic files, you can post with ‘-dir=DYN_DIR_NAME’ to update the DYN_STATIC_DIR

    e.g.:

    You have a file named test/test.jpg

    When you start instantRst instantRst -f test/test.rst

    The file is served with localhost:5676/_static/test.jpg

    When you switch to another file like test1/test.rst Then you can post with dir=test1 or dir=~/rst/test1 to change the static dir.

Develop

Contribution are welcomed.

git clone the project:

git clone

install local package:

sudo pip install . --upgrade

start test with local package:

# localhost:5676
python scripts/instantRst --debug -f test/test.rst

change to static/template file should change setup.py and manifest.in

publish to pypi:

# register
# python setup.py register -r pypi

python setup.py sdist upload -r pypi

Error

  1. the template_dir option is not working
Release History

Release History

0.9.2.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.9.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.9.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.9.0.9

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.9.0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.9.0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.9.0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.9.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
instant-rst-0.9.2.2.tar.gz (15.0 kB) Copy SHA256 Checksum SHA256 Source Jan 12, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting