Commit graph

42 commits

Author SHA1 Message Date
f223e0417c
fix: view the summary of a status
All checks were successful
REUSE Compliance Check / check (push) Successful in 6s
View the status' summary/spoiler/content warning text if it exists.
2024-08-17 03:49:17 +01:00
3d20adfa57
chore: REUSE.toml
- Replace .reuse/dep5 with the new REUSE.toml file.
- Add licensing information to REUSE.toml and remove the licensing
  headers from the source files.
2024-08-01 04:01:38 +01:00
42251f6df8
feat: add configuration support to enbas
SUMMARY

This commit adds configuration support to enbas. The configuration is
stored as a JSON file in the user specified configuration directory.

When using enbas for the first time, the user will first need to
execute the new init command in order to generate the configuration.
Once this has been generated the user can edit the settings to
personalise their experience, login to their account and use enbas as
normal.

For now the configurable settings included in the configuration
are as follows:

- The path to the credentials file (by default this is set to a file in
  the same directory as the configuration file).
- The path to the cache directory.
- The character limit used for line wrapping.
- The programs used for integrations such as paging, media viewing,
  opening URLs, etc.

CHANGES

- added the new config type.
- added the new init executor for generating a new configuration file.
- removed the following top level flags in favour of the new
  configration support.
    - cache-dir
    - pager
    - image-viewer
    - video-player
    - max-terminal-width
- added a new error type for use when an unknown media attachment ID
  is specified.
- updated the usage function for the executors to support a case
  where a flagsets has no flags.
- update .golangci.yaml to disable some linters
2024-06-25 12:39:39 +01:00
96ad6a7b55
fix: view media attachments from reposted statuses
In the timeline view, you should now be able to see the content, poll
and media attachments from statuses that have been reposted (boosted).
2024-06-19 01:36:32 +01:00
56445601a3
feat: add support for muting and unmuting accounts
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.
2024-06-18 04:59:32 +01:00
ccdd8b6530
fix: add a new internal printer
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.
2024-06-17 18:59:20 +01:00
eb2d9f44f6
chore: add copyright header 2024-06-16 14:15:58 +01:00
792a93d736
feat: add support for polls
Add support for creating, viewing and voting in
polls.
2024-06-15 18:40:13 +01:00
ec706b43e9
fix: updated headers for account lists 2024-06-10 11:17:07 +01:00
5fb55ed2cf
feat: accept or reject follow requests
Add support to allow users to accept or reject follow requests.
2024-06-10 10:58:43 +01:00
db16e4aa16
feat: add pager support
Add support for printing the output of timelines, long statuses, etc to
an external pager of the user's choice.
2024-06-09 15:58:10 +01:00
64ecc90499
refactor: add FullDisplayNameFormat
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.
2024-06-04 20:29:19 +01:00
d452122b58
feat: add support for liking and unliking statuses
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.
2024-06-04 17:01:33 +01:00
66c530d524
fix: fix type of PollOption.VotesCount 2024-06-04 09:54:40 +01:00
674f277eba
fix: add new type StatusList
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.
2024-06-03 03:54:27 +01:00
c6c711c29b
fix: update error handling
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)
2024-06-02 11:35:43 +01:00
c05cce9154
chore: make the project REUSE compliant 2024-06-02 07:53:13 +01:00
6a799ff5ac
fix: parse HTML lists within a status
Updated the ConvertHTMLToText function to properly parse and convert
both ordered and unordered lists to plain text.
2024-06-01 08:29:45 +01:00
5cf6116fe8
fix: display full account name in list
Show the full names of the accounts of a list instead of their
account IDs
2024-05-31 21:41:10 +01:00
bff1eba972
feat: add NO_COLOR support
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
2024-05-31 21:18:11 +01:00
35575f32de
refactor: refactor the ListRepliesPolicy enum type
Refactor the ListRepliesPolicy enum type to bring it in line with the
others.
2024-05-30 19:42:11 +01:00
ea05294cb5
feat: add support for posting statuses
Users can now post one line statuses.
2024-05-30 18:46:33 +01:00
68ce6eed1d
fix: correctly show reposted statuses
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.
2024-05-27 01:05:31 +01:00
f3d9d34f3c
fix: content missing when displaying Status
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.
2024-05-26 15:07:34 +01:00
ecc8d51c09
feat: private notes
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.
2024-05-22 11:58:56 +01:00
f9f817eaa1
chore: remove account_relationship.go
Remove internal/model/account_relationship.go
2024-05-21 14:38:35 +01:00
d1ceecf697
refactor: move AccountRelationship to account.go
Move the AccountRelationship type definition to
internal/model/account.go
2024-05-21 14:36:49 +01:00
9d8cb2c68e
refactor: add new AccountList type for accounts
Add a new AccountList type for handling the printing of different list
of accounts (such as following, followers and blocked accounts).
2024-05-21 14:30:50 +01:00
dffd324243
feat: block and unblock accounts
This commit adds the functionality to allow users to block and unblock
accounts. The user will also be able to view a list of blocked
accounts.
2024-05-21 13:19:53 +01:00
a77f3741a0
feat: show user preferences
Optionally show the user's preferences when viewing account.
2024-05-20 19:46:05 +01:00
1a95384ba0
feat: followers and following others
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.
2024-05-20 17:31:50 +01:00
b91ebe5864
fix: update internal models for GoToSocial v0.15.0
Update the internal models for the client in line with the GoToSocial
v0.15.0 API.

Improve the output of the instance information.
2024-05-19 15:26:13 +01:00
32ca448ae7
feat: add and remove accounts from a list
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.
2024-05-19 11:48:36 +01:00
bc18c00c69
feat: add ability to interact with lists
Add the ability to create, update, list and delete lists.

Note, adding accounts or removing them from lists is not scoped
in this PR.
2024-02-27 19:52:59 +00:00
c38689fe28
fix(breaking): update the credentials filename
Save the credentials to the credentials.json file in the config
directory.
2024-02-27 09:31:17 +00:00
c39b173cd6
fix: add proper support for multi-line wrapping 2024-02-24 17:46:00 +00:00
ae2b5d8036
fix: fixed spelling error 2024-02-24 16:21:35 +00:00
a83aaa17f6
feat: add timeline support
Add support for viewing all timeline types (home, public, lists and
tags).
2024-02-24 15:53:29 +00:00
6f1879eeba
fix: use local time for timestamps
Display timestamps such as when a status was created using local time.
2024-02-24 11:22:57 +00:00
427ad5daf5
feat: add bold blue headers 2024-02-24 08:22:24 +00:00
e6ec5c71b6
refactor: implement the Stringer interface
Account, Instance and Status now implement the Stringer interface.
2024-02-23 14:19:12 +00:00
2c5123253a
feat: add Enbas
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.
2024-02-23 09:44:57 +00:00