From 4dc5cea89ab8d5b72314e0ed1ab9d5ae711baaa3 Mon Sep 17 00:00:00 2001 From: emma Date: Thu, 17 Nov 2022 15:09:19 -0500 Subject: [PATCH 1/8] fixed some problems with the command structure --- README.md | 187 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 106 insertions(+), 81 deletions(-) diff --git a/README.md b/README.md index c1d158e..a59ef82 100644 --- a/README.md +++ b/README.md @@ -68,12 +68,9 @@ Liberapay](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.c - A `man(1)` entry ### Low Priority: -- `fish(1)` autocomplete -- `bash(1)` autocomplete -- `zsh(1)` autocomplete -- [Nushell](https://www.nushell.sh/) autocomplete +- Shell autocomplete - Configurable search result display like [Starship](https://starship.rs) -- Versioning system repository package management & compilation +- Version-control system repository package management & compilation ## External-Dependent: - Conflict resolution @@ -86,38 +83,34 @@ Liberapay](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.c [Modrinth REST API docs](https://docs.modrinth.com/api-spec/) -# File Architecture +# File Structure ``` -~/.hopper/ -├── hopper.conf -├── cache/ +├── "$XDG_CONFIG_HOME"/hopper.toml +├── "$XDG_CACHE_HOME"/hopper/ │ ├── 1.19.1/ │ │ └── fabric/ │ └── 1.18.2/ │ ├── forge/ │ └── plugin/ -└── templates/ +└── "XDG_DATA_HOME"/templates/ └── example-template.hop -> ~/.minecraft/mods/example-template.hop ``` # Hopfile Structure -Hopfiles will contain a Minecraft version number, a list of packages, the name -of the type of package it uses, and any references to other hopfiles it's based -on, or "templates". If a hopfile is based on other template hopfiles, it -inherits the packages from them. A hopfile does not inherit the package or -Minecraft version from a template. +Hopfiles will contain a Minecraft version number, a list of packages, and any +references to other hopfiles on which it's based, or "templates". If a hopfile +is based on other template hopfiles, it inherits the packages from them. A +hopfile does not inherit the package or Minecraft version from a template. ``` -template = example-template - -mc-version = 1.19.2 - -type = fabric +template = "example-template" +mc-version = "1.19.2" [packages] -sodium +fabric-mod = [ "sodium", "lithium" ] +resource = "alacrity" ``` # Hopper Configuration File Structure @@ -129,99 +122,131 @@ which to compile mods. The latter will use a (potentially custom) build file format to be defined at a later date. ``` -[hopfiles] -file = ~/.minecraft/mods/1.19.1.hop +hopfiles = [ + "~/.minecraft/mods/template.hop", + "~/.minecraft/1.91.1/mods/1.19.1.hop" +] -# Mod Hosts - -[Modrinth] -api = https://api.modrinth.com/ - -[CurseForge] -api = https://api.curseforge.com/ - -# Git Repositories - -[Iris Shaders] -source = git+https://github.com/IrisShaders/Iris.git +[sources] +modrinth = "https://api.modrinth.com/" +curseforge = "https://api.curseforge.com/" +git = [ + "git+https://github.com/IrisShaders/Iris.git" + "git+https://github.com/CaffeineMC/sodium-fabric.git" +] ``` # Docs ## Usage -`hopper [SUBCOMMAND] [OPTIONS]` - -## Common OPTIONS: - -`-d`, `--dir [FILE]` - - Specifies the path for the hopfile being utilized - -`-f`, `--filename [FILE]` - - Saves to a specific file name. - -`-m`, `--mc-version [VERSION]` - - Specifies for what VERSION of Minecraft PACKAGES are being managed - -`-t`, `--type [TYPE]` - - Specifies what TYPE of PACKAGEs is being referenced. TYPEs include -modloader names like `fabric`, `forge`, and `quilt`, as well as `resource` packs -and mod`pack`s. +`hopper [options...] [subcommand...]` +## OPTIONS `-v`, `--verbose` - Includes debug information in the output of `hopper` commands. + Includes debug information in the output of `hopper` subcommands. -## SUBCOMMANDs +## SUBCOMMANDS -`get [OPTIONS] PACKAGE` +`get [options...] [targets...]` - Searches for a PACKAGE, displays the results, and downloads any selected -PACKAGES to the local cache. + Searches for packages, displays the results, and downloads any selected +packages to the local cache. If multiple targets are specified, results are +displayed in order of specification. -OPTIONS +### OPTIONS + + `-d`, `--dir [directory...]` + +  Specifies the directory to download to (default is "$XDG_CACHE_HOME"/hopper/). + + `-m`, `--mc-version [version...]` + +  Specifies for what version of Minecraft packages are being retrieved.  `-n`, `--no-confirm`   Does not display search results and downloads exact matches to the cache. Requires `--mc-version` and `--type` be specified. -`init [OPTIONS] --mc-version VERSION --type TYPE TEMPLATE` + `-t`, `--type [types...]` + +  Specifies what types of packages are being queried. + +`init [options...]`  Creates a hopfile in the current directory and adds it to the global known -hopfiles list in the configuration file. If a TEMPLATE is passed as an -argument, the hopfile is added as a new template. A name is generated -using the VERSION and TYPE specified unless `--filename` is used. +hopfiles list. -OPTIONS +### OPTIONS - `--template [TEMPLATE1,TEMPLATE2...]` + `-d`, `--dir [directory...]` -  Specifies TEMPLATE hopfiles' names upon which to base the new -hopfile. +  Specifies the directory in which the hopfile is being created. -`install [OPTIONS] PACKAGE` + `-f`, `--hopfile [hopfiles...]` - Adds a PACKAGE to the current hopfile and runs `hopper update`. If the -PACKAGE cannot be found in the package cache, it runs `hopper get` first. +  Specifies templates upon which to base the new hopfile. Hopfile +names should be comma-delineated. -OPTIONS + `-m`, `--mc-version [version]` - `--template [TEMPLATE1,TEMPLATE2...]` +  Specifies for what version of Minecraft packages are being managed. -  Specifies a template hopfile to which to install mods + `-t`, `--type [type...]` -`list [OPTIONS]` +  Specifies what type of packages will be listed in this hopfile. + +`install [options...] [packages...]` + + Adds packages to the current hopfile, symlinking them to its directory. If +the package cannot be found in the package cache, `hopper get` is run first. + +### OPTIONS + +  `-f`, `--hopfile [hopfiles...]` + +  Specifies hopfiles to which mods will be added. Hopfile names and +paths should be comma-delineated. + +`list [options...]`  Lists all installed packages. -`update [OPTIONS] PACKAGE` +### OPTIONS + +  `-f` `--hopfile [hopfiles...]` + +  Lists packages installed in a specified hopfile. + + `-m`, `--mc-version [version]` + +  Specifies for what version of Minecraft packages are being managed. + + `-t`, `--type [types...]` + +  List all packages of a specified type. + +`update [options...]` + + Updates installed packages and adds mods if they're missing to directories +with known hopfiles. + +### OPTIONS + + `-f`, `--hopfile [hopfiles...]` +  Updates only packages in the specified hopfile. Note that this +option creates a new file and symlink as it does not update the packages for +other hopfiles. + + `-t`, `--type [types...] [packages...]` + +  Updates only packages of a specified type. Optionally takes a list +of packages as an argument. + + `-m`, `--mc-version [version]` + +  Specifies for what version of Minecraft packages are being updated. - Updates installed PACKAGEs and adds mods if they're missing to directories -with known hopfiles. If a PACKAGE is passed, `--type` must be specified so that -hopper `update`s the correct package. \ No newline at end of file From 9e51aca6d36bfe9d0e5e68f59e912ddefba94eeb Mon Sep 17 00:00:00 2001 From: emma Date: Thu, 17 Nov 2022 15:14:22 -0500 Subject: [PATCH 2/8] OPTIONS headings were more readable before --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a59ef82..1e0fa3b 100644 --- a/README.md +++ b/README.md @@ -156,7 +156,7 @@ git = [ packages to the local cache. If multiple targets are specified, results are displayed in order of specification. -### OPTIONS +OPTIONS  `-d`, `--dir [directory...]` @@ -180,7 +180,7 @@ cache. Requires `--mc-version` and `--type` be specified.  Creates a hopfile in the current directory and adds it to the global known hopfiles list. -### OPTIONS +OPTIONS  `-d`, `--dir [directory...]` @@ -204,7 +204,7 @@ names should be comma-delineated.  Adds packages to the current hopfile, symlinking them to its directory. If the package cannot be found in the package cache, `hopper get` is run first. -### OPTIONS +OPTIONS   `-f`, `--hopfile [hopfiles...]` @@ -215,7 +215,7 @@ paths should be comma-delineated.  Lists all installed packages. -### OPTIONS +OPTIONS   `-f` `--hopfile [hopfiles...]` @@ -234,7 +234,7 @@ paths should be comma-delineated.  Updates installed packages and adds mods if they're missing to directories with known hopfiles. -### OPTIONS +OPTIONS  `-f`, `--hopfile [hopfiles...]`   Updates only packages in the specified hopfile. Note that this From 8cbc28a8c19768d8d5c445fcf0c1269f2a2dbf86 Mon Sep 17 00:00:00 2001 From: emma Date: Thu, 17 Nov 2022 15:15:49 -0500 Subject: [PATCH 3/8] formatting for -f option in update subcommand --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1e0fa3b..55bd013 100644 --- a/README.md +++ b/README.md @@ -237,6 +237,7 @@ with known hopfiles. OPTIONS  `-f`, `--hopfile [hopfiles...]` +   Updates only packages in the specified hopfile. Note that this option creates a new file and symlink as it does not update the packages for other hopfiles. From 1a120e816e9937ab2a1fcb1cc3817c3633fde51d Mon Sep 17 00:00:00 2001 From: emma Date: Thu, 17 Nov 2022 15:20:48 -0500 Subject: [PATCH 4/8] alphabetization --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 55bd013..48fa04e 100644 --- a/README.md +++ b/README.md @@ -242,12 +242,11 @@ OPTIONS option creates a new file and symlink as it does not update the packages for other hopfiles. - `-t`, `--type [types...] [packages...]` - -  Updates only packages of a specified type. Optionally takes a list -of packages as an argument. -  `-m`, `--mc-version [version]`   Specifies for what version of Minecraft packages are being updated. + `-t`, `--type [types...] [packages...]` + +  Updates only packages of a specified type. Optionally takes a list +of packages as an argument. From 962d11807e64685d2076c009b3edc2ae5c92dec9 Mon Sep 17 00:00:00 2001 From: emma Date: Thu, 17 Nov 2022 15:31:32 -0500 Subject: [PATCH 5/8] add types specification and replace polymc with prismlauncher --- README.md | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 48fa04e..27498a1 100644 --- a/README.md +++ b/README.md @@ -72,10 +72,10 @@ Liberapay](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.c - Configurable search result display like [Starship](https://starship.rs) - Version-control system repository package management & compilation -## External-Dependent: +### External-Dependent: - Conflict resolution - Dependency resolution -- Integration into [PolyMC](https://polymc.org/) and/or +- Integration into [Prism Launcher](https://prismlauncher.org/) and/or [theseus](https://github.com/modrinth/theseus) - Integration into `topgrade(1)` - Graphical frontend with notifications @@ -116,10 +116,10 @@ resource = "alacrity" # Hopper Configuration File Structure Hopper's configuration will be maintained with a list of all hopfiles known to -hopper. Its config will also contain a list of mod hosting sites like Modrinth -and CurseForge and a list of (remote or local) version-control repositories from -which to compile mods. The latter will use a (potentially custom) build file -format to be defined at a later date. +hopper. Its config file will also contain a list of mod hosting sites like +Modrinth and CurseForge and a list of (remote or local) version-control +repositories from which to compile mods. The latter will use a (potentially +custom) build file format to be defined at a later date. ``` hopfiles = [ @@ -138,6 +138,29 @@ git = [ # Docs +## Types + +There are multiple types of packages hopper can manage. + +### Mods +- `fabric-mod` +- `forge-mod` +- `quilt-mod` + +### Plugins +- `bukkit-plugin` +- `paper-plugin` +- `spigot-plugin` + +### Other +- `data-pack` +- `fabric-pack` +- `forge-pack` +- `resource-pack` +- `quilt-pack` + +These types are specified in various hopper subcommands and in its configuration. + ## Usage `hopper [options...] [subcommand...]` From b2b4b388e98b2b683665d24651729a3a71d548fa Mon Sep 17 00:00:00 2001 From: emma Date: Thu, 17 Nov 2022 15:36:03 -0500 Subject: [PATCH 6/8] add types i was unaware of --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 27498a1..4e014ac 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,9 @@ There are multiple types of packages hopper can manage. ### Plugins - `bukkit-plugin` - `paper-plugin` +- `purpur-plugin` - `spigot-plugin` +- `sponge-plugin` ### Other - `data-pack` From 015ab836c074e243b1b22a3a49c00ac50f9163de Mon Sep 17 00:00:00 2001 From: emma Date: Thu, 8 Dec 2022 15:03:00 -0500 Subject: [PATCH 7/8] minor changes --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4e014ac..aacbcba 100644 --- a/README.md +++ b/README.md @@ -185,11 +185,13 @@ OPTIONS  `-d`, `--dir [directory...]` -  Specifies the directory to download to (default is "$XDG_CACHE_HOME"/hopper/). +  Specifies the directory to download to (default is +"$XDG_CACHE_HOME"/hopper/).  `-m`, `--mc-version [version...]` -  Specifies for what version of Minecraft packages are being retrieved. +  Specifies for what version of Minecraft packages are being +retrieved.  `-n`, `--no-confirm` @@ -213,8 +215,7 @@ OPTIONS  `-f`, `--hopfile [hopfiles...]` -  Specifies templates upon which to base the new hopfile. Hopfile -names should be comma-delineated. +  Specifies templates upon which to base the new hopfile.  `-m`, `--mc-version [version]` From 36d67a1a61be29d774a0a29b1c96afbb12e34f19 Mon Sep 17 00:00:00 2001 From: emma Date: Thu, 8 Dec 2022 15:06:35 -0500 Subject: [PATCH 8/8] comma delineated --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index aacbcba..4408098 100644 --- a/README.md +++ b/README.md @@ -234,8 +234,7 @@ OPTIONS   `-f`, `--hopfile [hopfiles...]` -  Specifies hopfiles to which mods will be added. Hopfile names and -paths should be comma-delineated. +  Specifies hopfiles to which mods will be added. `list [options...]`