Emma Tebibyte
49691bd68c
updated main()
2023-04-19 01:03:28 -04:00
Emma Tebibyte
570adfc17d
more changes to error types
2023-03-28 18:27:22 -04:00
Emma Tebibyte
8448097387
main.rs: minor change to subcommand matching
2023-03-27 00:54:00 -04:00
Emma Tebibyte
34993ceb13
main.rs: changed command match err output to HopError
2023-03-27 00:44:35 -04:00
Emma Tebibyte
7eb530c9b0
main.rs: fixed license header
2023-03-27 00:32:59 -04:00
Emma Tebibyte
ba726358b4
args.rs: implemented From<PackageParseError> for (String, u32)
2023-03-27 00:32:27 -04:00
Emma Tebibyte
875290a75c
config.rs: Removed HopError From trait from ConfigError and refactored
2023-03-27 00:13:39 -04:00
Emma Tebibyte
3eedea2f9c
updated error types
2023-03-27 00:01:32 -04:00
Emma Tebibyte
623d65be0d
added .editorconfig file
2023-03-26 19:08:28 -04:00
[ ]
80fbbebc91
update copyright
2023-03-26 11:56:44 +01:00
[ ]
3eac2d2eab
create custom CError trait, using it for errors
...
The name chosen here is perhaps not ideal, and if you can think of a
better one that should probably be quickly used instead.
This is one option for C exit-code handling which is a lot cleaner than
the existing implementation in my opinion. Much of the cleanup also
comes from the enum error type in config. This enum's implementation
could be a lot cleaner with something like the 'thiserror' crate: the
message method could simply utilize that crate's derived Display
implementation.
Regarding `unwrap_or_else(|e| e.exit())`, it would have been ideal to
simply handle panics with a handler so it could simply be `unwrap()`,
but since panics tend to only pass the error string to the handler, an
exit method seems like the best solution.
Because this enforces consistency of adding the program invokation
before every error message, it has an unfortunate side-effect of the
usage text getting that information duplicated which may be seen as
undesirable. There are some workarounds to this, but I've deferred
deciding how best to do that (if it even is desirable to do so).
2023-03-26 11:44:52 +01:00
Emma Tebibyte
a0453f1cc3
updated deps
2023-03-25 19:21:15 -04:00
Emma Tebibyte
c2f6af517c
main.rs: minor tweaks
2023-03-25 06:41:14 -04:00
Emma Tebibyte
0f1561e0c4
args.rs, client.rs: changed to reflect changes to usage text
2023-03-25 06:11:43 -04:00
Emma Tebibyte
b01064e615
updated usage text
2023-03-25 05:58:45 -04:00
Emma Tebibyte
53bd5ce4b3
made usage info, fixed configuration parsing, and made a better error for unimplemented subcommands
2023-03-25 05:03:27 -04:00
Emma Tebibyte
261b40cc0b
client.rs: changed PackageType parsing to fix compilation and removed reqwest-based code; main.rs, args.rs: cleanup
2023-03-24 14:50:10 -04:00
Emma Tebibyte
8d0b82149d
oops!
2023-03-23 02:29:48 -04:00
Emma Tebibyte
7b7207b6ba
more pieces from #22
2023-03-23 01:40:49 -04:00
Emma Tebibyte
5f92afb375
changed config file name
2023-03-23 01:35:01 -04:00
Emma Tebibyte
c946310e27
updated README
2023-03-23 01:13:28 -04:00
Emma Tebibyte
3aeae3886a
added [ ] to authors list in Cargo.toml
2023-03-23 00:39:07 -04:00
Emma Tebibyte
5274597ce0
added commands.rs
2023-03-23 00:19:02 -04:00
Emma Tebibyte
8a0315822e
fixed copyright headers, rewrote most of the original code
2023-03-23 00:18:42 -04:00
Emma Tebibyte
70b2bb72be
added contribution guidelines
2023-03-23 00:17:33 -04:00
Emma Tebibyte
a22bcde459
added hopfile.rs from #22
2023-03-22 23:43:53 -04:00
Emma Tebibyte
ffc028adff
oops
2023-03-22 19:50:18 -04:00
Emma Tebibyte
31db7e6fea
license header update
2023-03-22 18:56:07 -04:00
Emma Tebibyte
04a7f27dea
oops forgot to make those pub
2023-03-22 18:42:20 -04:00
Emma Tebibyte
6dd9c4871d
arg types implemented
2023-03-22 18:25:31 -04:00
Emma Tebibyte
132d82680b
Merge pull request 'Fix error when no facets are specifed' ( #16 ) from BlankParenthesis/hopper:fix-filter into main
...
Reviewed-on: #16
2022-12-24 04:06:21 +00:00
Emma Tebibyte
5ae5aa668d
Merge pull request 'Implement Error parsing for API responses' ( #18 ) from BlankParenthesis/hopper:handle-status-errors into main
...
fixes #20
2022-12-24 03:56:06 +00:00
Emma Tebibyte
3c87609720
Merge pull request 'Add User-Agent to requests' ( #17 ) from BlankParenthesis/hopper:add-user-agent into main
...
Reviewed-on: #17
2022-12-24 03:47:48 +00:00
[ ]
552d75cbff
Implement Error parsing for API responses
2022-12-09 06:01:37 +00:00
[ ]
9064888265
Add User-Agent to requests
...
Modrinth strongly encourages (via the following response header) that
access to their services be done with a uniquely identifying user-agent
string.
> "x-user-agent-notice": "!!!!! Hey, you! Yes, **you**! You need to
> change your User-Agent ASAP or you may be blocked from using
> Modrinth's services! For more information see the documentation:
> https://docs.modrinth.com/api-spec/#section/User-Agents !!!!!"
The one added here follows the documentation recommendation for the
"best" example of a user-agent string.
2022-12-09 05:13:43 +00:00
[ ]
f7ba63b492
Fix error when no facets are specifed
...
The Modrinth API seemingly doesn't support an empty list for the facets
parameter. This solution simply skips adding that paremeter if it is
empty.
2022-12-09 04:18:15 +00:00
Emma Tebibyte
74de0d15b3
Merge pull request 'Better README' ( #15 ) from readme into main
...
Reviewed-on: #15
2022-12-08 20:07:59 +00:00
Emma Tebibyte
36d67a1a61
comma delineated
2022-12-08 15:06:35 -05:00
Emma Tebibyte
015ab836c0
minor changes
2022-12-08 15:03:00 -05:00
Emma Tebibyte
b2b4b388e9
add types i was unaware of
2022-11-17 15:36:03 -05:00
Emma Tebibyte
962d11807e
add types specification and replace polymc with prismlauncher
2022-11-17 15:31:32 -05:00
Emma Tebibyte
1a120e816e
alphabetization
2022-11-17 15:20:48 -05:00
Emma Tebibyte
8cbc28a8c1
formatting for -f option in update subcommand
2022-11-17 15:15:49 -05:00
Emma Tebibyte
9e51aca6d3
OPTIONS headings were more readable before
2022-11-17 15:14:22 -05:00
Emma Tebibyte
4dc5cea89a
fixed some problems with the command structure
2022-11-17 15:09:19 -05:00
mars
716579f824
Merge pull request 'Add support for filtering plugins and resource packs' ( #14 ) from PluginResourcePackSupport into main
...
Reviewed-on: #14
2022-10-25 02:32:30 +00:00
spookdot
ace6b25381
Add plugins and modpack distinction
2022-09-16 18:51:55 +02:00
spookdot
6b37d007c7
Added package type filter
2022-09-12 01:05:23 +02:00
mars
6ab97922cb
Merge pull request 'Changed out StructOpt for Clap' ( #13 ) from UpgradeToClap into main
...
Reviewed-on: #13
2022-09-09 10:00:14 +00:00
Emma Tebibyte
a5d3ff4231
specified types
2022-09-06 19:00:08 -04:00