Commit graph

105 commits

Author SHA1 Message Date
96629c76f2
update documentation 2024-07-31 01:19:57 +01:00
3e47dea9ba
add support for showing statuses from an account 2024-07-10 13:52:11 +01:00
c468d1fb62
refactor: create constant values for base paths
Created constant values for the Accounts and Follow Requests base API
paths.
2024-07-10 12:06:36 +01:00
6e260266b1
fix: update the status list printer function
- Show whether a status is a boost, a reply to another status or a
  normal post.
- Move the "Created At" field to a new line.
- Show the date and time when a status was boosted.
2024-07-10 09:14:13 +01:00
2bb801b6d0
feat: add ability to reply to statuses 2024-07-09 03:13:54 +01:00
ec282e207f
refactor: use baseListPath where necessary
Replace the static string of the base list API path with the
baseListPath constant.
2024-07-09 00:25:43 +01:00
28bf902599
fix: improve how lists are displayed
Improve how ordered and unordered lists are displayed within the
contents of a status by adding indentation when a list item is wrapped.

Changes:

- fix: improve how ordered and unordered lists are displayed in status
  and status list views.
- fix: improve how media attachments are displayed in status list views.
- refactor: move the line wrapping and HTML converting functions from
  utilities to the internal printer package.
- refactor: the convertHTMLToText now (optionally) applies line
  wrapping after conversion.
2024-07-08 22:53:13 +01:00
c72340490d
fix: user's boosted action in status list view
Correctly use status.Reblogged instead of status.Bookmarked value when
showing if a user has boosted a status or not in the status list view.
2024-07-07 19:15:23 +01:00
e0b4174a76
chore: add missing license annotation 2024-07-06 18:11:15 +01:00
181384fea3
docs: add the user manual
The user manual: a page that users can reference when playing with
Enbas.
2024-07-06 17:36:42 +01:00
d52bb3fdf4
fix: print error messages from instance
If an error occurs when sending a request to an instance, try and decode
and print the error message back to the user.
2024-07-04 11:27:00 +01:00
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