mcmu 2.0.1.dev0__tar.gz → 2.0.1.dev1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## [v2.0.1.dev1] - 2026-03-24
4
+
5
+ ### Fixed
6
+
7
+ * Fixed not checking if mod installed before installing if version specified
8
+ * Fixed FileNotFoundError: [Errno 2] No such file or directory: 'mods_folder'
9
+
10
+ ### Changed
11
+
12
+ * Changed --minecraft-dir to --mod-dir
13
+
14
+ ### Added
15
+
16
+ * Added the -p/--project option
17
+
18
+ ### Removed
19
+
20
+ * Removed -d/--dependency
21
+
3
22
  ## [v2.0.1.dev0] - 2026-03-23
4
23
 
5
24
  Here is the first snapshot for the WaterBucket update, enjoy!
@@ -339,3 +358,5 @@ _Initial release._
339
358
  [v2.0.0.dev3]: https://github.com/Josiah-Jarvis/MCMU/releases/tag/v2.0.0.dev3
340
359
  [v2.0.0rc0]: https://github.com/Josiah-Jarvis/MCMU/releases/tag/v2.0.0rc0
341
360
  [v2.0.0]: https://github.com/Josiah-Jarvis/MCMU/releases/tag/v2.0.0
361
+ [v2.0.1.dev0]: https://github.com/Josiah-Jarvis/MCMU/releases/tag/v2.0.1.dev0
362
+ [v2.0.1.dev1]: https://github.com/Josiah-Jarvis/MCMU/releases/tag/v2.0.1.dev1
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcmu
3
- Version: 2.0.1.dev0
3
+ Version: 2.0.1.dev1
4
4
  Summary: A utility to update Minecraft java edition mods from Modrinth
5
5
  Project-URL: homepage, https://github.com/Josiah-Jarvis/MCMU
6
6
  Project-URL: source, https://github.com/Josiah-Jarvis/MCMU/
7
7
  Project-URL: download, https://pypi.org/project/mcmu/#files
8
8
  Project-URL: changelog, https://github.com/Josiah-Jarvis/MCMU/blob/master/CHANGELOG.md
9
- Project-URL: releasenotes, https://github.com/Josiah-Jarvis/MCMU/compare/v2.0.0...v2.0.1.dev0+WaterBucket
9
+ Project-URL: releasenotes, https://github.com/Josiah-Jarvis/MCMU/compare/v2.0.1.dev0...v2.0.1.dev1
10
10
  Project-URL: documentation, https://github.com/Josiah-Jarvis/MCMU/blob/master/README.md
11
11
  Project-URL: issues, https://github.com/Josiah-Jarvis/MCMU/issues
12
12
  Author: Josiah Jarvis
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "mcmu"
7
- version = "2.0.1.dev0"
7
+ version = "2.0.1.dev1"
8
8
  requires-python = ">=3.13"
9
9
  authors = [
10
10
  {name="Josiah Jarvis"}
@@ -51,6 +51,6 @@ homepage = "https://github.com/Josiah-Jarvis/MCMU"
51
51
  source = "https://github.com/Josiah-Jarvis/MCMU/"
52
52
  download = "https://pypi.org/project/mcmu/#files"
53
53
  changelog = "https://github.com/Josiah-Jarvis/MCMU/blob/master/CHANGELOG.md"
54
- releasenotes = "https://github.com/Josiah-Jarvis/MCMU/compare/v2.0.0...v2.0.1.dev0+WaterBucket" # Change before every release
54
+ releasenotes = "https://github.com/Josiah-Jarvis/MCMU/compare/v2.0.1.dev0...v2.0.1.dev1" # Change before every release
55
55
  documentation = "https://github.com/Josiah-Jarvis/MCMU/blob/master/README.md"
56
56
  issues = "https://github.com/Josiah-Jarvis/MCMU/issues"
@@ -33,8 +33,9 @@ def cli() -> dict:
33
33
  group.add_argument("-l", "--list", help="List mods", action="store_true")
34
34
  group.add_argument("-s", "--search", help="Search mods on Modrinth")
35
35
  group.add_argument("-d", "--dependency", help="List a mods dependency's")
36
+ group.add_argument("-p", "--project", help="Get info about a project")
36
37
  parser.add_argument(
37
- "--minecraft-dir",
38
+ "--mod_dir",
38
39
  default=Path(Path.home(), ".minecraft/mods/"),
39
40
  help="Path to the Minecraft mods folder"
40
41
  )
@@ -118,6 +119,7 @@ class ModrinthAPI:
118
119
  headers=self.headers,
119
120
  timeout=10
120
121
  )
122
+ logger.debug(response.text)
121
123
  if response.status_code == 410:
122
124
  raise DeprecationWarning("API deprecated")
123
125
  if response.status_code == 404:
@@ -272,6 +274,9 @@ def install_mod(mod: str, mods: dict, mod_path: Path, game_version: str) -> bool
272
274
  mods -- Dict of mods
273
275
  mod_path -- The path to the mods folder
274
276
  """
277
+ if mod in mods: # If mod already installed exit
278
+ print(f"{mod} already installed.")
279
+ return True
275
280
  mod_version = mod.split("==")
276
281
  if len(mod_version) > 1:
277
282
  mod = mod_version
@@ -292,9 +297,6 @@ def install_mod(mod: str, mods: dict, mod_path: Path, game_version: str) -> bool
292
297
  ModAPI.get_file(latest_version['files'][0]['url'], mod_jar_file)
293
298
  print(f"Downloaded mod at {mod_jar_file} successfully.") # Print the success
294
299
  return True
295
- if mod in mods: # If mod already installed exit
296
- print(f"{mod} already installed.")
297
- return True
298
300
  latest_version = check_update(mod, "0", game_version) # Set the version to 0 so any version would be higher
299
301
  if latest_version: # Should be True if it is a dict
300
302
  if ask(f"{mod} will take up: {latest_version['files'][0]['size']} bytes, would you like to install?"):
@@ -344,13 +346,6 @@ def remove_mod(mod: str, mods: dict, mod_path: Path):
344
346
  return True
345
347
 
346
348
 
347
- def setup(mod_dir: Path) -> bool:
348
- """Sets up, mod folder"""
349
- if not mod_dir.exists():
350
- raise FileNotFoundError(f"Mod folder: {mod_dir} does not exist, please create it.\nExiting...")
351
- return True
352
-
353
-
354
349
  def main():
355
350
  """Main function
356
351
 
@@ -360,17 +355,19 @@ def main():
360
355
  """
361
356
  args = cli()
362
357
  logger.debug(args)
363
- mods = list_mods(args.minecraft_dir)
358
+ try:
359
+ mods = list_mods(args.mod_dir)
360
+ except FileNotFoundError:
361
+ logger.error("Mod folder: %s does not exist", args.mods_folder)
364
362
  logger.debug(mods)
365
- setup(args.minecraft_dir)
366
363
  if args.up:
367
- if not update_mods(mods, args.minecraft_dir, args.game_version):
364
+ if not update_mods(mods, args.mod_dir, args.game_version):
368
365
  return 1
369
366
  elif args.install: # If were installing the mod
370
- if not install_mod(args.install, mods, args.minecraft_dir, args.game_version):
367
+ if not install_mod(args.install, mods, args.mod_dir, args.game_version):
371
368
  return 1
372
369
  elif args.remove: # If were removing the mod
373
- if not remove_mod(args.remove, mods, args.minecraft_dir):
370
+ if not remove_mod(args.remove, mods, args.mod_dir):
374
371
  return 1
375
372
  elif args.list: # List installed mod
376
373
  for name, mod in mods.items(): # Iterate over all installed mods
@@ -396,6 +393,14 @@ def main():
396
393
 
397
394
  """
398
395
  print(dependency)
396
+ elif args.project:
397
+ response = ModAPI.project(args.project)
398
+ info = f"""{response['slug']}
399
+ Title: {response['title']}
400
+ Description: {response['description']}
401
+ Client Side: {response['client_side']}
402
+ """
403
+ print(info)
399
404
  else:
400
405
  logger.error("No arguments were passed, try '%s --help'", __package__)
401
406
  return 0 # Return 0 if all good
@@ -6,26 +6,26 @@ This is the planned release cycle for v2.0.1 or the "Water Bucket" update.
6
6
 
7
7
  These releases will have new features and functionality.
8
8
 
9
- 23 March 2026 - v2.0.1.dev0+WaterBucket
10
- 24 March 2026 - v2.0.1.dev1+WaterBucket
11
- 25 March 2026 - v2.0.1.dev2+WaterBucket
12
- 27 March 2026 - v2.0.1.dev3+WaterBucket
9
+ 23 March 2026 - v2.0.1.dev0
10
+ 24 March 2026 - v2.0.1.dev1
11
+ 25 March 2026 - v2.0.1.dev2
12
+ 27 March 2026 - v2.0.1.dev3
13
13
 
14
14
  ## Alpha and Beta releases
15
15
 
16
16
  These releases will primarily be fixing bugs and polishing features.
17
17
 
18
- 30 March 2026 - v2.0.1a0+WaterBucket
19
- 31 March 2026 - v2.0.1a1+WaterBucket
20
- 3 April 2026 - v2.0.1b0+WaterBucket
21
- 6 April 2026 - v2.0.1b1+WaterBucket
18
+ 30 March 2026 - v2.0.1a0
19
+ 31 March 2026 - v2.0.1a1
20
+ 3 April 2026 - v2.0.1b0
21
+ 6 April 2026 - v2.0.1b1
22
22
 
23
23
  ## Release Candidates
24
24
 
25
25
  These releases will become v2.0.1 if all goes well.
26
26
 
27
- 9 April 2026 - v2.0.1rc0+WaterBucket
28
- 10 April 2026 - v2.0.1rc1+WaterBucket
27
+ 9 April 2026 - v2.0.1rc0
28
+ 10 April 2026 - v2.0.1rc1
29
29
 
30
30
  ## Release Date
31
31
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes