Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
omassot committed Jan 16, 2020
1 parent b1071d6 commit 37e5cb7
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 21 deletions.
41 changes: 26 additions & 15 deletions docs/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,45 @@ Run ``python roll.py [options] <expr>``

::

Usage:
roll [options] <expr>

Options:
-s Numeric score only
-v Verbose result

-h --help Displays help message
--version Displays current xdice version
usage: roll [-h] [-V] [-n] [-v] expression [expression ...]
Command Line Interface for the xdice library
positional arguments:
expression mathematical expression(s) containing dice <n>d<s> patterns
optional arguments:
-h, --help show this help message and exit
-V, --version print the xdice version string and exit
-n, --num_only print numeric result only
-v, --verbose print a verbose result

- Basic use

::

python roll 1d6+1
>> 2 ([1]+1)
python roll.py 1d6+1
>> 4 ([3]+1)
- Multiple expressions

::

python roll.py 1d6+1 2d8
>> 6 ([5]+1)
>> 9 ([3, 6])

- Numeric score only (-s)
- Numeric score only (-n)

::

python roll -s 1d6+1
python roll.py -n 1d6+1
>> 2

- Verbose (-v)

::

python roll -v 2*(3D6L1+2D4)+R3(1d4+2)
>> (2*(3d6l1(scores:[5, 6], dropped:[3])+2d4(scores:[2, 1]))+(1d4(scores:[4])+2+1d4(scores:[1])+2+1d4(scores:[4])+2))
python roll.py -v 2*(3D6L1+2D4)+R3(1d4+2)
>> 32 (2*(3d6l1(scores:[1, 3], dropped:[1])+2d4(scores:[1, 4]))+(1d4(scores:[2])+2+1d4(scores:[2])+2+1d4(scores:[4])+2))
10 changes: 5 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@

# General information about the project.
project = 'xdice'
copyright = '2017, Olivier Massot'
copyright = '2020, Olivier Massot'
author = 'Olivier Massot'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '1.0.0'
version = '1.2.1'
# The full version, including alpha/beta/rc tags.
release = '1.0.0'
release = '1.2.1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -164,8 +164,8 @@
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'xdice', 'xdice Documentation',
author, 'xdice', 'One line description of project.',
'Miscellaneous'),
author, 'xdice', 'The swiss knife for Dice roll : Command line, API, advanced dice notation parser, compilable patterns...etc.',
''),
]


Expand Down
2 changes: 1 addition & 1 deletion docs/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Presentation
*xdice* is a dice library for Python that provides the main functionality
for managing dice, scores, and dice notation patterns.

DiceRollParser has been tested with python 3.3+.
DiceRollParser has been tested with python 3.4+.
*xdice* is under GNU License

To install:
Expand Down

0 comments on commit 37e5cb7

Please sign in to comment.