Skip to content

Commit

Permalink
add doc index
Browse files Browse the repository at this point in the history
  • Loading branch information
olinox14 committed Sep 21, 2017
1 parent 99b7862 commit 6c981bc
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 21 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
source_suffix = '.md'

# The master toctree document.
master_doc = 'index'
Expand Down
73 changes: 73 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
**xdice**

*xdice* is a lightweight python library for managing dice, scores, and dice-notation patterns.

It allows to easily interpret literal expressions as rolls of dice ('1d6', '3d4+3', '12d6+1d4'...etc.), then manipulate the results.

#### Python Versions

DiceRollParser has been tested with python 3.3+

#### Examples:

import dice

## Roll simple dices with **rolldice()**

score = rolldice(6, amount=2)

# manipulates score as an integer

print( score, score * 2, score == 11 )
>> 11 22 True


# Iterates over the results

for result in score:
print(result)
>> 5
>> 6

# Parse patterns with **roll()**

ps = roll("2d6+18")

print( ps, ps.format() )
>> 28 '[5,6]+18'


#### CLI

Run `python roll.py [options] <expr>`

Usage:
roll [options] <expr>

Options:
-s Numeric score only

-h --help Displays help message
--version Displays current xdice version


#### CONTRIBUTION

Any opinion / contribution is welcome, please contact us.

#### TO INSTALL

pip install xdice

#### License

*xdice* is under GNU License

#### Author

Olivier Massot, 2017, with *Cro-ki Lab*

#### Tags

dice roll d20 game random parser dices role board

20 changes: 0 additions & 20 deletions docs/index.rst

This file was deleted.

0 comments on commit 6c981bc

Please sign in to comment.