This commit adds integration to external image viewers and video players
to allow users to view image and video attachments.
Enbas creates a cache directory where the media is downloaded to before
opening the external program for viewing.
Users can view one or more media attachments from a single status.
Now that muting and unmuting accounts are now supported in GoToSocial
(as of version 0.16.0) Enbas can now allow users to do that.
Users can also see a list of accounts that they've muted.
Add a new internal printer package for printing resources to the screen
or pager.
With the new printer in place, most of the settings such as the pager
command, colour theme, whether or not colour output is disabled, etc
are defined in one place which saves us the trouble of passing an
increasing number of parameters to an increasing number of Display
methods throughout the code base.
The old Displayer interface and associated Display methods in the
model package are removed as this is now handled by the printer.
The format functions in the utilities package has essentially been
rewritten as methods to the Printer type.
Additional changes:
- All indentation when displaying information about resources (e.g.
statuses, instance, accounts) are removed.
- The application's build information now has colour output.
Changes:
- moved the command names from main to the executor package.
- moved the unknownCommandError to the executor package and renamed it
to UnknownCommandError.
- define the command summaries within the executor package.
- replace the switch statement in main.run() with a hashmap for looking
up the corresponding executor to the given command.
- transformed BlockExecutor to BlockOrUnblockExecutor.
- transformed FollowExecutor to FollowOrUnfollowExecutor.
Additional fixes:
- fixed flag for the version executor.
Add the FullDisplayNameFormat as a replacement for DisplayNameFormat for
displaying the full display name. It uses the builder from the strings
package to reduce the use of fmt.Sprintf.
Add support for liking and un-liking statuses by allowing users to add
and remove stars/likes to them.
The user can also view a list of statuses that they've liked.
Add a new type called StatusList for managing different types of status
lists in preparation for bookmark support. This replaces the Timeline
type.
Update timeline headers.
Changes:
- Move InvalidListRepliesPolicyError, InvalidTimelineCategory,
InvalidStatusVisibility and InvalidStatusContentTypeError type to the
model package.
- Clean up some code in regards to the parsing of the Enum types.
- Clean up the error messages sent back to the user.
- Use colons instead of semicolons when unwrapping error messages.
- Print errors to Standard Error (os.Stderr)
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)
Correctly show when a status is actually a reposted status in the
timelines. The ID and created time of the original status is now
displayed instead of the reposted status.
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 is a breaking change.
Changes:
- Show the relationship between the user and the account by default.
- Remove the show-relationship flag.
- Add the skip-relationship flag so that users can set this to true if
they don't want to display the relationship.
Move all executors to the internal folder package. This PR also comes
with additional breaking changes.
Changes:
- refactor: move all executors to the internal/executor package.
- refactor: update naming patterns for constants, variables, custom
types, etc.
- fix(breaking): renamed the update command to edit.
- fix(breaking): update the flags for the switch command to make it
more generic.
- fix(breaking): renamed the show-account-relationship flag to
show-relationship.
- fix: update the print message from the whoami command.
Moved the magefiles directory back to the project's root directory and
created a separate go.mod file to keep the dependencies separated.
The idea was suggested here:
https://github.com/magefile/mage/issues/502
Allow users to specify their preferred configuration directory by using
the top level flag (a.k.a 'global flag') --config-dir. This also
introduces the design of baking top level flags into the executor.
This commit allows users to add or remove private notes from
accounts.
Changes:
- feat: added functionality to add or remove private notes from
accounts.
- fix: added new error types or unsupported add and remove
operations.
- build: build Enbas without rebuilding all packages by default to
speed up local builds for development.
This commit adds the ability to follow and unfollow (remote)
accounts and to display a list of followers and followees for
a specified account.
Changes:
- Added a command to follow an account.
- Added a command to unfollow an account.
- When displaying an account you can optionally view the relationship
between that account and yourself.
- Added a command to view accounts that are following a specified
account.
- Added a command to view accounts that are followed by a specified
account.
Summary:
This commit adds the ability to add and remove accounts from a list.
The list models has also been updated to change the way lists are
displayed on screen.
Changes:
- Added a subcommand to add accounts to a list.
- Added a subcommand to remove accounts from a list.
- Added a custom error for unknown subcommands.
- Added a custom error when no account IDs are specified when
expected.
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/
Add Enbas code. So far Enbas can:
- Allow the user to register the application and log into GTS on their
behalf. The scope is limited to read for now.
- Show instance details.
- Show local and remote accounts.