Thread Tools Display Modes
02/18/22, 01:00 AM   #1
Messajah
AddOn Author - Click to view addons
Join Date: Feb 2022
Posts: 11
Arrow [Program] Minion Addon List Exporter

This was just a quick and dirty creation today since I needed to export a human-readable list of all my addons.

It reads your minion.xml file for your list of currently installed addons, and retrieves the names and URLs of each, and then outputs it in alphabetical order. You can easily pipe it into a text file for saving.

Most importantly: The addon names (and URLs) are all fetched directly from ESOUI, which means that your friends can effortlessly copy-paste each exact addon title and find it in Minion. And if they're unsure which exact addon you meant, then they can just click "Visit Webpage" in Minion to find the one whose URL matches the list you gave them.


It's written with native Python 3 libraries for maximum portability since it doesn't have any external dependencies.

Those that know how to use Python already know how to use it. Anyone else, feel free to ask those that do.

If anyone wants to develop this further, feel free to take the code/inspiration and do whatever you want with it! I just needed a quick little tool, so my work here is done and no further support will be provided at all.


How to Use:

1. Install Python if you don't have it already.

2. Save this script (code below) as C:\Users\YourNameHere\.minion\export_minion_addons.py (important, but replace "YourNameHere" with your actual username).

3. Open a PowerShell/Command Prompt window, type cd "C:\Users\YourNameHere\.minion" to navigate to the folder.

4. Run it with this command: python export_minion_addons.py

5. If you want to save the output to a file directly, run it with this command: python export_minion_addons.py > my_addon_list.txt (will save it to "my_addon_list.txt" in the minion folder).

That's the extent of tutorial I have energy to provide here. It probably took longer to write this text than the actual tool itself.


Alright, here's the code:

Code:
# Minion Addon List Exporter v1.0 by Messajah
# Project Page: https://www.esoui.com/forums/showthread.php?t=10077

from urllib.request import urlopen, Request
from xml.dom import minidom
import re


installed_addons = {}

with minidom.parse("minion.xml") as dom:
    minion = dom.getElementsByTagName("minion")[0]
    games = minion.getElementsByTagName("games")[0]
    for game in games.getElementsByTagName("game"):
        if game.getAttribute("game-id") != "ESO":
            continue

        print("Fetching Minion addon information from ESOUI.com...")

        addons = game.getElementsByTagName("addons")[0]
        for addon in addons.getElementsByTagName("addon"):
            uid = addon.getAttribute("uid")
            assert isinstance(uid, str) and len(uid) > 0, "uid must be a non-empty string"

            print(".", end="", flush=True)  # Progress indicator.

            r = urlopen(
                Request(
                    f"https://www.esoui.com/downloads/download{uid}",
                    data=None,
                    headers={
                        "User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.85 Safari/537.36"
                    },
                )
            )

            body = r.read()
            assert isinstance(body, bytes), "expected a bytes object when reading webpage"
            body = body.decode("iso-8859-1")  # Yeah, ESOUI uses this ancient text encoding from the year 1985... haha.
            assert isinstance(body, str) and len(body) > 0, "esoui data must be a non-empty string. webpage download failed?"

            # Look for the info-page link to figure out the official addon URL and full title.
            # Example: <a href="info1703-CircularVotansMiniMap.html">Circular Votan's Mini Map</a>
            m = re.search(r"<a href=\"(info\d+-.+?\.html)\">(.+?)<\/a>", body)
            assert m, "unable to extract addon information from fetched webpage"

            title = m.group(2)
            url = f"https://www.esoui.com/downloads/{m.group(1)}"

            installed_addons[url] = title


print("\n\n\n--- Installed Addons: ---\n")

# Present the addon list alphabetically.
for addon in sorted(installed_addons.items(), key=lambda x:x[1]):
    print(f"## {addon[1]}\n{addon[0]}\n")

print("--- End of Addon List ---\n")


Example Output: See next message below.

Last edited by Messajah : 02/18/22 at 09:38 AM.
  Reply With Quote
02/18/22, 01:04 AM   #2
Messajah
AddOn Author - Click to view addons
Join Date: Feb 2022
Posts: 11
Here's example output. This is my own personal list of all my installed addons in Minion. It's an alphabetically sorted list which is basically Markdown-ish but easily readable as plain text too.

The markdown format makes it easy to share your list to places like Reddit (where you can set your post's format to "markdown mode" and then paste this to post a nicely formatted message).


Code:
## Action Duration Reminder
https://www.esoui.com/downloads/info1536-ActionDurationReminder.html

## Advanced Filters - FCOItemSaver filters PLUGIN
https://www.esoui.com/downloads/info782-AdvancedFilters-FCOItemSaverfiltersPLUGIN.html

## Advanced Filters - TTC Filters
https://www.esoui.com/downloads/info2794-AdvancedFilters-TTCFilters.html

## Advanced Filters - Updated
https://www.esoui.com/downloads/info2215-AdvancedFilters-Updated.html

## Armory Style Manager
https://www.esoui.com/downloads/info3219-ArmoryStyleManager.html

## Calamath's BookFont Stylist
https://www.esoui.com/downloads/info2505-CalamathsBookFontStylist.html

## Caro's Skill and Champion Point Saver (CP 2.0)
https://www.esoui.com/downloads/info2901-CarosSkillandChampionPointSaverCP2.0.html

## Circular Votan's Mini Map
https://www.esoui.com/downloads/info1703-CircularVotansMiniMap.html

## DecoTrack
https://www.esoui.com/downloads/info2100-DecoTrack.html

## Detailed Research Scrolls
https://www.esoui.com/downloads/info1761-DetailedResearchScrolls.html

## Essential Housing Tools
https://www.esoui.com/downloads/info1959-EssentialHousingTools.html

## FCO ItemSaver
https://www.esoui.com/downloads/info630-FCOItemSaver.html

## Group Synergizer - Enhanced LFG Features | Auto Accept Que | Better Notifications
https://www.esoui.com/downloads/info2286-GroupSynergizer-EnhancedLFGFeaturesAutoAcceptQueBetterNotifications.html

## LibAddonMenu
https://www.esoui.com/downloads/info7-LibAddonMenu.html

## LibAddonMenu - OrderListBox widget
https://www.esoui.com/downloads/info3080-LibAddonMenu-OrderListBoxwidget.html

## LibAsync
https://www.esoui.com/downloads/info2125-LibAsync.html

## LibCustomMenu
https://www.esoui.com/downloads/info1146-LibCustomMenu.html

## LibDialog - Custom confirmation dialog with 2 buttons
https://www.esoui.com/downloads/info1931-LibDialog-Customconfirmationdialogwith2buttons.html

## LibFeedback
https://www.esoui.com/downloads/info2079-LibFeedback.html

## LibFilters-3.0
https://www.esoui.com/downloads/info2343-LibFilters-3.0.html

## LibGetText
https://www.esoui.com/downloads/info2276-LibGetText.html

## LibHarvensAddonsSettings
https://www.esoui.com/downloads/info584-LibHarvensAddonsSettings.html

## LibMainMenu-2.0
https://www.esoui.com/downloads/info2118-LibMainMenu-2.0.html

## LibMediaProvider
https://www.esoui.com/downloads/info56-LibMediaProvider.html

## LibMotifCategories
https://www.esoui.com/downloads/info2409-LibMotifCategories.html

## LibResearch
https://www.esoui.com/downloads/info517-LibResearch.html

## LibSets
https://www.esoui.com/downloads/info2241-LibSets.html

## LibShifterBox
https://www.esoui.com/downloads/info2444-LibShifterBox.html

## LibTableFunctions-1.0
https://www.esoui.com/downloads/info2624-LibTableFunctions-1.0.html

## LibUespQuestData
https://www.esoui.com/downloads/info2484-LibUespQuestData.html

## Mer Character Sheet
https://www.esoui.com/downloads/info742-MerCharacterSheet.html

## Research Assistant
https://www.esoui.com/downloads/info111-ResearchAssistant.html

## Show TTC Price
https://www.esoui.com/downloads/info3079-ShowTTCPrice.html

## SpentSkillPoints
https://www.esoui.com/downloads/info303-SpentSkillPoints.html

## Tamriel Trade Centre
https://www.esoui.com/downloads/info1245-TamrielTradeCentre.html

## The Questing Guide
https://www.esoui.com/downloads/info2612-TheQuestingGuide.html

## TraitBuddy
https://www.esoui.com/downloads/info1058-TraitBuddy.html

## Urich's Skill Point Finder
https://www.esoui.com/downloads/info1863-UrichsSkillPointFinder.html

## Votan's Minimap
https://www.esoui.com/downloads/info1399-VotansMinimap.html

Last edited by Messajah : 02/18/22 at 09:38 AM.
  Reply With Quote
02/19/22, 11:06 AM   #3
wambo
AddOn Author - Click to view addons
Join Date: Mar 2017
Posts: 38
This isnt technically an addon... or is it?

But either way, I feel you should zip it and upload it as addon so ppl can find it via the minion search.
If they read the description they will notice that they need python and what to do to get the list...
  Reply With Quote
02/19/22, 11:27 AM   #4
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
If you upload it it should be added to the category "Utilities and tools" (https://www.esoui.com/downloads/cat88.html).

Not sure if this is supported by Minion 3 and will show then, as some categories are not shown. You need to test if you find any other tool listed there within Minion.
But as you said, it's not addon and should not be uploaded as this.
  Reply With Quote
03/04/22, 09:16 AM   #5
Messajah
AddOn Author - Click to view addons
Join Date: Feb 2022
Posts: 11
Originally Posted by Baertram View Post
If you upload it it should be added to the category "Utilities and tools" (https://www.esoui.com/downloads/cat88.html).

Not sure if this is supported by Minion 3 and will show then, as some categories are not shown. You need to test if you find any other tool listed there within Minion.
But as you said, it's not addon and should not be uploaded as this.

I can confirm that everything that's been exclusively marked as "ESO Tools & Utilities" won't show up inside Minion search. For example, these are marked exclusively as tools and can't be found in Minion:

- https://www.esoui.com/downloads/info...utoBackup.html
- https://www.esoui.com/downloads/info...fDatabase.html

Therefore it seems pointless to upload this, since @wambo wanted to be able to find it via Minion search. I can't achieve that, so this thread will have to be the distribution method.

I'd much rather see a similar feature built into Minion itself, such as this idea for a very easy import/export system that's so simple that it could be added to Minion in a coffee break:

https://www.esoui.com/forums/showpos...81&postcount=8
  Reply With Quote
03/04/22, 09:42 AM   #6
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Okay, thanks for the test. It was the other category than which shows up in Minion but says it's a tool, and no addon:
"https://www.esoui.com/downloads/cat35.html" Developer utilities

About Minion additions:
I personally got no contact with the devs nor would I know how to request this. Maybe he reads your post at the Minion forums.
Maybe the dev got the time to add it then, but I know he got very much work and personal life stuff around him, so this "coffeee break" could be out of scope...

Last edited by Baertram : 03/04/22 at 09:44 AM.
  Reply With Quote
03/27/22, 01:15 PM   #7
Taemaly
Join Date: Mar 2022
Posts: 1
Thank you so much for making this script, its is so helpful
  Reply With Quote

ESOUI » Site Forums » Minion » [Program] Minion Addon List Exporter

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off