Skip to main content

HydroRoll Conventional Role Play SDK

Project description

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:

pip install conventionalrp

Basic Usage

Here is a simple example of how to use the TRPG Log Processor:

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.

License

This project is licensed under the AGPLv3.0 License - see the

LICENSE

file for details.

Project Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

conventionalrp-0.2.3.tar.gz (77.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

conventionalrp-0.2.3-cp39-abi3-win_amd64.whl (142.7 kB view details)

Uploaded CPython 3.9+Windows x86-64

conventionalrp-0.2.3-cp39-abi3-win32.whl (137.4 kB view details)

Uploaded CPython 3.9+Windows x86

conventionalrp-0.2.3-cp39-abi3-musllinux_1_2_x86_64.whl (453.5 kB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ x86-64

conventionalrp-0.2.3-cp39-abi3-musllinux_1_2_i686.whl (479.0 kB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ i686

conventionalrp-0.2.3-cp39-abi3-musllinux_1_2_armv7l.whl (551.6 kB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARMv7l

conventionalrp-0.2.3-cp39-abi3-musllinux_1_2_aarch64.whl (459.0 kB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

conventionalrp-0.2.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (283.2 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

conventionalrp-0.2.3-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (347.0 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ s390x

conventionalrp-0.2.3-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (338.7 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ppc64le

conventionalrp-0.2.3-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (288.8 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARMv7l

conventionalrp-0.2.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (281.6 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

conventionalrp-0.2.3-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.whl (298.7 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.5+ i686

conventionalrp-0.2.3-cp39-abi3-macosx_11_0_arm64.whl (248.8 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

conventionalrp-0.2.3-cp39-abi3-macosx_10_12_x86_64.whl (251.4 kB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file conventionalrp-0.2.3.tar.gz.

File metadata

  • Download URL: conventionalrp-0.2.3.tar.gz
  • Upload date:
  • Size: 77.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for conventionalrp-0.2.3.tar.gz
Algorithm Hash digest
SHA256 39eab277e352c818d428fadec293f154ac04c84091ec2144fd6ca86decd822a4
MD5 8f3e321951314dff2b5e23d84098231b
BLAKE2b-256 c66b889dd507b5810fdefcbccfad6d0a6cbc922ee76b656716962b950820b209

See more details on using hashes here.

File details

Details for the file conventionalrp-0.2.3-cp39-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for conventionalrp-0.2.3-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b4675d0d58b5ea0e43bdb97344bc74bc897bbc79c7dae941368fc2c7d7fb9eb5
MD5 0520e8eab4afc24a4f2faeb058cd5d31
BLAKE2b-256 4f87ff4a4a7cc0302ed3e12baa173e2c8f699b8d3b57a8a1c92029e7ea8fcbad

See more details on using hashes here.

File details

Details for the file conventionalrp-0.2.3-cp39-abi3-win32.whl.

File metadata

File hashes

Hashes for conventionalrp-0.2.3-cp39-abi3-win32.whl
Algorithm Hash digest
SHA256 f9a7eba34a0ed3614faaf42383a7eff8b57c8e360c3bdeea3662cd8cddd704ae
MD5 37a675a05a6248fb2455dff959c10cee
BLAKE2b-256 47a35494c4b7bd61c228a5aa413b836a5ddaefb7bfb05b26bf8d0602d37a18d4

See more details on using hashes here.

File details

Details for the file conventionalrp-0.2.3-cp39-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for conventionalrp-0.2.3-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 6bf185ab3c8dd0146a9ac65029d3ceb3c249e3b22e9633b4df5b7b042a1723f9
MD5 93cbd72813c5674f47282366920a2a3d
BLAKE2b-256 3bf8f4f145d46f8ccd904180cbd447227f0b4b412acacdd1bb5b2537f6d2c07b

See more details on using hashes here.

File details

Details for the file conventionalrp-0.2.3-cp39-abi3-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for conventionalrp-0.2.3-cp39-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 a84b62c40747e162b2370e6e8676793917f7a5839a214c1e74a1bc09c3221a8d
MD5 6b8ab7fba06d63061f43b8ff1115e34e
BLAKE2b-256 656886c56739062d6856c6ee461ed919983b7344d7e531fb8e73250fa13ae852

See more details on using hashes here.

File details

Details for the file conventionalrp-0.2.3-cp39-abi3-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for conventionalrp-0.2.3-cp39-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 3adee01630f8275a00dd2eb4dde213520f9f41fb5473ba740bedbce8407cab63
MD5 75690490acf29d2425cc3c405477727c
BLAKE2b-256 3ea190f68dbba58c7c5e365e40ae82d138348c49adc90042f4b59e282936fbb8

See more details on using hashes here.

File details

Details for the file conventionalrp-0.2.3-cp39-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for conventionalrp-0.2.3-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 681d5fa797029c736553a59430dd2aceb2254ddc7d51cdf3620c995b88b8ec0a
MD5 5395d0f0b9691bf09fc6d89acb5bea9d
BLAKE2b-256 c98542ccf2cc1c179d708ae8439239790b9bf2cffcb0f1d4d2f1f49b06741578

See more details on using hashes here.

File details

Details for the file conventionalrp-0.2.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for conventionalrp-0.2.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b1095e33490487387f2083cffc4980bdf480a43a3e41c23ec2e9720bc86d87d6
MD5 a722d42e80a7b31acf439293ff369315
BLAKE2b-256 fd8c86f479bd107e7206512629d99a833fb1cfe68c2c1e616fc6b08c19936be1

See more details on using hashes here.

File details

Details for the file conventionalrp-0.2.3-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for conventionalrp-0.2.3-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 6a81039e07fcea21a2e7532cece11b8fa1b492c18ee0e05e2e10faf8b242c94a
MD5 18bafbb5e81c5dd19d7908b5d1a59f0e
BLAKE2b-256 494ef457ae2f92895c4dc1ff2b456ba0535f8316cb405303b35e855aca21a5ec

See more details on using hashes here.

File details

Details for the file conventionalrp-0.2.3-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for conventionalrp-0.2.3-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 2ea83ad945ea8066d385da626627928fe5e6f317e1dde001dfa943b141a73d19
MD5 bcf011350d7aec57ef69d48079c8d92c
BLAKE2b-256 ec7b50d6a6323c8e14f17acb16f0c1fada84f638613d38f7dfc151ba8a26d22c

See more details on using hashes here.

File details

Details for the file conventionalrp-0.2.3-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for conventionalrp-0.2.3-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 441b7b052061c7198648ed27ae63127957c4233e92d8ca23d05d9626483956c9
MD5 7e928ce4a4a43077d057fc7a020d345c
BLAKE2b-256 a01443f3e8e3138351ef2b0fb1c10685f67fff1d3f713c6627892a547c7007a6

See more details on using hashes here.

File details

Details for the file conventionalrp-0.2.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for conventionalrp-0.2.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 bad29a40ed6ef97c168882d1eb2ee731bc89bd95881ab64d0a6663fd00638202
MD5 7f70eff5af0e3dc86b85b8161dfa1d7a
BLAKE2b-256 0088b73c0baea64866ed5e93bc2b09e0883593c506144afef3965780b8455613

See more details on using hashes here.

File details

Details for the file conventionalrp-0.2.3-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for conventionalrp-0.2.3-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 a1b2259eeb7ffbee6ee5d3db10854c6e7e9394f57b2236dfad99320f856922f5
MD5 7addb1aaace2cd8f58bfc2693a77f516
BLAKE2b-256 b5cb5b95451029adb8727e2c6f93560e7067a9b0f9eaeb68a2145ede7f7be56e

See more details on using hashes here.

File details

Details for the file conventionalrp-0.2.3-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for conventionalrp-0.2.3-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fcc85c60cb97fd7f42db17db92b0c069f95f1348b5e1101c0eab784a62f57777
MD5 30b83e7a129676ab8315860c7b3db89e
BLAKE2b-256 209aa0a52b3967ff48d56653dda6222b86b645a69c04846d5f25fc338646c77f

See more details on using hashes here.

File details

Details for the file conventionalrp-0.2.3-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for conventionalrp-0.2.3-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2ec7092f34c7a8d2b521a2d3c99004d07035b627ffd7a14c60979749999d7b00
MD5 08f5084e3cca88cc5d29872bfff4b834
BLAKE2b-256 04f066a459ac908fceb38abfecc370ae3f59fc351feb79d7cc3a0dc4d98fda24

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page