diff options
| author | 2025-03-15 16:35:39 +0800 | |
|---|---|---|
| committer | 2025-03-15 16:35:39 +0800 | |
| commit | 965771fb0d85ddb27dc6c5dd7df822d1fb318286 (patch) | |
| tree | f33a0d36e5716da13be0e3a4134cf7359ebe5223 /examples/basic_usage.py | |
| parent | 818d84a7bf00c07b7ab252dda5bfa70a98b8be65 (diff) | |
| download | conventional_role_play-965771fb0d85ddb27dc6c5dd7df822d1fb318286.tar.gz conventional_role_play-965771fb0d85ddb27dc6c5dd7df822d1fb318286.zip | |
refactor: clean up code formatting and add new PluginManager class
Diffstat (limited to 'examples/basic_usage.py')
| -rw-r--r-- | examples/basic_usage.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/basic_usage.py b/examples/basic_usage.py index 22bfbe4..7a4e53d 100644 --- a/examples/basic_usage.py +++ b/examples/basic_usage.py @@ -3,10 +3,11 @@ from conventionalrp.core.processor import Processor from conventionalrp.extractors.rule_extractor import RuleExtractor from conventionalrp.renderers.html_renderer import HTMLRenderer + def main(): # Initialize the parser and load rules parser = Parser() - parser.load_rules('path/to/rules.json') + parser.load_rules("path/to/rules.json") # Parse the TRPG log log_data = "Your TRPG log data here" @@ -14,7 +15,7 @@ def main(): # Initialize the rule extractor extractor = RuleExtractor() - rules = extractor.extract('path/to/rules.json') + rules = extractor.extract("path/to/rules.json") # Process the parsed tokens processor = Processor() @@ -27,5 +28,6 @@ def main(): # Print or save the output print(output) + if __name__ == "__main__": - main()
\ No newline at end of file + main() |
