aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorHsiangNianian <i@jyunko.cn>2025-03-14 22:43:01 +0800
committerHsiangNianian <i@jyunko.cn>2025-03-14 22:43:01 +0800
commit6d3a6d851d88e572e2125932febfb9844064a7d1 (patch)
treed1b4f128cd5256fa6cedfde08fc792399d9e1edb
parent9b696f003a2b7da575ea086c6ddc0c579a13f46b (diff)
downloadconventional_role_play-6d3a6d851d88e572e2125932febfb9844064a7d1.tar.gz
conventional_role_play-6d3a6d851d88e572e2125932febfb9844064a7d1.zip
chore: replace README.rst with README.md and update pyproject.toml to reference new README format
-rw-r--r--README.md80
-rw-r--r--README.rst91
-rw-r--r--pyproject.toml3
3 files changed, 81 insertions, 93 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..dba71ff
--- /dev/null
+++ b/README.md
@@ -0,0 +1,80 @@
+# Conventional Role Play
+
+## Overview
+
+Conventional Role Play (CRP) is a Python SDK designed for structured processing of tabletop role-playing game (TRPG) logs. It provides functionalities for parsing logs, extracting rules, and rendering outputs in multiple formats. This SDK aims to streamline the analysis and presentation of TRPG session data.
+
+> **Note**
+> This documentation is still under construction. Contributions are welcome! See contributing for more information.
+
+## Key Features
+
+* **Rule Extraction**: Easily extract rules from JSON configuration files using the `RuleExtractor` class.
+* **Multi-format Rendering**: Render outputs in various formats such as HTML, Markdown, and JSON using the respective renderer classes (e.g., `HTMLRenderer`).
+* **Extensibility**: Create custom plugins to extend the functionality of the SDK. See custom-plugins for details.
+* **Comprehensive API**: Full API documentation available for all modules and classes. See api-documentation.
+
+## Installation
+
+To install Conventional Role Play, you can use pip:
+
+```bash
+pip install conventionalrp
+```
+
+## Basic Usage
+
+Here is a simple example of how to use the TRPG Log Processor:
+
+```python
+from conventionalrp.core.parser import Parser
+from conventionalrp.core.processor import Processor
+from conventionalrp.extractors.rule_extractor import RuleExtractor
+from conventionalrp.renderers.html_renderer import HTMLRenderer
+
+# Step 1: Load rules
+rule_extractor = RuleExtractor()
+rules = rule_extractor.load_rules('path/to/rules.json')
+
+# Step 2: Parse the log
+parser = Parser(rules)
+parsed_log = parser.parse_log('path/to/log.txt')
+
+# Step 3: Process the parsed tokens
+processor = Processor()
+output = processor.process_tokens(parsed_log)
+
+# Step 4: Render the output
+renderer = HTMLRenderer()
+html_output = renderer.render(output)
+
+# Save or display the output
+with open('output.html', 'w') as f:
+ f.write(html_output)
+```
+
+## Custom Plugins
+
+To create a custom plugin, you can follow the example provided in
+
+custom_plugin.py
+
+. This allows you to add additional processing or rendering capabilities tailored to your needs.
+
+## API Documentation
+
+For more detailed information on the API and available classes, please refer to the [API documentation](https://crp.hydroroll.team/api.html).
+
+## License
+
+This project is licensed under the AGPLv3.0 License - see the
+
+LICENSE
+
+ file for details.
+
+## Project Links
+
+* [Homepage](https://hydroroll.team/)
+* [Documentation](https://crp.hydroroll.team/)
+* [GitHub Repository](https://github.com/HydroRoll-Team/conventional_role_play) \ No newline at end of file
diff --git a/README.rst b/README.rst
deleted file mode 100644
index fe57e5a..0000000
--- a/README.rst
+++ /dev/null
@@ -1,91 +0,0 @@
-Conventional Role Play
-======================
-
-.. image:: https://cdn.jsdelivr.net/gh/HydroRoll-Team/HydroRoll@main/docs/_static/logo.png
- :alt: HydroRoll Logo
- :width: 200px
- :align: center
-
-Overview
---------
-
-Conventional Role Play (CRP) is a Python SDK designed for structured processing of tabletop role-playing game (TRPG) logs. It provides functionalities for parsing logs, extracting rules, and rendering outputs in multiple formats. This SDK aims to streamline the analysis and presentation of TRPG session data.
-
-.. note::
- This documentation is still under construction. Contributions are welcome! See :ref:`contributing` for more information.
-
-Key Features
-------------
-
-* **Rule Extraction**: Easily extract rules from JSON configuration files using the :class:`RuleExtractor <conventionalrp.extractors.rule_extractor.RuleExtractor>`.
-* **Multi-format Rendering**: Render outputs in various formats such as HTML, Markdown, and JSON using the respective renderer classes (e.g., :class:`HTMLRenderer <conventionalrp.renderers.html_renderer.HTMLRenderer>`).
-* **Extensibility**: Create custom plugins to extend the functionality of the SDK. See :ref:`custom-plugins` for details.
-* **Comprehensive API**: Full API documentation available for all modules and classes. See :ref:`api-documentation`.
-
-Installation
-------------
-
-To install Conventional Role Play, you can use pip:
-
-.. code-block:: bash
-
- pip install conventionalrp
-
-Basic Usage
------------
-
-Here is a simple example of how to use the TRPG Log Processor:
-
-.. code-block:: python
-
- from conventionalrp.core.parser import Parser
- from conventionalrp.core.processor import Processor
- from conventionalrp.extractors.rule_extractor import RuleExtractor
- from conventionalrp.renderers.html_renderer import HTMLRenderer
-
- # Step 1: Load rules
- rule_extractor = RuleExtractor()
- rules = rule_extractor.load_rules('path/to/rules.json')
-
- # Step 2: Parse the log
- parser = Parser(rules)
- parsed_log = parser.parse_log('path/to/log.txt')
-
- # Step 3: Process the parsed tokens
- processor = Processor()
- output = processor.process_tokens(parsed_log)
-
- # Step 4: Render the output
- renderer = HTMLRenderer()
- html_output = renderer.render(output)
-
- # Save or display the output
- with open('output.html', 'w') as f:
- f.write(html_output)
-
-Custom Plugins
---------------
-
-To create a custom plugin, you can follow the example provided in :file:`examples/custom_plugin.py`. This allows you to add additional processing or rendering capabilities tailored to your needs.
-
-API Documentation
------------------
-
-For more detailed information on the API and available classes, please refer to the `API documentation <https://crp.hydroroll.team/api.html>`_.
-
-License
--------
-
-This project is licensed under the AGPLv3.0 License - see the `LICENSE <LICENSE>`_ file for details.
-
-Project Links
--------------
-
-* `Homepage <https://hydroroll.team/>`_
-* `Documentation <https://crp.hydroroll.team/>`_
-* `GitHub Repository <https://github.com/HydroRoll-Team/conventional_role_play>`_
-
-.. _contributing: contributing.html
-.. _api-documentation: api.html
-.. _LICENSE: LICENSE
-.. _custom-plugins: examples/custom_plugin.py \ No newline at end of file
diff --git a/pyproject.toml b/pyproject.toml
index 71d6eaf..37f1421 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -9,8 +9,7 @@ description = "HydroRoll Conventional Role Play SDK"
authors = [{ name = "HsiangNianian", email = "leader@hydroroll.team" }]
dependencies = []
requires-python = ">=3.9"
-readme.content-type = "text/x-rst"
-readme.file = "README.rst"
+readme = "README.md"
license = { text = "AGPLv3.0" }
keywords = ["hydroroll"]
classifiers = [