aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2025-09-12 19:02:00 +0800
committer简律纯 <i@jyunko.cn>2025-09-12 19:02:00 +0800
commit2e7cff9561b439485d3bff4d0cad4d0251ee7d24 (patch)
treee23e8b575c718a230670482a3590da8c85fd0508
parent0aafea34595cffa5eaeb951ba3c18d04c46eb3a7 (diff)
downloadOneRoll-2e7cff9561b439485d3bff4d0cad4d0251ee7d24.tar.gz
OneRoll-2e7cff9561b439485d3bff4d0cad4d0251ee7d24.zip
chore: remove README.rst as part of project restructuring
-rw-r--r--README.md (renamed from README.rst)53
1 files changed, 28 insertions, 25 deletions
diff --git a/README.rst b/README.md
index 868d783..edfca7a 100644
--- a/README.rst
+++ b/README.md
@@ -9,6 +9,7 @@ Overview
OneRoll is a high-performance dice expression parser and roller, implemented in Rust and exposed to Python via PyO3. It supports complex dice expressions, modifiers, mathematical operations, and user comments.
Features
+
--------
- Basic dice rolling (XdY)
@@ -24,23 +25,23 @@ Features
Installation
------------
-.. code-block:: shell
-
- pip install oneroll
+```shell
+pip install oneroll
+```
Or build from source:
-.. code-block:: shell
-
- maturin build
- pip install target/wheels/oneroll-*.whl
+```shell
+maturin build
+pip install target/wheels/oneroll-*.whl
+```
Usage
-----
Python SDK Example:
-.. code-block:: python
+```python
import oneroll
@@ -55,19 +56,21 @@ Python SDK Example:
# Use OneRoll class
roller = oneroll.OneRoll()
result = roller.roll("2d6! # Exploding dice")
+```
Command Line Example:
-.. code-block:: shell
+```shell
- python -m oneroll "3d6 + 2"
- python -m oneroll --stats "3d6" --times 100
+python -m oneroll "3d6 + 2"
+python -m oneroll --stats "3d6" --times 100
+```
Terminal UI:
-.. code-block:: shell
-
- python -m oneroll.tui
+```shell
+python -m oneroll.tui
+```
Dice Expression Syntax
----------------------
@@ -80,20 +83,20 @@ Dice Expression Syntax
Examples
--------
-.. code-block:: python
+```python
+# Basic
+result = oneroll.roll("3d6 + 2")
- # Basic
- result = oneroll.roll("3d6 + 2")
-
- # D&D attribute roll
- result = oneroll.roll("4d6kh3 # Attribute")
+# D&D attribute roll
+result = oneroll.roll("4d6kh3 # Attribute")
- # Statistical analysis
- stats = oneroll.roll_statistics("3d6", 100)
+# Statistical analysis
+stats = oneroll.roll_statistics("3d6", 100)
- # Comment usage
- result = oneroll.roll("1d20 + 5 # Attack check")
- print(result["comment"])
+# Comment usage
+result = oneroll.roll("1d20 + 5 # Attack check")
+print(result["comment"])
+```
Documentation
-------------