PKG-INFO 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. Metadata-Version: 1.2
  2. Name: xdice
  3. Version: 1.1.4
  4. Summary: The swiss knife for Dice roll : Command line, API (documented!), advanced dice notation parser, compilable patterns...etc.
  5. Home-page: https://github.com/cro-ki/xdice
  6. Author: Olivier Massot
  7. Author-email: croki.contact@gmail.com
  8. License: GNU
  9. Description: |Build Status| |Coverage Status| |Documentation Status|
  10. **xdice**
  11. *xdice* is a lightweight python library for managing dice, scores, and
  12. dice-notation patterns.
  13. - Parse almost any Dice Notation pattern: '1d6+1', 'd20', '3d%', '1d20//2 - 2*(6d6+2)', 'max(1d4+1,1d6)', '3D6L2', 'R3(1d6+1)'...etc.
  14. - API help you to easily manipulate dices, patterns, and scores as objects
  15. - A command line tool for convenience
  16. Python Versions
  17. ^^^^^^^^^^^^^^^
  18. DiceRollParser has been tested with **python 3.3+**
  19. Documentation
  20. ~~~~~~~~~~~~~
  21. For more, see the Documentation_
  22. Examples:
  23. ^^^^^^^^^
  24. ::
  25. import dice
  26. # Roll simple dices with **rolldice()**
  27. score = rolldice(6, amount=2)
  28. # manipulates score as an integer
  29. print(score)
  30. >> 11
  31. print(score * 2)
  32. >> 22
  33. print(score == 11)
  34. >> True
  35. # Or iterates over the results
  36. for result in score:
  37. print(result)
  38. >> 5
  39. >> 6
  40. # Parse patterns with **roll()**
  41. ps = roll("2d6+18")
  42. print(ps)
  43. >> 28
  44. print(ps.format())
  45. >> '[5,6]+18'
  46. ps = roll("6D%L2")
  47. print(ps)
  48. >> 315
  49. print(ps.format(verbose=True))
  50. >> '6D%L2(scores:[80, 70, 76, 89], dropped:[2, 49])'
  51. CLI
  52. ^^^
  53. Run ``python roll.py [options] <expr>``
  54. ::
  55. Usage:
  56. roll [options] <expr>
  57. Options:
  58. -s Numeric score only
  59. -h --help Displays help message
  60. --version Displays current xdice version
  61. CONTRIBUTION
  62. ^^^^^^^^^^^^
  63. Any opinion / contribution is welcome, please contact us.
  64. TO INSTALL
  65. ^^^^^^^^^^
  66. ::
  67. pip install xdice
  68. License
  69. ^^^^^^^
  70. *xdice* is under GNU License
  71. Author
  72. ^^^^^^
  73. Olivier Massot, 2017, with *Cro-ki Lab*
  74. Tags
  75. ^^^^
  76. ::
  77. dice roll d20 game random parser dices role board
  78. .. _Documentation: https://xdice.readthedocs.io/en/latest/
  79. .. |Build Status| image:: https://travis-ci.org/cro-ki/xdice.svg?branch=master
  80. :target: https://travis-ci.org/cro-ki/xdice
  81. .. |Coverage Status| image:: https://coveralls.io/repos/github/cro-ki/xdice/badge.svg?branch=master
  82. :target: https://coveralls.io/github/cro-ki/xdice?branch=master
  83. .. |Documentation Status| image:: https://readthedocs.org/projects/xdice/badge/?version=latest
  84. :target: http://xdice.readthedocs.io/en/latest/?badge=latest
  85. Keywords: xdice roll d20 game random parser dices role board
  86. Platform: UNKNOWN
  87. Classifier: Development Status :: 5 - Production/Stable
  88. Classifier: Intended Audience :: Developers
  89. Classifier: Intended Audience :: Other Audience
  90. Classifier: Topic :: Games/Entertainment :: Board Games
  91. Classifier: Topic :: Games/Entertainment :: Role-Playing
  92. Classifier: Topic :: Games/Entertainment :: Multi-User Dungeons (MUD)
  93. Classifier: Topic :: Games/Entertainment :: Turn Based Strategy
  94. Classifier: License :: OSI Approved :: GNU General Public License (GPL)
  95. Classifier: Programming Language :: Python :: 3.3
  96. Classifier: Programming Language :: Python :: 3.4
  97. Classifier: Programming Language :: Python :: 3.5
  98. Classifier: Programming Language :: Python :: 3.6
  99. Requires-Python: >=3.3