Mastodon terminal user interface
Project description
tooi
tooi is a text-based user interfaces for Mastodon, Pleroma and friends. The name is a portmantou of toot and TUI.
It uses the Textual framework.
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, 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:
# 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 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for toot_tooi-0.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75d4472f0b782bef12f994a8c9a1028a5eff69878f19201ae6b2a8e7bb4369f7 |
|
MD5 | 453196273990ab5f94afe918db694535 |
|
BLAKE2b-256 | 099eaec0d352b5a8098a12054f07dfc13cc2e6d0459666b8189bbd2238238745 |