Giter VIP home page Giter VIP logo

minecraft-mod-manager's Introduction

mcman/mmm (minecraft-mod-manager)

python Latest PyPI version Total alerts Language grade: Python

Install and update mods from CurseForge and Modrinth through a simple command.

News — Slow progress and an Alternative CLI (2022-08-02)

Hi everyone!

I have acquired a CurseForge API key, but still want to make it easy to install mods from CurseForge without applying for a key.

Maybe that's not possible, but I have some ideas at least for improving mcman. This includes downloading mods from CurseForge.

For now though, I can point you to an awesome and in my opinion, better alternative: ferium.

Cheers, Senth

(News Archive)

Features

  • Install mods with minecraft-mod-manager install mod_name
  • Update all mods with minecraft-mod-manager update, mcman update or mmm update
  • Searches on CurseForge and Modrinth for updates on installed mods
  • Filter updates by
    • Stable (default), beta --beta, or alpha --alpha releases
    • Minecraft version -v 1.16.4
    • Fabric/Forge mod --mod-loader fabric

Installation/Upgrade & Requirements

  1. Requires at least python 3.8
  2. Install/Upgrade with $ pip install --user --upgrade minecraft-mod-manager

Examples

Note! All examples start with minecraft-mod-manager, mcman or mmm (shorthand commands) then comes the arguments.

Arguments Description
install jei Searches for jei on all sites and installs the latest version.
install sodium=modrinth Install Sodium specifically from modrinth.
install dynmap=curse:dynmapforge Install dynmap with slug dynmapforge on Curse.
install sodium=modrinth --mod-loader fabric Install fabric version of sodium. Generally not necessary to specify mod-loader
install carpet fabric-api sodium lithium Easily install many mods.
update Update all mods.
update --pretend Check what will be updated. Does not change anything.
update sodium lithium phosphor Update specific mods.
update -v "1.16.5" Updates to latest mod version which works with specified MC version.
update -v "1.16.1" If you upgraded the mods, to a higher version (e.g. snapshot), you can easily downgrade them again.
configure sodium=modrinth Change the download site for a mod.
configure sodium= Doesn't work, known bug! Reset download sites (downloads from all sites again)
configure carpet=curse:fabric-carpet Change site slug for a mod.
configure carpet=curse If you don't define a slug, you will reset the slug for that mod.
configure sodium=modrinth carpet=curse Easily configure multiple mods at the same time.
configure carpet=modrinth,curse:fabric-carpet Configure different slugs for different sites.
list List all installed mods.

Full usage

positional arguments:
  {install,update,configure,list}
                        Install, update, configure, or list mods
  mods
                        The mods to update or configure.
                        If no mods are specified during an update, all mods will be updated.
                        You can specify download sites and slugs for each mod (if necessary)
                           dynmap=curse
                           dynmap=curse:dynmapforge
                           dynmap=curse:dynmapforge,modrinth
                           dynmap=curse:dynmapforge,modrinth:dynmap

minecraft:
  -d DIR, --dir DIR     Location of the mods folder. By default it's the current directory
  -v MINECRAFT_VERSION, --minecraft-version MINECRAFT_VERSION
                        Only update mods to this Minecraft version. Example: -v 1.16.4
  --beta                Allow beta releases of mods
  --alpha               Allow alpha and beta releases of mods
  --mod-loader {fabric,forge}
                        Only install mods that use this mod loader. You rarely need to be
                        this specific. The application figures out for itself which type
                        you'll likely want to install.

logging & help:
  -h, --help            show this help message and exit
  --version             Print application version
  --verbose             Print more messages
  --debug               Turn on debug messages
  --pretend             Only pretend to install/update/configure. Does not change anything
  --no-color            Disable color output

Alternatives

GUI

CLI

Authors

minecraft-mod-manager's People

Contributors

bluscream avatar renovate-bot avatar renovate[bot] avatar senth 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  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  avatar  avatar  avatar  avatar  avatar

minecraft-mod-manager's Issues

Parallel downloading

Things would be faster if the mods were downloaded and installed in parallel.

Update all button

Design and implement the GUI side of the update all button. Use stub information for now.

Requirements / Feature

  • Show be clearly visible and the first thing the user looks at
  • Somewhere on the button show the number of updates that exists

--allow-beta doesn't work

When trying to update dynmapforge it doesn't update to the latest beta version even though --allow-beta is used.

shulkerboxtooltip isn't updated correctly when installed version had been removed

Describe the bug

While updating mods, shulkerboxtooltip didn't upgrade although there was a newer version out. The problem seemed to be that the installed version doesn't exist in CurseForge anymore. I also think the installed version was updated through mcman.

Steps to reproduce

Steps to reproduce the behavior:

  1. Had shulkerboxtooltip installed with the version 3.0.0-alpha4 (not available on CurseForge).
  2. Ran mcman update -v 1.17.1
  3. shulkerboxtooltip didn't update (no update was found)

Expected Behavior

Should update shulkerboxtooltip from 3.0.0-alpha4 -> 3.0.0

Info

  • OS: linux
  • Python --version: 3.8.6
  • minecraft-mod-manager --version: 1.2.4

Remember outdated mods or force update

Is your feature request related to a problem? Please describe.

There is no way to track mods that have not yet updated to a specific version and install them when they release.

Describe the solution you'd like

There are two solutions I have considered, the first one is preferrable for me, but either would be great

  1. Make mcman update with a version flag (or potentially an additional force flag) rename mods that aren't compatible with the specified version to <modfilename>.disabled (for consistency with multimc. If mcman update is run again, and a mod that was previously disabled for being outdated now has an updated version, download the new version and remove the mod.jar.disabled file
  2. Store mods that have not yet updated to the specified version in the database, and check if they have updated to the requested version when mcman update is run, and if so, download that version.

Describe alternatives you've considered

I have considered storing them in a separate directory and running mcman update occasionally in that directory to see if they update, but it would be more convenient to have it all in one directory

`update --pretend` throws errors

Describe the bug

When there are updates and you run --pretend it gets the version from the file. But since there's no file to read it can't get the updated version.

Steps to reproduce

Steps to reproduce the behavior:

  1. Ran mcman install -v 1.16.5 carpet
  2. Then ran mcman update --pretend

Expected Behavior

Should display the updated version and not throw an error

Possible solution

Display the version from the VersionInfo if --pretend. And it should not try to load the file info during --pretend

Info

  • OS: Ubuntu
  • Python --version: 3.8.6
  • minecraft-mod-manager --version: 1.2.4

From #179

Describe the bug

Tried updating all mods and it showed errors on several mods

Failed to parse mod file mods\CraftTweaker-fabric-1.18.2-9.1.127.jar
Traceback (most recent call last):
  File "C:\Users\redacted\AppData\Roaming\Python\Python310\site-packages\minecraft_mod_manager\gateways\jar_parser.py", line 50, in _get_mod_info
    with ZipFile(file, "r") as zip:
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python310\lib\zipfile.py", line 1240, in __init__
    self.fp = io.open(file, filemode)
FileNotFoundError: [Errno 2] No such file or directory: 'mods\\CraftTweaker-fabric-1.18.2-9.1.127.jar'

!!! Please report this and paste the above message !!!
    ❌ Corrupted file.

Steps to reproduce

Steps to reproduce the behavior:

  1. Ran minecraft-mod-manager.exe --pretend -d mods -v 1.18.2 --mod-loader=fabric update

Expected Behavior

Will show mods to be updated

Info

  • OS: win10
  • Python --version: 3.10
  • minecraft-mod-manager --version: 1.27

Does not remove old jar file if mod is updated

Additionally, I could not list my mods afterward because of the duplicate files:

Traceback (most recent call last):
  File "c:\python39\lib\site-packages\minecraft_mod_manager\gateways\sqlite.py", line 138, in insert_mod
    self._connection.execute(
sqlite3.IntegrityError: UNIQUE constraint failed: mod.id

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Python39\Scripts\minecraft-mod-manager.exe\__main__.py", line 7, in <module>
  File "c:\python39\lib\site-packages\minecraft_mod_manager\__main__.py", line 21, in main
    repo = RepoImpl(jar_parser, sqlite, downloader)
  File "c:\python39\lib\site-packages\minecraft_mod_manager\adapters\repo_impl.py", line 26, in __init__
    self.mods = self.db.sync_with_dir(jar_parser.mods)
  File "c:\python39\lib\site-packages\minecraft_mod_manager\gateways\sqlite.py", line 65, in sync_with_dir
    self.insert_mod(mod)
  File "c:\python39\lib\site-packages\minecraft_mod_manager\gateways\sqlite.py", line 151, in insert_mod
    raise ModAlreadyExists(mod)
minecraft_mod_manager.core.errors.mod_already_exists.ModAlreadyExists: Mod architectury already found in the the db.

Doesn't work

When i try to use minecraft-mod-manager it gives me the following error:

Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 194, in _run_module_as_main
return run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\xmb\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Scripts\minecraft-mod-manager.exe_main
.py", line 4, in
File "C:\Users\xmb\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\minecraft_mod_manager_main
.py", line 1, in
from .adapters.repo_impl import RepoImpl
ModuleNotFoundError: No module named 'minecraft_mod_manager.adapters'

System: Windows 10 Build 19042.928
Python: version 3.8.9

Add examples to README

From @IITFA in #15

Might also be good to add some example commands and maybe a "introduction" of sorts. Using just logic to guess what should be done based on the available arguments seems to result in errors, still trying to figure that out.

Improved search functionality when searching on CurseForge

Is your feature request related to a problem? Please describe.

It cannot find CurseForge only mods very easily. I pretty much always have to configure the mod manually.

Describe the solution you'd like

It should search on other sites like FiberMC for fabric etc which can provide the CurseForge link to the mod.

Describe alternatives you've considered

I just manually configure new mods that are only on CurseForge.

Possible solution (from @Senth)

Make the installation interactive if no mod is found so that the user can select the mod from the search result

Show summary and ask before applying changes

Is your feature request related to a problem? Please describe.

After #75, #76, and #89 will be implemented, you won't really get a good overview of the changes that will happen.

Describe the solution you'd like

After fetching all updates etc, (need to be after fetching the updates since we don't know the version before the file has been downloaded). But before deleting the old files and doing any changes. Display a summary of all changes that will happen (update, disable, enable) and ask for confirmation.

It's important to note here, that if the user presses Ctrl+C we have to intercept it and quit the program gracefully, otherwise there will be duplicate mod files downloaded. One solution would be to place it in a temp directory, or something similar before actually deleting or removing it.

Add an option --yes -y to skip asking for confirmation.

Use Curse API rather than checking their website

Currently, we're getting all the mod information from the curse website. This is a bit slow since it has to load the entire page. It also easily breaks if there are changes to the site.

Instead, we want to use Curse's official API to get mod information and update.

This will also solve #10

Add minimum python version into the documentation

I'm totally new to python scripts and pip, but I did:
pip3 install --user minecraft-mod-manager
(and tried pip2 and pip with same result)

and got this error:
Could not find a version that satisfies the requirement minecraft-mod-manager (from versions: )
No matching distribution found for minecraft-mod-manager

No idea how to fix this. Searching around doesn't seem to have any solutions.

Add `downgrade` as `update` should only update mods, never downgrade

Describe the bug

Minecraft Mod Manager is downloading an older version of Sodium than the one installed.

sodium
    🟢 Updated 0.3.0+build.483 -> 0.2.0+build.4

The build I have installed is a newer build from github with a higher version number. Still, the latest version available on Curse/Modrinth is being downloaded.

Steps to reproduce

Steps to reproduce the behavior:

  1. Installed latest sodium dev build manually from github
  2. Ran mcman update

Expected Behavior

Minecraft Mod Manager should compare the installed version number to the latest available version and only download an update if the number is greater.

Info

  • OS: Windows 10
  • Python --version: 3.9.6
  • minecraft-mod-manager --version: 1.2.4

Temporarily Enable/Disable mods

Is your feature request related to a problem? Please describe.

During Minecraft updates, some mods take a bit longer to update. Instead of having to remove them, it would be great to have an easy way to enable/disable a few mods.

Describe the solution you'd like

  • A two new commands
    • mcman disable dynmap carpet
    • mcman enable dynmap
    • mcman enable (enables all mods)
  • Append .disabled to the filename (to be consistent with MultiMC)

Should also be easy to do in the GUI

Let the user configure preferred repository

Problem

By default, it always searches CurseForge first and then Modrinth. Some might want to download from Modrinth first

DoD

  • Add user configuration in their home directory
  • Let the user override which repository to download first from

v2 - The GUI Update

This issue contains all high-level information about the next version (v2 - the GUI Update).

Problem with the CLI

Using the command line is unintuitive for people that aren't used to using command lines. To make this script appeal to the masses it needs to have a GUI that works intuitively.

Vision

It should take less than one minute for everyone to update mods from the very first run of the program. And it should just work.

Hurdles

While it's a high vision to have, it should work in most scenarios. But there are some hurdles. Mainly that CurseForge doesn't have a good search engine. But that might be fixed by using alternative search engines #91

MVP Features

  • Automatically find all MC instances (MultiMC, Minecraft Launcher, Twitch App)
    • Also search in the configurable path (only available as an option through the cfg from start)
  • Show all MC instances and mods
    • Automatically detect MC version
    • List mods for that instance
    • See which have an available update
  • One button to update all mods across all instances
  • Search and install mods across CurseForge and Modrinth (more to come?)
  • Flag specific mods to not update (sometimes you just want to have a specific version of a mod)
  • Enable/Disable mods. This does just enable and disable mods.
  • Incompatible mods
    • Automatically set mods as incompatible when an MC version has been changed (unless it's still compatible)
    • When updating check for updates on incompatible mods

Future Features/Ideas

These are not part of the v2 update. but logged here to remember them.

  • Check the compatibility of an instance if you were to upgrade to a newer MC version
  • Show more information about mods
  • Show number of updates per tab
  • Settings window
  • Stability per mod
  • Configure locations to search for MC instances?

Progress Status

Below you can see the status of all v2 tasks. You can also check out v2 Project site for a Kanban view of the project.

GUI

CLI

GUI/CLI/Logic

Logic

Packaging

Wiki

  • #70
  • Probably more...

DoD

When v2 is released.

Add "tabs" for multiple instances

Add tabs or something similar for changing between multiple Minecraft instances.

Maybe do some research on a good way to display the tab.

What should be displayed?

  • Friendly name?
  • Icon?
  • Minecraft version?
  • Update count

Automatically and manually select fabric/forge for download

Problem

Currently, if a mod has support for both forge and fabric and we're using the install method. It will pick the latest one and you don't have the ability to select whether you want the Fabric or Forge version.

Solution

  • Automatically filter by the majority rule. I.e. if you have 12 fabric and 1 forge mod installed, it will install a fabric mod.
  • Add parser option --fabric and --forge to override the majority role or when using the first time without any pre-installed mods.

Desgin and display stub mods in a list with all information

Design and create the first draft of all mods in a Minecraft instance.

Use Material design for everything

Information that's needed

  • Selection box (use Material design)
  • Name
  • Version 2.0.0 -> 2.0.1
    • Use right arrow icon
  • Don't update button.
    • Upgrade icon paired with disable icon.
    • Red when active
  • Upgrade button
    • Should be done icon if no update is available)
  • Incompatible icon
    • Warning icon
  • Delete icon
    • Trash can
  • Enabled/Disabled
    • Using toggle icon (checkbox-like) from Material design

DoD

  • Do research on what information should be presented and add it to this issue
  • Design the layout
  • Create a draft in Kivy which can be improved later on
    • Add all icons and buttons
    • Change/Add new checkbox that uses material design
    • Add the toggle
    • Make the toggle work when clicking on it. It should also change the UI text and make it darker (for now)
    • Hover text for everything

Cannot find Entity Culling

Two problems:

I am trying to install this mod called Entity Culling Fabric/Forge using minecraft-mod-manager install entityculling but it doesn't seem to find it:

entityculling
    🔺 Mod not found on any site...
Mod entityculling not found on any site.
Check so that it's name is correct. Or you can set the name by running:
minecraft-mod-manager configure entityculling=NEW_NAME

Trying minecraft-mod-manager install curse:entityculling doesn't seem to work either:

entityculling
    🔺 Mod not found on any site...
Mod entityculling not found on curse.
Check so that it's name is correct. Or you can set the name by running:
minecraft-mod-manager configure entityculling=NEW_NAME

Note that there is another similar mod that is forge only but has a dash in between it (entity-culling).
However when I download this other mod, it does not appear when doing minecraft-mod-manager list, and so I cannot update it.

Am I missing something or doing something wrong?

Update disabled and incompatible mods

Is your feature request related to a problem? Please describe.

An improvement to enable/disable a mod (#75) would be to allow the ability to check for updates and automatically enabled the mods if there are updates.

Describe the solution you'd like

mcman update will automatically update all disabled and incompatible mods

Blocked by #75
Blocked by #89

When a mod was downloaded with --alpha or --beta, allow those for that mod during update

Is your feature request related to a problem? Please describe.

If I installed a mod with the --beta flag and later run mcman update it doesn't update that mod unless I specify --beta, but then I get beta releases for all mods.

Describe the solution you'd like

Tag each downloaded mod with the current stability, and when updating include those stabilities for that specific mod. For example, when if install with --beta it will search both beta and stable releases. If a stable release is found to be the latest, it will change the tag to stable for that mod.

Describe alternatives you've considered

Remove the entire alpha/beta system and always download the latest. It might be that everyone always wants to download the latest, regardless of the stability.

Ability to execute script without python on Windows

Problem

Most Minecraft players don't have python installed. In order to appeal to the masses, an executable version of the script should be available for download.

TODO

  • Use py2exe in the build step to release an executable file

Restructure to clean architecture and add tests

The current code is a coupled mess. This makes it hard to extend the functionality and add tests.

To make it a lot easier to change endpoints or implement new functionality in the future migrate the project to clean architecture.

While migrating also add tests.

Sometimes permanently deletes mods

Describe the bug

Sometimes the tool deletes mods when it definitely should not. Over time this effect can delete almost an entire mods folder.

Steps to reproduce

Steps to reproduce the behavior:

  1. Download the sample mods folder from the following link. There should be 40 mods in the archive. Sample Mods
  2. Extract to a folder (doesn't need to be minecraft's actual mods folder, just somewhere the tool can run)
  3. Run minecraft-mod-manager list and ensure the tool can see all 40 mods
  4. Run minecraft-mod-manager update
  5. Repeat step 4 until something seems off (should only take 2 or 3 runs to become rather obvious that some mods are gone)

Expected Behavior

After step 4, all 40 mods should remain intact

Info

  • OS: Ubuntu Linux 18.04
  • Python --version: 3.8.5
  • minecraft-mod-manager --version: 1.2.2

Wiki page on how to use install and use the CLI

Hello, I am quite unsure of how this module is meant to be used. I am running on python 3.9.2 on Windows 10. Firstly, I am unsure of how to import the module. import minecraft-mod-manager does not work, which is somewhat expected, but import minecraft_mod_manager does. There is no indication that I could find that this is how to import it, if it even is the way to import it, if it even is meant to be imported. Then, if I try to use one of the example code things, minecraft-mod-manager install mod_name, rather than tell me that there is no mod called mod_name or something, it instead throws a SyntaxError exception. I also tried the example mmm update with the same result. I really can not at all understand how this is meant to be used, and how the commands are meant to work. Perhaps an example file/multi-line code block thing that shows the process for installing a mod called mod_name would clarify this process? It is entirely possible (and likely) that I'm just being a derp and missing an obvious thing here, and if I am, I apologise, but an example code would clarify the process IMO.

FEATURE REQUEST: Add support for Modrinth

Great project @Senth! Besides CurseForge, there's now a second page that serves Minecraft mods.
And their API is very well documented: https://github.com/modrinth/labrinth/wiki
When implemented, it should be next to impossible to accidentally download a Forge version for Fabric, and vice versa.
There's even categories that show if the mod is useful on clients, servers or both.
Keep up the good work!

Command name is too long

minecraft-mod-manager seems like a very long command to type out. Maybe an alias like mcman or something? (I could add this in my config myself, but it is sensible to add this by default)

Handle multiple mod versions (don't crash)

Problem

Currently if there are two or more mods with the same id the application will crash.
The application can't add multiple mods with the same id to the database

Copied from #54

Traceback (most recent call last):
  File "c:\python39\lib\site-packages\minecraft_mod_manager\gateways\sqlite.py", line 138, in insert_mod
    self._connection.execute(
sqlite3.IntegrityError: UNIQUE constraint failed: mod.id

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Python39\Scripts\minecraft-mod-manager.exe\__main__.py", line 7, in <module>
  File "c:\python39\lib\site-packages\minecraft_mod_manager\__main__.py", line 21, in main
    repo = RepoImpl(jar_parser, sqlite, downloader)
  File "c:\python39\lib\site-packages\minecraft_mod_manager\adapters\repo_impl.py", line 26, in __init__
    self.mods = self.db.sync_with_dir(jar_parser.mods)
  File "c:\python39\lib\site-packages\minecraft_mod_manager\gateways\sqlite.py", line 65, in sync_with_dir
    self.insert_mod(mod)
  File "c:\python39\lib\site-packages\minecraft_mod_manager\gateways\sqlite.py", line 151, in insert_mod
    raise ModAlreadyExists(mod)
minecraft_mod_manager.core.errors.mod_already_exists.ModAlreadyExists: Mod architectury already found in the the db.

Possible solutions

  • Only load the latest version
  • Ask the user which version to keep (and ask if the other ones should be deleted)

Add integration tests for the different use cases

For stability sake, we might want to add some integration tests, that test installing and updating mods.

Installation

  • Reinstalling a mod: Install, remove, and then install again
  • Install mod with slug name should update the mod id correctly
  • Installing a mod without any mod loader (jei)

Removes mod when using --pretend

Describe the bug

Removes the mod when using --pretend

Steps to reproduce

Run mcman update --pretend all mods that can be updated would be deleted

Expected Behavior

Does not delete mod

Info

  • OS: Linux
  • minecraft-mod-manager --version: 1.2.0

Error with Item Model Fix

Crashes when you list with Item Model Fix installed.

To reproduce:

minecraft-mod-manager install item-model-fix
minecraft-mod-manager list

Error:

Traceback (most recent call last):
  File "c:\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Python39\Scripts\minecraft-mod-manager.exe\__main__.py", line 7, in <module>
  File "c:\python39\lib\site-packages\minecraft_mod_manager\__main__.py", line 21, in main
    repo = RepoImpl(jar_parser, sqlite, downloader)
  File "c:\python39\lib\site-packages\minecraft_mod_manager\adapters\repo_impl.py", line 26, in __init__
    self.mods = self.db.sync_with_dir(jar_parser.mods)
  File "c:\python39\lib\site-packages\minecraft_mod_manager\gateways\jar_parser.py", line 30, in mods
    mod = JarParser.get_mod_info(file)
  File "c:\python39\lib\site-packages\minecraft_mod_manager\gateways\jar_parser.py", line 42, in get_mod_info
    mod = JarParser._parse_fabric(zip)
  File "c:\python39\lib\site-packages\minecraft_mod_manager\gateways\jar_parser.py", line 60, in _parse_fabric
    object = json.load(json_file)
  File "c:\python39\lib\json\__init__.py", line 293, in load
    return loads(fp.read(),
  File "c:\python39\lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "c:\python39\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "c:\python39\lib\json\decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid control character at: line 7 column 55 (char 153)

Tool crashes with some mods

Fabric capes mod throws UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 194-195: invalid continuation byte
The manager will always crash if this mod is present

To reproduce, run minecraft-mod-manager --mod-loader fabric install capes
Then, run minecraft-mod-manager list to see the crash

Encountered on Ubuntu Linux

Add --version option

Problem

Currently users have no easy way of telling which version of minecraft-mod-manager they have installed. This makes it a bit harder to pinpoint if a problem still exists or not, or if they simply have an older version.

Solution

Add a --version option to print your installed version of minecraft-mod-manager.

Automatically check for a new update of `mcman`

Is your feature request related to a problem? Please describe.

It's hard to know when there's a new update to minecraft-mod-manager.

Describe the solution you'd like

It would be good if it automatically told you through GUI and CLI that a new version is available.

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Additional context

For Windows or even all platforms, it would also be good if it could automatically update itself. Another feature.

Crashes when mods folder contains a non-fabric mod

File "/home/username/.local/bin/minecraft-mod-manager", line 10, in
sys.exit(main())
File "/home/username/.local/lib/python3.8/site-packages/minecraft_mod_manager/main.py", line 16, in main
installed_mods = DirParser.get_mods()
File "/home/username/.local/lib/python3.8/site-packages/minecraft_mod_manager/dir_parser.py", line 18, in get_mods
mod = DirParser.get_mod_info(file)
File "/home/username/.local/lib/python3.8/site-packages/minecraft_mod_manager/dir_parser.py", line 27, in get_mod_info
with zip.open("fabric.mod.json") as json_file:
File "/usr/local/lib/python3.8/zipfile.py", line 1514, in open
zinfo = self.getinfo(name)
File "/usr/local/lib/python3.8/zipfile.py", line 1441, in getinfo
raise KeyError(
KeyError: "There is no item named 'fabric.mod.json' in the archive"

JSONDecode error when reading API response

Describe the bug

Throws an exception when reading invalid JSON from the API response

From #60

I think this is probably a related issue with the same symptom.

minecraft-mod-manager install shulkerboxtooltip

throws:
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

using version 1.2.1

Update doesn't remember mod download names

Describe the bug

When updating, the jar names are used instead of the mod name specified when installing.

Steps to reproduce

  1. mcman install cull-leaves

Installs the jar file: cullleaves-2.2.0.jar

  1. mcman update

Outputs:

cullleaves
🔺 Mod not found on any site...

Expected Behavior

It should remember the names of the installed mods.

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.