Spelling fixes (#215)

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
pull/203/merge
Josh Soref 2022-11-09 08:24:48 -05:00 zatwierdzone przez GitHub
rodzic ac2071daf6
commit 67bea207cd
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
7 zmienionych plików z 12 dodań i 12 usunięć

Wyświetl plik

@ -129,4 +129,4 @@ Source
------ ------
Finally, you can get the latest source distribution, wheel or debian package Finally, you can get the latest source distribution, wheel or debian package
`from Github <https://github.com/ihabunek/toot/releases/latest/>`_. `from GitHub <https://github.com/ihabunek/toot/releases/latest/>`_.

Wyświetl plik

@ -15,7 +15,7 @@ Bump & tag version
* Run ``make changelog`` to generate a human readable changelog * Run ``make changelog`` to generate a human readable changelog
* Commit the changes * Commit the changes
* Run ``./scripts/tag_version <version>`` to tag a release in git * Run ``./scripts/tag_version <version>`` to tag a release in git
* Run ``git push --follow-tags`` to upload changes and tag to Github * Run ``git push --follow-tags`` to upload changes and tag to GitHub
Publishing to PyPI Publishing to PyPI
------------------ ------------------
@ -23,7 +23,7 @@ Publishing to PyPI
* ``make dist`` to create source and wheel distributions * ``make dist`` to create source and wheel distributions
* ``make publish`` to push them to PyPI * ``make publish`` to push them to PyPI
Github release GitHub release
-------------- --------------
* `Create a release <https://github.com/ihabunek/toot/releases/>`_ for the newly * `Create a release <https://github.com/ihabunek/toot/releases/>`_ for the newly

Wyświetl plik

@ -122,7 +122,7 @@ Finally, you can launch your favourite editor:
toot post --editor vim toot post --editor vim
Define your editor preference in the ``EDITOR`` environment variable, then you Define your editor preference in the ``EDITOR`` environment variable, then you
don't need to specify it explicity: don't need to specify it explicitly:
.. code-block:: bash .. code-block:: bash
@ -137,7 +137,7 @@ files. For details on supported formats see `Mastodon docs on attachments
<https://docs.joinmastodon.org/user/posting/#attachments>`_. <https://docs.joinmastodon.org/user/posting/#attachments>`_.
It is encouraged to add a plain-text description to the attached media for It is encouraged to add a plain-text description to the attached media for
accessiblity purposes by adding a ``--description`` option. accessibility purposes by adding a ``--description`` option.
To attach an image: To attach an image:
@ -183,7 +183,7 @@ Timeline takes various options:
toot timeline --public --local # public timeline, only this instance toot timeline --public --local # public timeline, only this instance
toot timeline --tag photo # posts tagged with #photo toot timeline --tag photo # posts tagged with #photo
toot timeline --count 5 # fetch 5 toots (max 20) toot timeline --count 5 # fetch 5 toots (max 20)
toot timeline --once # don't promopt to fetch more toots toot timeline --once # don't prompt to fetch more toots
Status actions Status actions
-------------- --------------

Wyświetl plik

@ -6,7 +6,7 @@ from toot.logging import log_request, log_response
def send_request(request, allow_redirects=True): def send_request(request, allow_redirects=True):
# Set a user agent string # Set a user agent string
# Required for accesing instances using Cloudfront DDOS protection. # Required for accessing instances using Cloudfront DDOS protection.
request.headers["User-Agent"] = "toot/{}".format(__version__) request.headers["User-Agent"] = "toot/{}".format(__version__)
log_request(request) log_request(request)

Wyświetl plik

@ -22,7 +22,7 @@ TODO/Ideas:
* Think about how to show media * Think about how to show media
* download media and use local image viewer? * download media and use local image viewer?
* convert to ascii art? * convert to ascii art?
* interaction with clipboard - how to copy a status to clipbard? * interaction with clipboard - how to copy a status to clipboard?
* Show **notifications** * Show **notifications**
* Status source * Status source
* shortcut to copy source * shortcut to copy source

Wyświetl plik

@ -150,7 +150,7 @@ class TUI(urwid.Frame):
def _default_error_callback(ex): def _default_error_callback(ex):
self.exception = ex self.exception = ex
self.footer.set_error_message("An exeption occured, press E to view") self.footer.set_error_message("An exception occurred, press E to view")
_error_callback = error_callback or _default_error_callback _error_callback = error_callback or _default_error_callback

Wyświetl plik

@ -70,12 +70,12 @@ def trunc(text, length):
""" """
Truncates text to given length, taking into account wide characters. Truncates text to given length, taking into account wide characters.
If truncated, the last char is replaced by an elipsis. If truncated, the last char is replaced by an ellipsis.
""" """
if length < 1: if length < 1:
raise ValueError("length should be 1 or larger") raise ValueError("length should be 1 or larger")
# Remove whitespace first so no unneccesary truncation is done. # Remove whitespace first so no unnecessary truncation is done.
text = text.strip() text = text.strip()
text_length = wcswidth(text) text_length = wcswidth(text)
@ -93,7 +93,7 @@ def trunc(text, length):
if text_length - trunc_length <= length: if text_length - trunc_length <= length:
break break
# Additional char to make room for elipsis # Additional char to make room for ellipsis
n = chars_to_truncate + 1 n = chars_to_truncate + 1
return text[:-n].strip() + '' return text[:-n].strip() + ''