Add support for disabling ANSI colour output via the --no-color flag
or the NO_COLOR environment variable. The suggested implementation was
inspired by the standards defined at no-color.org
Allow users to post a status from a file using the --from-file flag.
If both --content and --from-file flags are used then the --content
flag takes precedence.
Add support for opening links for accounts and statuses in a user's
favourite web browser.
Changes:
- Add browser support if the BROWSER environment variable is set.
- Add support for viewing accounts in the browser.
- Add support for viewing statuses in the browser (if they are publicly
viewable)
The wrap line function breaks a line at the position of the last
white space before reaching the line limit, however sometimes a single
word (e.g. a very long url) exceeds the character limit itself which
threw the function into an infinite loop. This commit fixes that by
breaking said word at the last letter before the character limit is
reached.
This commit fixes the issue where the contents of a status is not shown
when displayed on screen. For statuses made in GTS the Text field is
populated with the plain text version of the content however this is
unfortunately not the case for Mastodon statuses, therefore the Content
field is used instead and the contents is processed with StripHTMLTags
function to remove the HTML tags before printing.
This commit refactors the login flow to a GTS server thanks to an update
in the official GTS documentation.
golang.org/x/oauth2 is no longer needed.
Documentation reference:
- https://docs.gotosocial.org/en/latest/api/authentication/