Giter Club home page Giter Club logo

eso-addons's Introduction

ESO Addon Manager

Support Server

This repository holds a simple command line ESO Addon Manager written in Rust. With it you can manage addons from esoui.com.

The list of addons you want to install is put in a single configuration file. This means you can save and share your addon configuration with a single file!

Usage

asciicast

Configuration

Run:

eso-addons list

to generate the config file. The config file is in your user directory:

  • Linux - /home/<username>/.eso-addons.toml
  • Windows - C:/Users/<username>/.eso-addons.toml

If necessary, edit the addonDir parameter in the config file to the directory, where your ESO addons should be placed:

addonDir = "/home/damian/drive_c/users/user/My Documents/Elder Scrolls Online/live/AddOns" # edit this, if needed

Install new addon

To install a new addon use the eso-addons add command:

❯ eso-addons add
✔ URL of the addon on esoui.com · https://www.esoui.com/downloads/info1536-ActionDurationReminder.html
✔ Is addon only a dependency? · No
🎊 Installed ActionDurationReminder!

Update installed addons

In case you want to update the addons to the newest version execute eso-addons update:

❯ eso-addons update
✔ Updated ActionDurationReminder!
✔ Updated LibAddonMenu-2.0!

List addons, show missing or unused addon dependencies

To list the status of all installed addons, show missing or unused dependencies use eso-addons list

❯ eso-addons list
+------------------------+-----------+
| Name                   | Status    |
+------------------------+-----------+
| ActionDurationReminder | INSTALLED |
| LibAddonMenu-2.0       | MISSING   |
+------------------------+-----------+

Remove addons

To remove an addon use eso-addons remove:

❯ eso-addons remove
✔ Select addon to remove · ActionDurationReminder
✔ Uninstalled ActionDurationReminder!

There is also the eso-addons clean command, which can be used to remove addons, which are not managed by eso-addons (i.e. you installed them manually):

❯ eso-addons clean
🗑 Addons to remove:
- LibAddonMenu-2.0

✔ Do you want to remove these addons? · Yes

✓ LibAddonMenu-2.0 removed!

Backup and share your addon configuration

Just backup the eso-addons.toml file and that's it! In case you have to restore the addons (e.g. after an OS reinstall), just put the backuped eso-addons.toml in user directory and run eso-addons update to install all addons.

You can also share your addon configuration with other people by sending them your eso-addons.toml file.

eso-addons's People

Contributors

arviceblot avatar dependabot[bot] avatar lowlevellover avatar trojan295 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

eso-addons's Issues

Update error

PS C:\Users\aleks> eso-addons-x86_64-pc-windows-msvc.exe update
✔ Updated DolgubonsLazyWritCreator!
✔ Updated ImprovedDeathRecap!
✔ Updated LibAddonMenu-2.0!
✔ Updated CombatAlerts!
✔ Updated LibLazyCrafting!
✔ Updated FancyActionBar!
✔ Updated HodorReflexes!
✔ Updated LibPrice!
✔ Updated LibCombat!
✔ Updated LibDataShare!
✔ Updated Azurah!
app error: cannot download addon https://www.esoui.com/downloads/download1245: The process cannot access the file because it is being used by another process. (os error 32)

Improve error handling

In many places, .unwrap() is used, which causes panics.
It's also worth to consider replacing the simple_error package with custom error structs, to have more context, when handling errors.

Feature: Install addon by name instead of URL

It should not be too complicated to take a keyword and use it with the esoui search.
The search on the website already delivers the addon page if only one result fits, if there are multiple, the names could be parsed and given into a selection (1-X) with the option to deny and check through the search results on esoui

Found <x> Addons searching for "<keyword>":
<URLtoESOUISearch> # clickable link 
1. <name-searchresult1>
2. <name-searchresult2>
3. ...

Select the result by typing the according number, 'n' to abort or insert the URL for an addon manually.

Kind of what I'd imagine

Missing addon metadata file

PS C:\Users\aleks> eso-addons-x86_64-pc-windows-msvc.exe add https://www.esoui.com/downloads/info2892-PithkasAchievementTracker.html
app error: cannot read addon PithkaAchievementTracker: missing addon metadata file

backtrace installing LibHistoire

Trying to install the 'LibHistoire' lib for MM, got this:

$ eso-addons add 'https://www.esoui.com/downloads/fileinfo.php?id=2817'
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/cli/add.rs:38:48
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I'm presuming this is easily reproducible by you; if not, let me know and I can provide the full backtrace.

Add-on directory permissions error

Problem

While attempting to install LuiExtended, the following error occurs:

❯ eso-addons add https://www.esoui.com/downloads/info818-LuiExtended.html
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }', src/addons.rs:182:62

It seems this is related to a permissions issue with a directory in the archive:

❯ ls -l LuiExtended/media/icons/ 
total 0
dr-xr-xr-x  2 arviceblot  staff  64 Jan  4 20:32 abilities

I'm not sure why the archive is created this way, but it leads the directory to be created as unwritable, causing the permission error when writing additional files for it.

Potential solutions

  • Apply unix file permissions after all files are written. I'm not really a fan of this because you would have to store permissions for all file as the archive is iterated.
  • Use default permissions for directories to ensure they are writable. Also not a big fan of this because of hardcoding permissions.

P.S.

@Trojan295 I would love your feedback on this. I really enjoy the spirit of this program, as it means I don't have to use Minion :P

Don't list nested addons in remove

When we have an addon installed, which has nested addons inside (e.g. CombatMetrics has CombatMetricsFightData), then eso-addons remove shows also the nested addon.
This should not be the case, as only the root addons should be managed.

❯ cargo run list
    Finished dev [unoptimized + debuginfo] target(s) in 0.05s
     Running `target/debug/eso-addons list`
+------------------+-----------+
| Name             | Status    |
+------------------+-----------+
| CombatMetrics    | INSTALLED |
| LibAddonMenu-2.0 | MISSING   |
| LibCombat        | MISSING   |
| LibCustomMenu    | MISSING   |
+------------------+-----------+
❯ ls addons/CombatMetrics/CombatMetricsFightData
CombatMetricsFightData.lua  CombatMetricsFightData.txt
❯ cargo run remove
    Finished dev [unoptimized + debuginfo] target(s) in 0.05s
     Running `target/debug/eso-addons remove`
? Select addon to remove › 
❯ CombatMetricsFightData
  CombatMetrics
Failed to execute: CTRL+C

Directory not found error

Hello! I cloned and built eso-addons and after running it for the first time and creating a config file it's not able to load my addons folder. I've verified what's in the config file is the correct path and I've tried testing with the binary from the latest release. Is there something I'm missing?

eso-addons on  master is 📦 v0.3.0 via 🦀 v1.58.0-nightly
❯ target/debug/eso-addons list
Failed to execute: No such file or directory (os error 2)

eso-addons on  master is 📦 v0.3.0 via 🦀 v1.58.0-nightly
❯ cat ~/.eso-addons.toml
addonDir = "/home/skraelingjar/.steam/steam/steamapps/compatdata/306130/pfx/drive_c/users/steamuser/Documents/Elder Scrolls Online/live/AddOns"

I'm running linux 5.14.15-arch1-1.

Feature: Install dependencies listed in the manifest

The dependencies are already parsed, so it should not be too hard to parse them just after the install process, to start installing the needed dependencies.

Optional dependencies could be added with a '-o' parameter, or maybe optional dependencies are installed by default so --no-optionaldependencies would avoid them being installed.

The function could also take multiple addon names, to run a "reapair" of dependencies for addons that were installed in another way, or before the feature was added, or to install optional ones after the initial installation.

Create config file, if it does not exist

Currently, if the config file does not exist eso-addons throws an error:

$ eso-addons list
Failed to execute: while reading config file at /home/damian/.eso-addons.toml: No such file or directory (os error 2)

It should instead create an initial configuration file at the default config location. The config could have the addonDir set to according to the operating system and it could have a sample addon configuration eg.:

# addonDir - location of the ESO addon directory
addonDir = "<default-ESO-addon-path-depending-on-the-OS>"

# addons - list of addons to be installed
#   name - name of the addon
#   url - download URL of the addon, it is the link under the Download button on ESOUI
#   dependency - (default: false) determines, if the addon is a dependency.
#                Set this to true, if you don't use the addon standalone, but only as a dependency for another addon
#[[addons]]
#name = "SkyShards"
#url = "https://www.esoui.com/downloads/download128-SkyShards.html"

Remove panics, if there are not addons to remove

❯ cargo run list
    Finished dev [unoptimized + debuginfo] target(s) in 0.05s
     Running `target/debug/eso-addons list`
++
||
++
++
❯ cargo run remove
    Finished dev [unoptimized + debuginfo] target(s) in 0.05s
     Running `target/debug/eso-addons remove`
thread 'main' panicked at 'there must be at least one selectable item', /home/damian/.cargo/registry/src/github.com-1ecc6299db9ec823/requestty-ui-0.2.1/src/select/mod.rs:100:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Display parent of dependencies

When installing a lot of new addons it's easy to miss dependencies and it's hard to differentiate between nested dependencies and ones that need to be found

Ignore extra master Merchant addons

I am moving from Minion 3 to your tool and I am super afraid of removing unused because of the MM data. Is there a way to ignore the extra data files?

MM01Data-MM14Data

Addon installation error

PS C:\Users\aleks> eso-addons-x86_64-pc-windows-msvc.exe add https://www.esoui.com/downloads/info3034-HarvestMap-Data.html
app error: cannot read addon HarvestMapData: missing addon metadata file

Failed to execute: while downloading <addon>: while reading addon: Not a directory

I cloned the project, copied the example eso-addons.toml and changed the directory according to my setup. But when I run eso-addons update it installs most of the entries but fails at LibChatMessage

Failed to execute: while downloading LibChatMessage: while reading addon: Not a directory (os error 20)

Strangely, all other addons are downloading as intended (and I can see their files in the Addons dir). I also checked ingame and surprisingly, it recognizes all addons up to and including libChatMessage, but not the ones after that.

looking through the code, the error gets created in addons.rs on line 35, but my Rust is rusty (pun intended), so I am not quite sure why read_dir fails.

is this a known error or is there a workaround for it? If i get around I can write one up and make a PR, is this repo still actively used or should i fork?

Feature Suggestions

I love it! just like cursebreaker. i couldn't get minion to work. i think it had some issue with the install dir. I have a few suggestions :)

should be able to handle 'infoXXXX' page links. in the interim, let users know they need to use the 'downloadXXXX' link from that page. -- i see i missed the current instructions in the example config!

should be able to handle drives in windows, C:\ etc. in the interim, let windows users know they can use addonDir = "/users/[account]/Documents/Elder Scrolls Online/live/AddOns" in the config file -- added link to suggested change below

current directory isnt checked for .eso-addons.toml on windows. in the interim, let windows users know they should specify a config file --config c:\path\to.eso-addons.toml every time they use eso-addons.

package exe in .zip, naming the zip with the version and keeping eso-addons.exe inside?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.