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.2.tar.gz (74.8 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.2-cp39-abi3-win_amd64.whl (142.3 kB view details)

Uploaded CPython 3.9+Windows x86-64

conventionalrp-0.2.2-cp39-abi3-win32.whl (136.9 kB view details)

Uploaded CPython 3.9+Windows x86

conventionalrp-0.2.2-cp39-abi3-musllinux_1_2_x86_64.whl (453.1 kB view details)

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

conventionalrp-0.2.2-cp39-abi3-musllinux_1_2_i686.whl (478.5 kB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ i686

conventionalrp-0.2.2-cp39-abi3-musllinux_1_2_armv7l.whl (551.0 kB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARMv7l

conventionalrp-0.2.2-cp39-abi3-musllinux_1_2_aarch64.whl (458.6 kB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

conventionalrp-0.2.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (282.9 kB view details)

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

conventionalrp-0.2.2-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (346.6 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ s390x

conventionalrp-0.2.2-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (338.3 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ppc64le

conventionalrp-0.2.2-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (288.3 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARMv7l

conventionalrp-0.2.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (281.2 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

conventionalrp-0.2.2-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.whl (298.2 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.5+ i686

conventionalrp-0.2.2-cp39-abi3-macosx_11_0_arm64.whl (248.4 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

conventionalrp-0.2.2-cp39-abi3-macosx_10_12_x86_64.whl (251.1 kB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for conventionalrp-0.2.2.tar.gz
Algorithm Hash digest
SHA256 2f258e533f48d40619d3d0720a2eb1d742bca6c8548f23e9e7c4bba963e765c3
MD5 54c4dca7c829b3f21eb6830cc0380f9e
BLAKE2b-256 7bb946f164adf1037c61a0e7e097b030d41b968c0ec084d76e790794ddb2c09b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for conventionalrp-0.2.2-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 657e47e5acae8f145e0bf523128a79d7cabbd53e2107d2587edd1ad8229f2ba3
MD5 60bb8553947554ec29efe449c25766bf
BLAKE2b-256 630df7fd63042549863628c427da1ae1b6090486038cac864107041544480eb8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for conventionalrp-0.2.2-cp39-abi3-win32.whl
Algorithm Hash digest
SHA256 0283a38e521a6e58b8cb4fe3c894d62fbcee5728cbe91afb0d1ac5971b9b9862
MD5 8f4c3e43b86cc06aaf42eb64b78ebdf2
BLAKE2b-256 fae7af67a880e177457a97abe7d71b4f391bf76db7fae3f82631f5a2c738b5e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for conventionalrp-0.2.2-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 dea4c29696312324257c67463cd0640aefc198a06c874033b17d0a3e328e700f
MD5 b3e283cb0da4016353bd73ebf5c256f5
BLAKE2b-256 feac61d7704da180aca116c90d0fd3e8232d0ed28b13ec09ea3c3872d5ddcb22

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for conventionalrp-0.2.2-cp39-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 01d74f228bbdc84750680a16d04243ce1a6b872e1766601a96696c1b8e2bdc4c
MD5 cad1ea2665704fb723f85c7782da7cd5
BLAKE2b-256 80ee97280437b4560c50c899426d282b29a5c8e7f1f1c26e99033667ccb491dc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for conventionalrp-0.2.2-cp39-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 8c44a5d5c4a37a7704553c4ee6eabb75d0cba78b8310c40310f76cb7b842f50d
MD5 bc7ed11a0386263219d119adb3333fef
BLAKE2b-256 deac897a6fc6493c21a9a63d24325886b518dfaa6bdcac086b5e93b623a2ab83

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for conventionalrp-0.2.2-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 4fc6fc680a628c4d8db38b0b4d619c68abe7b40682895dd5cd84273810d18cd5
MD5 4ac349396ddc7534cd9911f647134e1a
BLAKE2b-256 092cb26cdc10bafdcbae7cb98716df457c9af23654d5257a1cad5fdecef5e431

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for conventionalrp-0.2.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d8b2d2fba4b280f690a5355b7b4b698e36fec9930195d66fdbc187fb119c977d
MD5 ffd93d433f1d1b9a5eb0cdcb1ba77ebb
BLAKE2b-256 0f071c6603f6ee37a148efaa4933f2c4d4f1a33075385b410205c2a6c40e5b0f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for conventionalrp-0.2.2-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 6889cd80b204e774b335602a3d6c47eb0187d6dba569d3b63b4599090b550678
MD5 64ce7281486d76b0a9dc2fc9d652fdb3
BLAKE2b-256 d17a8ab3d3a0b40dd2fb0b0ee8117affa6770135dbc470e6760f30bc883551dc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for conventionalrp-0.2.2-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 2e0360597b95d7ebc87ad449ee1ea74c2bc152f7de9bcc49e0dd0e4bc959596f
MD5 3619d5f0816813e61e5f6c9dda56c5f2
BLAKE2b-256 ab2b860b6d8a260547cb58bdb8ed88e6b923f60c0a7f173df7a3520fdbd8cb79

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for conventionalrp-0.2.2-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 5c2138cd21eb3038081bee818cf62143da125548f1b9acc46427a0295506bffc
MD5 eb3dc6f24cf59d4367a27f187927bec0
BLAKE2b-256 87d135d8feea9c8f689e72bf2b0aabeeb6cf6637e0fed03ae500ec4db06a0a1e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for conventionalrp-0.2.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 002c0246e2310b55d1657988b804e2654f3d1de7811b4b92ab0cd6739b6e91ac
MD5 7608169ff59f01f1041fe1a992ade17a
BLAKE2b-256 838b2bf771797863577f9ea203020b1a10e929f5e11e25fdf63735d4b852613a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for conventionalrp-0.2.2-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 c9228337909dfed1ff797a9a85f60806de578f0b022103f2a83b1f51b975e00d
MD5 503233e08c4b4749172d1a9e0a4f22ad
BLAKE2b-256 e0988913666035993c30bb396ad2699274909bc5c290206794dc3771a3df492e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for conventionalrp-0.2.2-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e2780cf1021140975447f39ffbaa652e69df079baff46c2a48e4d8c476446307
MD5 ba5a3c35a10205f62b0a3d38fe084ca3
BLAKE2b-256 07d5301e041d68f4d18e053970e22f1b5d34df1ae35278584af0f79867d4a6cf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for conventionalrp-0.2.2-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b73ba3ecb6db3ecdc8065242c14d42c73f2f83c713faa4d40fb78d0b99d14598
MD5 c6ee6f3345c97844972fccc3bc893099
BLAKE2b-256 ccb6cae7faee174c92da05ea8b1274dcf4ac2cf82827957751ba4b3bb2ab155d

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