Commit graph

144 commits

Author SHA1 Message Date
e5eb2d72a8
fix: set minimum go version to 1.22.5 2024-07-03 23:25:22 +01:00
f64f8a43a6
fix: command line format for showing followers
CHANGES:

- When viewing followers and followings from an account, the from flag
  must now be set by the user.
    - enbas show --type followers --from account --my-account
    - enbas show --type following --from account --account-name john

- New error type for unsupported show operations: Return an error if
  enbas detects an unsupported show operation (e.g. showing media from a
  list).
2024-07-03 14:20:25 +01:00
a8aeec2fbf
fix: update description for the vote flag 2024-07-03 13:34:27 +01:00
5ec1cc0e18
fix: rename the choose flag.
Rename to choose flag to vote for voting in polls.
2024-07-03 13:21:32 +01:00
1541aa6936
docs(README): fix link to installation guide 2024-07-02 13:31:14 +01:00
c12a2ce293
docs(README): update mirrored forges
Add Radicle as a forge (network) that the main branch is mirrored to.
2024-07-02 11:16:32 +01:00
4d0a42ba23
fix: mute accounts indefinitely by default 2024-07-01 21:27:04 +01:00
e4cce2cae4
refactor: update structure of switch executor 2024-07-01 21:12:20 +01:00
23ec6048b5
docs: updated documentation
- Converted documentation from Asciidoc to Markdown
- Updated the installation instructions and moved to a separate
  file in the docs directory.
- Updated the login instructions and moved to the Getting Started guide
  in the docs directory.
- Updated the licensing information in the main README.
- Created a page for changelog.
- Create a page for the user manual.
2024-07-01 13:49:11 +01:00
b03b3c31cc
fix: set absolute path to the credentials file
When creating the configuration file during the initialisation process
calculate the absolute path to the credentials file instead of the
relative path.
2024-06-29 16:02:19 +01:00
c8892a6535
feat: show user's actions on a status
Show whether the user has liked, boosted or bookmarked a status within
both the status and status list views.
2024-06-27 09:10:18 +01:00
b4cb362a7c
fix: use browser setting in config for URLs
Use the browser specified in the configuration file to open URLs. If the
browser is not specified the link will not be opened and an error is
returned to the user in most cases. This replaces the use of the BROWSER
environment variable and the xdg-open command (on linux).
2024-06-26 12:38:27 +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
63f0526f39
fix: ensure no errors when specifying media flags
Fix the issue where users specify flags/arguments when specifying their
media players.
2024-06-25 04:45:05 +01:00
632a620180
feat: view media with external applications
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.
2024-06-22 01:16:24 +01:00
67d4caf4cb
fix: show media type in timeline view 2024-06-20 12:30:20 +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
e8114f8d22
feat: view media attachment information
View media attachment information in the timeline and status views.
Users can also show detailed information of the attachments via the
attachment ID.
2024-06-18 19:58:59 +01:00
2a386fcda5
fix: parse HTML text for account metadata 2024-06-18 15:54:08 +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
48666645c7
fix: added missing line breaks in timeline view
Added missing line breaks between the status author and the status
content in the timeline view.
2024-06-17 21:59:34 +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
f73f1f5872
fix: check following before adding to list
Check if the user is following a specified account before adding it to a
list.
2024-06-16 20:29:16 +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
ac2e74cac3
fix: improve version output
Use text/tabwriter to print the version information with aligned
columns.
2024-06-10 19:36:00 +01:00
c04cd7e8a5
refactor: update code for the executor package
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.
2024-06-10 18:59:01 +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
d21f1fbf6a
chore: bump golang.org/x/net from 0.21.0 to 0.26.0 2024-06-10 10:17:02 +01:00
b48fac3341
fix: filter out emojis with underscores
When displaying the username also filter out the emojis with
underscores.
2024-06-09 17:24:07 +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
9c8476fa97
feat: add reblogging (boosting) support
Add support for reblogging (boosting) a status by adding a boost to said
status.
2024-06-06 06:23:26 +01:00
c8187587a8
fix: print commands in aligned columns
Use the text/tabwriter to write the commands and their summaries in
aligned columns when printing the help text.
2024-06-06 06:21:16 +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
0f7668a046
refactor: code refactoring
- use colon when unwrapping error
- update naming convention in show executor.
2024-06-03 07:00:39 +01:00
dd76a9a857
feat: add bookmark support
Add support for viewing the user's list of bookmarks, as well as adding
and removing statuses from the list.
2024-06-03 06:53:31 +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
8e4da7f827
fix: resolve index out of range bug in word wrap
Resolved the index out of range [-1] bug from the word wrap function
by checking the cursors' positions before evaluating the preceding
character.
2024-06-02 14:06:49 +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
88d6a8d498
fix: respect the default sensitivity setting
Respect the user's default posting sensitivity preference setting if
the user has not explicitly set the sensitive flag.
2024-05-31 05:22:17 +01:00
ca48d1bfce
feat: post a status from a file
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.
2024-05-31 04:18:34 +01:00
b6b6f75715
refactor: add more form types for the client 2024-05-30 20:04:55 +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