Metadata-Version: 2.1
Name: toot-tooi
Version: 0.5.0
Summary: Mastodon terminal user interface
Author-email: Ivan Habunek <ivan@habunek.com>
License: Copyright 2024 tooi contributors
        
        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.
        
Project-URL: Homepage, https://git.sr.ht/~ihabunek/tooi
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Environment :: Console
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: beautifulsoup4
Requires-Dist: click
Requires-Dist: httpx
Requires-Dist: html2text
Requires-Dist: textual>=0.38.1
Requires-Dist: tomlkit
Requires-Dist: pillow
Provides-Extra: dev
Requires-Dist: build; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Requires-Dist: pyright; extra == "dev"
Requires-Dist: textual-dev; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: types-beautifulsoup4; extra == "dev"
Requires-Dist: vermin; extra == "dev"

tooi
====

tooi is a text-based user interfaces for Mastodon, Pleroma and friends. The name
is a portmantou of [toot](https://toot.bezdomni.net/) and
[TUI](https://en.wikipedia.org/wiki/Text-based_user_interface).

It uses the [Textual framework](https://textual.textualize.io/).

This project is in its early days and not feature complete.

* Source code: https://github.com/ihabunek/tooi
* IRC chat: #toot channel on libera.chat

## Setting up a dev environment

Check out tooi and install in a virtual environment:

```
git clone https://github.com/ihabunek/tooi.git
cd tooi
python3 -m venv _env
source _env/bin/activate
pip install --editable ".[dev]"
```

Run the app by invoking `tooi`.

To use the
[Textual console](https://textual.textualize.io/guide/devtools/#console), run
it in a separate terminal window:

```
textual console
```

Then run tooi like this:

```
textual run --dev tooi.cli:main
```

## Code style and linting

Rule of thumb: look at existing code, try to keep it similar in style.

Please run `make lint` to check formatting before sending a patch. This runs
flake8 which checks for some basic code style rules. It shouldn't be too
aggressive, and if you're bothered by a rule, let me know.

Lines can be upto 100 characters wide, wrap them if they go over that.

### Wrapping style

Wrapping style is not enforced by the linter, but this is the preferred style
most of the time:

```python
# NO: Do not wrap after opening paren

very_long_package_name.even_longer_long_function_call(first_argument,
                                                      second_argument,
                                                      third_argument)

# YES: Align arguments on next tab

very_long_package_name.even_longer_long_function_call(
    first_argument,
    second_argument,
    third_argument
)
```

## Type checking

You're encouraged to specify types in your code. While they can be a bit of a
pain in Python, I have found them to be useful in locating errors and
eliminating potential bugs.

This project is configured to use
[pyright](https://github.com/microsoft/pyright) for type checking, and I
recommend that you install the pyright language server if it's available for
your editor. Currently it returns errors in some places, some of which are
caused by the way textual is implemented. So it's not required to have zero
errors before submitting patches, but it will indicate problems in new code.
