fatecast


Namefatecast JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryA Textual-powered Chaoshan cup divination mini game.
upload_time2025-11-07 10:16:24
maintainerNone
docs_urlNone
authordongfan
requires_python>=3.10
licenseMIT License Copyright (c) 2025 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords textual tui cup-divination chaoshan terminal
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Chaoshan Cup Divination Mini Game

This is a Textual-powered terminal toy that recreates the Chaoshan folk ritual of cup divination (also known as moon blocks or poe). Interact with the deity by tossing two cups and read the verdict instantly:

- Press the **Throw Cups** button (or shortcuts) to perform a toss.
- Outcomes:
  - **Shengbei (Approval)** – one cup face up and one face down → divine consent.
  - **Yinbei (Laughing Cup)** – both up or both down → ask again or show more sincerity.
  - **Anger Cup** – three Yinbei in a row counts as divine displeasure.
- Hitting **three Shengbei in a row** unlocks a blessing banner.

Reference framework: [Textual](https://github.com/Textualize/textual)

## Run It (Users)

1. Install via PyPI (once released):

```bash
pip install fatecast
```

Or install from source (Python 3.10+ recommended):

```bash
pip install -r requirements.txt
# or just the essentials
pip install textual textual-dev
```

2. Start the TUI:

```bash
python -m fatecast
# or, if installed as a CLI
fatecast
# run directly via textual (no entry script required)
textual run fatecast.ui:CupThrowApp
# serve over Textual Web
textual serve "python -m fatecast"
```

3. Optional: open the Textual developer console from another terminal to watch logs.

```bash
textual console
```

## Development

Editable install and tooling are recommended:

```bash
# install runtime + project in editable mode
pip install -e .

# dev helpers (formatting, lint, tests)
pip install -r requirements-dev.txt
```

Handy Makefile targets:

```bash
make run      # launch the app
make test     # run pytest
make lint     # ruff + mypy
make format   # black
```

### Project Layout

```
fatecast/
  fatecast/
    __init__.py
    __main__.py
    cli.py        # CLI entry point
    logic.py      # cup rules & stats
    ui.py         # Textual interface
  tests/
    test_logic.py
  pyproject.toml
  requirements*.txt
  Makefile
  README.md
```

### Shortcuts

- `t` / `space`: throw cups
- `r`: reset stats
- `q`: quit

### CLI Options

```bash
fatecast --seed 42 --anger-threshold 3
```

## Inspiration

- [rogvibe](https://github.com/yihong0618/rogvibe): a Textual-based terminal raffle that demonstrates clean CLIs and multi-mode UX.
- [Textual](https://github.com/Textualize/textual): the framework powering this TUI.

> Note: rogvibe is on PyPI, so `uvx rogvibe` works out of the box. If fatecast is ever published, `uvx fatecast` would offer the same experience.

## Notes & Odds

- Statistically, Shengbei and Yinbei each appear roughly half of the time (two favorable combinations out of four).
- The anger meter follows a pragmatic rule: every 3 consecutive Yinbei trigger one anger count and reset the streak.
- This project is for cultural interaction and entertainment only—no real divination is implied.

## License

MIT

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "fatecast",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "textual, tui, cup-divination, chaoshan, terminal",
    "author": "dongfan",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/88/af/6765940f5fd6f860da4b4534dec10d26c7bb31325cc8ff1e7bcfb012ba5e/fatecast-0.1.0.tar.gz",
    "platform": null,
    "description": "# Chaoshan Cup Divination Mini Game\n\nThis is a Textual-powered terminal toy that recreates the Chaoshan folk ritual of cup divination (also known as moon blocks or poe). Interact with the deity by tossing two cups and read the verdict instantly:\n\n- Press the **Throw Cups** button (or shortcuts) to perform a toss.\n- Outcomes:\n  - **Shengbei (Approval)** \u2013 one cup face up and one face down \u2192 divine consent.\n  - **Yinbei (Laughing Cup)** \u2013 both up or both down \u2192 ask again or show more sincerity.\n  - **Anger Cup** \u2013 three Yinbei in a row counts as divine displeasure.\n- Hitting **three Shengbei in a row** unlocks a blessing banner.\n\nReference framework: [Textual](https://github.com/Textualize/textual)\n\n## Run It (Users)\n\n1. Install via PyPI (once released):\n\n```bash\npip install fatecast\n```\n\nOr install from source (Python 3.10+ recommended):\n\n```bash\npip install -r requirements.txt\n# or just the essentials\npip install textual textual-dev\n```\n\n2. Start the TUI:\n\n```bash\npython -m fatecast\n# or, if installed as a CLI\nfatecast\n# run directly via textual (no entry script required)\ntextual run fatecast.ui:CupThrowApp\n# serve over Textual Web\ntextual serve \"python -m fatecast\"\n```\n\n3. Optional: open the Textual developer console from another terminal to watch logs.\n\n```bash\ntextual console\n```\n\n## Development\n\nEditable install and tooling are recommended:\n\n```bash\n# install runtime + project in editable mode\npip install -e .\n\n# dev helpers (formatting, lint, tests)\npip install -r requirements-dev.txt\n```\n\nHandy Makefile targets:\n\n```bash\nmake run      # launch the app\nmake test     # run pytest\nmake lint     # ruff + mypy\nmake format   # black\n```\n\n### Project Layout\n\n```\nfatecast/\n  fatecast/\n    __init__.py\n    __main__.py\n    cli.py        # CLI entry point\n    logic.py      # cup rules & stats\n    ui.py         # Textual interface\n  tests/\n    test_logic.py\n  pyproject.toml\n  requirements*.txt\n  Makefile\n  README.md\n```\n\n### Shortcuts\n\n- `t` / `space`: throw cups\n- `r`: reset stats\n- `q`: quit\n\n### CLI Options\n\n```bash\nfatecast --seed 42 --anger-threshold 3\n```\n\n## Inspiration\n\n- [rogvibe](https://github.com/yihong0618/rogvibe): a Textual-based terminal raffle that demonstrates clean CLIs and multi-mode UX.\n- [Textual](https://github.com/Textualize/textual): the framework powering this TUI.\n\n> Note: rogvibe is on PyPI, so `uvx rogvibe` works out of the box. If fatecast is ever published, `uvx fatecast` would offer the same experience.\n\n## Notes & Odds\n\n- Statistically, Shengbei and Yinbei each appear roughly half of the time (two favorable combinations out of four).\n- The anger meter follows a pragmatic rule: every 3 consecutive Yinbei trigger one anger count and reset the streak.\n- This project is for cultural interaction and entertainment only\u2014no real divination is implied.\n\n## License\n\nMIT\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2025\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.\n        \n        \n        ",
    "summary": "A Textual-powered Chaoshan cup divination mini game.",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/dongfan/fatecast",
        "Issues": "https://github.com/dongfan/fatecast/issues",
        "Repository": "https://github.com/dongfan/fatecast"
    },
    "split_keywords": [
        "textual",
        " tui",
        " cup-divination",
        " chaoshan",
        " terminal"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e3674f582a00a6a97f20c27ed7b5196589838eeed12cf00e4975c15f07f33e8e",
                "md5": "03fd6de7e80b7f3daf0524e12052edf0",
                "sha256": "ba1ef2d02e0d809b8d4af43791b2d057528737544ab614a6d498a61c090472ad"
            },
            "downloads": -1,
            "filename": "fatecast-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "03fd6de7e80b7f3daf0524e12052edf0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 10475,
            "upload_time": "2025-11-07T10:16:23",
            "upload_time_iso_8601": "2025-11-07T10:16:23.323776Z",
            "url": "https://files.pythonhosted.org/packages/e3/67/4f582a00a6a97f20c27ed7b5196589838eeed12cf00e4975c15f07f33e8e/fatecast-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "88af6765940f5fd6f860da4b4534dec10d26c7bb31325cc8ff1e7bcfb012ba5e",
                "md5": "52f87b6242d66df8534ec3f38fa11867",
                "sha256": "e85c466706cedfb40fd485f4bfad2d1c256e211411c6b68ee30496498802657a"
            },
            "downloads": -1,
            "filename": "fatecast-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "52f87b6242d66df8534ec3f38fa11867",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 9845,
            "upload_time": "2025-11-07T10:16:24",
            "upload_time_iso_8601": "2025-11-07T10:16:24.906187Z",
            "url": "https://files.pythonhosted.org/packages/88/af/6765940f5fd6f860da4b4534dec10d26c7bb31325cc8ff1e7bcfb012ba5e/fatecast-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-11-07 10:16:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dongfan",
    "github_project": "fatecast",
    "github_not_found": true,
    "lcname": "fatecast"
}
        
Elapsed time: 4.07900s