lear 0.2.0

Prints a random passage from King Lear. For when you meant to type "clear"
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
import json
from os import path
from typing import Any, Dict, List

working_dir = path.dirname(__file__)

for index in range(1, 27):
    with open(
        path.join(working_dir, "scenes", f"{index:02d}.json"), "r", encoding="utf-8"
    ) as f:
        data: List[Dict[str, Any]] = json.load(f)
        lines = data[-1]["Dialogue"]["stop"]
        print(f"    Metadata {{ act: 1, scene: 1, lines: {lines} }},")