mirror of
https://github.com/ihabunek/toot.git
synced 2024-11-03 04:17:21 -05:00
0bf4b2a21a
When the left column contains wide characters (which occupy more than one cell when printed to screen), padding to 30-characters with "{:30}".format() does not work well. This happens for instance when the display name contains unicode characters such as emojis. We fix this by introducing a pad() function in utils module which uses the wcwidth library (https://pypi.org/project/wcwidth/) to compute the length of the text for the column. trunc() function is also adjusted to optionally compute the length of the text to be truncated since, when called from pad(), we now pre-compute this value. We update test for timeline rendering so that the display name now includes an emoji. (Without the fix, the test would not pass as left column would be misaligned.) |
||
---|---|---|
docs | ||
tests | ||
toot | ||
.flake8 | ||
.gitignore | ||
.travis.yml | ||
CHANGELOG.md | ||
LICENSE | ||
Makefile | ||
README.rst | ||
requirements-dev.txt | ||
requirements.txt | ||
setup.py | ||
stdeb.cfg | ||
trumpet.png |
============================ Toot - a Mastodon CLI client ============================ .. image:: https://raw.githubusercontent.com/ihabunek/toot/master/trumpet.png Interact with Mastodon social network from the command line. .. image:: https://img.shields.io/travis/ihabunek/toot.svg?maxAge=3600&style=flat-square :target: https://travis-ci.org/ihabunek/toot .. image:: https://img.shields.io/badge/author-%40ihabunek-blue.svg?maxAge=3600&style=flat-square :target: https://mastodon.social/@ihabunek .. image:: https://img.shields.io/github/license/ihabunek/toot.svg?maxAge=3600&style=flat-square :target: https://opensource.org/licenses/MIT .. image:: https://img.shields.io/pypi/v/toot.svg?maxAge=3600&style=flat-square :target: https://pypi.python.org/pypi/toot Documentation ------------- Documentation is hosted on readthedocs.io. Check it out for instruction on installation, usage and more. https://toot.readthedocs.io/en/latest/ Features -------- * Posting, replying, deleting statuses * Support for media uploads, spoiler text, sensitive content * Search by account or hash tag * Following, muting and blocking accounts * Simple switching between authenticated in Mastodon accounts Curses UI --------- toot has an experimental curses based console UI. .. image :: https://raw.githubusercontent.com/ihabunek/toot/master/docs/_static/curses.png License ------- Copyright 2018 Ivan Habunek <ivan@habunek.com> Licensed under `GPLv3 <http://www.gnu.org/licenses/gpl-3.0.html>`_, see `LICENSE <LICENSE>`_.