From a481e9c0558a435f6656a9e284f6783e2ed0046c Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Sat, 26 May 2018 04:29:40 +0530 Subject: [PATCH] From rust to markdown --- bukuserver/README.md | 64 +++++++++++++++++++++++++++++++++ bukuserver/README.rst | 84 ------------------------------------------- 2 files changed, 64 insertions(+), 84 deletions(-) create mode 100644 bukuserver/README.md delete mode 100644 bukuserver/README.rst diff --git a/bukuserver/README.md b/bukuserver/README.md new file mode 100644 index 0000000..7d23b58 --- /dev/null +++ b/bukuserver/README.md @@ -0,0 +1,64 @@ +## Bukuserver + +### Table of Contents + +- [Installation](#installation) + - [Installing dependencies](#installing-dependencies) + - [Installing from PyPi](#installing-from-pypi) +- [Webserver options](#webserver-options) +- [Configuration](#configuration) + +### Installation + +You need to have some packages before you install `bukuserver` on your server. +So be sure to have `python3`, `python3-pip` , `python3-dev`, `libffi-dev` packages from your distribution. + +#### Installing dependencies + +``` +$ python3 -m pip install --user --upgrade pip +$ python3 -m pip install --user virtualenv +$ python3 -m virtualenv env +$ source env/bin/activate +$ git clone https://github.com/jarun/Buku +$ cd Buku +$ pip3 install .[server] +``` + +#### Installing from PyPi + + $ pip3 install buku[server] + +### Webserver options + +To run the server on host 127.0.0.1, port 5001, run following command: + + $ bukuserver run --host 127.0.0.1 --port 5001 + +Visit `127.0.0.1:5001` in your browser to access your bookmarks. + +See more option on `bukuserver run --help` and `bukuserver --help` + +### Configuration + +Following are available os env config available for bukuserver. + +| Name (without prefix) and description | Value | +| --- | --- | +| PER_PAGE (bookmarks per page) | positive integer [default: 10] | +| SECRET_KEY (server secret key) | string [default: os.urandom(24)] | +| URL_RENDER_MODE (url render mode) | `full` or `netloc` [default: `full`] | + +Note: `BUKUSERVER_` is the common prefix. + +Note: if input is invalid, the default value will be used + +e.g. to set bukuserver to show 100 item per page run the following command + +``` +# on linux +$ export BUKUSERVER_PER_PAGE=100 + +# on windows +$ SET BUKUSERVER_PER_PAGE=100 +``` diff --git a/bukuserver/README.rst b/bukuserver/README.rst deleted file mode 100644 index 84ec3ea..0000000 --- a/bukuserver/README.rst +++ /dev/null @@ -1,84 +0,0 @@ -Bukuserver -========== - -Install server --------------- - -You need to have some packages before you install `bukuserver` on your server. -So be sure to have `python3`, `python3-pip` , `python3-dev`, `libffi-dev` packages from your distribution. - -Installing PIP, virtualenv and dependencies -------------------------------------------- - -.. code:: shell - - $ python3 -m pip install --user --upgrade pip - $ python3 -m pip install --user virtualenv - $ python3 -m virtualenv env - $ source env/bin/activate - $ git clone https://github.com/jarun/Buku - $ cd Buku - $ pip3 install .[server] - -Installing buku and bukuserver from PIP ---------------------------------------- - -.. code:: shell - - $ pip3 install buku[server] - -Webserver options ------------------ - -To run the server on host 127.0.0.1, port 5001, run following command: - -.. code:: shell - - $ bukuserver run --host 127.0.0.1 --port 5001 - -Visit `127.0.0.1:5001` in your browser to access your bookmarks. - -See more option on `bukuserver run --help` and `bukuserver --help` - -Webserver Env config --------------------- - -Following are available os env config available for bukuserver. - -+-----------------------+------------------------------------+ -| Name (without prefix) | Value and description | -+-----------------------+------------------------------------+ -| PER_PAGE | v: [:code:`10`]/(positive integer) | -| | | -| | Bookmark entry per page. | -+-----------------------+------------------------------------+ -| SECRET_KEY | v: [(os.urandom(24))]/(string) | -| | | -| | Server secret key. | -+-----------------------+------------------------------------+ -| URL_RENDER_MODE | v: [:code:`full`]/:code:`netloc` | -| | | -| | Url render mode. | -+-----------------------+------------------------------------+ - -Note: If any invalid input given, default value will be used - -Note: to use it add `BUKUSERVER_` as prefix. - -ie to set bukuserver to show 100 item per page run the following command - -.. code:: - - # on linux - $ export BUKUSERVER_PER_PAGE=100 - - # on windows - $ SET BUKUSERVER_PER_PAGE=100 - -CAUTION -------- - -This snapshot of web APIs is indicative. -The program APIs are bound to change and if you need these, -you may have to adapt the APIs to the current signature/return type etc. -We are NOT actively updating these whenever an API changes in the main program.