aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Jones <dylanjones2011@gmail.com>2020-11-27 00:13:57 -0500
committerDylan Jones <dylanjones2011@gmail.com>2020-11-27 00:13:57 -0500
commit55c7ef774db75e7ba37a3a121f749ab60f8d4117 (patch)
tree6c32983df1d8468886f0f678a7dc3b0979da8784
parent2c29fbad324c826e118be42e510a8388e4648ef5 (diff)
downloadmodpackman-55c7ef774db75e7ba37a3a121f749ab60f8d4117.tar.gz
modpackman-55c7ef774db75e7ba37a3a121f749ab60f8d4117.zip
start conversion to ini
-rw-r--r--local-config.ini4
-rw-r--r--pack.ini98
-rwxr-xr-xupdate.py20
3 files changed, 122 insertions, 0 deletions
diff --git a/local-config.ini b/local-config.ini
new file mode 100644
index 0000000..b6bbef7
--- /dev/null
+++ b/local-config.ini
@@ -0,0 +1,4 @@
+# Uncomment this to override the default automatic selection of the mod install directory.
+# pack-location = /home/example/.minecraft/instances/jeffrey/mods
+# A comma-separated list of mods that won't be deleted during the install process.
+whitelist = example_mod.jar,example_extra_mod.jar
diff --git a/pack.ini b/pack.ini
new file mode 100644
index 0000000..e775b8f
--- /dev/null
+++ b/pack.ini
@@ -0,0 +1,98 @@
+[pack]
+name = "J.E.F.F.R.E.Y 3"
+forge_url = "forge.com"
+icon_name = "jeffrey-3.png"
+
+[mods]
+# Possibly controversial mods - subject to further review
+building-gadgets = https://www.curseforge.com/minecraft/mc-mods/building-gadgets
+item-collectors = https://www.curseforge.com/minecraft/mc-mods/item-collectors
+natures-compass = https://www.curseforge.com/minecraft/mc-mods/natures-compass
+packing-tape = https://www.curseforge.com/minecraft/mc-mods/packing-tape
+seals = https://www.curseforge.com/minecraft/mc-mods/seals
+simple-planes = https://www.curseforge.com/minecraft/mc-mods/simple-planes
+ender-chests = https://www.curseforge.com/minecraft/mc-mods/enderchests
+ender-tanks = https://www.curseforge.com/minecraft/mc-mods/endertanks
+gauges-and-switches = https://www.curseforge.com/minecraft/mc-mods/redstone-gauges-and-switches
+moving-elevators = https://www.curseforge.com/minecraft/mc-mods/moving-elevators
+cooking-for-blockheads = https://www.curseforge.com/minecraft/mc-mods/cooking-for-blockheads
+discord-presence = https://www.curseforge.com/minecraft/mc-mods/simple-discord-rich-presence
+# Minecolonies doesn't work, citing version incompatibilites with the latest structurize
+#minecolonies = https://www.curseforge.com/minecraft/mc-mods/minecolonies
+# library mod for minecolonies
+#structurize = https://www.curseforge.com/minecraft/mc-mods/structurize
+# library mod for enderchests/endertanks
+shetiphiancore = https://www.curseforge.com/minecraft/mc-mods/shetiphiancore
+quark = https://www.curseforge.com/minecraft/mc-mods/quark
+blood-magic = https://www.curseforge.com/minecraft/mc-mods/blood-magic
+astral-sorcery = https://www.curseforge.com/minecraft/mc-mods/astral-sorcery
+
+# Fight me mods
+ae2 = https://www.curseforge.com/minecraft/mc-mods/applied-energistics-2
+mekanism = https://www.curseforge.com/minecraft/mc-mods/mekanism
+mekanism-tools = https://www.curseforge.com/minecraft/mc-mods/mekanism-tools
+mekanism-generators = https://www.curseforge.com/minecraft/mc-mods/mekanism-generators
+mekanism-additions = https://www.curseforge.com/minecraft/mc-mods/mekanism-additions
+psi = https://www.curseforge.com/minecraft/mc-mods/psi
+cc-tweaked = https://www.curseforge.com/minecraft/mc-mods/cc-tweaked
+immersive-engineering = https://www.curseforge.com/minecraft/mc-mods/immersive-engineering
+botania = https://www.curseforge.com/minecraft/mc-mods/botania
+jei = https://www.curseforge.com/minecraft/mc-mods/jei
+tetra = https://www.curseforge.com/minecraft/mc-mods/tetra
+# Until the PR gets merged we're downloading direct from GitHub
+immersive-portals = https://github.com/DylanJones/ImmersivePortalsModForForge/releases/download/v0.9-1.16-temp/immersive-portals-0.9.jar
+# immersive-portals = https://www.curseforge.com/minecraft/mc-mods/immersive-portals-for-forge/files/all
+
+# Smaller yes mods
+inventory-sorter = https://www.curseforge.com/minecraft/mc-mods/inventory-sorter
+creeper-confetti = https://www.curseforge.com/minecraft/mc-mods/creeper-confetti
+hwyla = https://www.curseforge.com/minecraft/mc-mods/hwyla
+jer = https://www.curseforge.com/minecraft/mc-mods/just-enough-resources-jer
+ender-tendril = https://www.curseforge.com/minecraft/mc-mods/ender-tendril
+discord-integration = https://www.curseforge.com/minecraft/mc-mods/dcintegration
+step = https://www.curseforge.com/minecraft/mc-mods/step
+simply-backpacks = https://www.curseforge.com/minecraft/mc-mods/simply-backpacks
+better-mineshafts = https://www.curseforge.com/minecraft/mc-mods/yungs-better-mineshafts-forge
+comforts = https://www.curseforge.com/minecraft/mc-mods/comforts
+better-than-llamas = https://www.curseforge.com/minecraft/mc-mods/better-than-llamas
+better-than-bunnies = https://www.curseforge.com/minecraft/mc-mods/better-than-bunnies
+corpse = https://www.curseforge.com/minecraft/mc-mods/corpse
+gilded-armor = https://www.curseforge.com/minecraft/mc-mods/gildedarmor
+jei-integration = https://www.curseforge.com/minecraft/mc-mods/jei-integration
+openblocks-elevator = https://www.curseforge.com/minecraft/mc-mods/openblocks-elevator
+ranged-pumps = https://www.curseforge.com/minecraft/mc-mods/ranged-pumps
+the-conjurer = https://www.curseforge.com/minecraft/mc-mods/the-conjurer
+trashcans = https://www.curseforge.com/minecraft/mc-mods/trash-cans
+controlling = https://www.curseforge.com/minecraft/mc-mods/controlling
+ding = https://www.curseforge.com/minecraft/mc-mods/ding
+appleskin = https://www.curseforge.com/minecraft/mc-mods/appleskin
+enchantment-descriptions = https://www.curseforge.com/minecraft/mc-mods/enchantment-descriptions
+emojiful = https://www.curseforge.com/minecraft/mc-mods/emojiful
+clumps = https://www.curseforge.com/minecraft/mc-mods/clumps
+toast-control = https://www.curseforge.com/minecraft/mc-mods/toast-control
+mouse-tweaks = https://www.curseforge.com/minecraft/mc-mods/mouse-tweaks
+recipe-buffers = https://www.curseforge.com/minecraft/mc-mods/recipebuffers
+harvest = https://www.curseforge.com/minecraft/mc-mods/harvest
+light-overlay = https://www.curseforge.com/minecraft/mc-mods/light-overlay
+morpheus = https://www.curseforge.com/minecraft/mc-mods/morpheus
+extreme-sound-muffler = https://www.curseforge.com/minecraft/mc-mods/extreme-sound-muffler
+fast-workbench = https://www.curseforge.com/minecraft/mc-mods/fastworkbench
+findme = https://www.curseforge.com/minecraft/mc-mods/findme
+wawla = https://www.curseforge.com/minecraft/mc-mods/wawla
+iron-chests = https://www.curseforge.com/minecraft/mc-mods/iron-chests
+reauth = https://www.curseforge.com/minecraft/mc-mods/reauth
+yungs-caves = https://www.curseforge.com/minecraft/mc-mods/yungs-better-caves
+
+# Library mods
+mgui = https://www.curseforge.com/minecraft/mc-mods/mgui
+obfuscate = https://www.curseforge.com/minecraft/mc-mods/obfuscate
+placebo = https://www.curseforge.com/minecraft/mc-mods/placebo
+cloth-config = https://www.curseforge.com/minecraft/mc-mods/cloth-config-forge
+structure-jel = https://www.curseforge.com/minecraft/mc-mods/structure-gel-api
+bookshelf = https://www.curseforge.com/minecraft/mc-mods/bookshelf
+ichunutil = https://www.curseforge.com/minecraft/mc-mods/ichunutil
+titanium = https://www.curseforge.com/minecraft/mc-mods/titanium
+curios = https://www.curseforge.com/minecraft/mc-mods/curios
+autoreglib = https://www.curseforge.com/minecraft/mc-mods/autoreglib
+observerlib = https://www.curseforge.com/minecraft/mc-mods/observerlib
+patchouli = https://www.curseforge.com/minecraft/mc-mods/patchouli
diff --git a/update.py b/update.py
index 28ee252..bca3cbc 100755
--- a/update.py
+++ b/update.py
@@ -8,6 +8,7 @@ import re
import collections
import urllib.parse
import multiprocessing
+from configparser import ConfigParser
import requests
@@ -48,6 +49,25 @@ parser.add_argument("--game-version",
## loaded from version.txt
VERSION = 0
+def load_config():
+ config = ConfigParser()
+ config.read("pack.ini")
+ config["pack"]["sanitized_name"] = sanitize_text(config["pack"]["name"])
+ # return the whole config file, pack configuration and modlist
+ return config
+
+# take a string and only keep filename-friendly parts
+def sanitize_text(text):
+ sanitized = ""
+ replacement_map = {" ": "-"}
+ for char in text:
+ if char.isalnum():
+ sanitized += char.lower()
+ elif char in replacement_map:
+ sanitized += replacement_map[char]
+ return sanitized
+
+
def read_file(fil):
"""
Given a filename, read its contents in as a list of tuples.