hexparrot / mineos-node

node.js implementation of mineos minecraft management
GNU General Public License v3.0
335 stars 170 forks source link

Add ability to run "random" Twitch mod packs #262

Open zeryl opened 7 years ago

zeryl commented 7 years ago

For example, I would love to run a Project Ozone Lite server, or a Modern Skyblock server, however, they don't show in the drop-downs for FTB or FTB Third Party packs.

Adding the ability to do this, would open up a huge number of modpacks to be supported on the platform.

hexparrot commented 7 years ago

I'm happy to add any and all packs that are out there, for easy download.

Really the only condition for me to be able to do it is whether or not the content providers have an unchanging URL for which all the server packs can be downloaded. For project Ozone, I can see there's this: https://minecraft.curseforge.com/projects/project-ozone-lite/files/2460227/download

However, when a new version comes out, MineOS will suddenly be presenting an obsolete version.

If you know of any unchanging URL that provides all the versions, I can add it. Here are some examples already implemented.

JSON for vanilla minecraft: https://launchermeta.mojang.com/mc/game/version_manifest.json XML for FTB: http://ftb.cursecdn.com/FTB2/static/modpacks.xml A url that will always point to the "latest version": http://jenkins.imagicalmine.net:8080/job/ImagicalMine/lastStableBuild/artifact/releases/ImagicalMine.phar

Without scraping HTML, unfortuantely, I've never found a way to do this with curse (won't scrape, it's a very ugly process), but I'd otherwise be happy to include this if you can assist me in finding that JSON/XML/etc.

zeryl commented 7 years ago

Could always do like the alternative downloaders do, and do it form the page itself. I could direct to one of those.

Additionally, i do have a list of them, from the Twitch client (a json file), but have yet to be able to determine the URL that it hits to get this list.

Edit: one other possibility, that others use, is providing the manifest.json, that provides information on the pack stuff. Just another thought/possibility.

hexparrot commented 7 years ago

It's not really plausible for me to scrape the URLs from the pages--the pages... their structure, and the URLs of the housing pages themselves change too frequently. If any of the URLs start breaking on MineOS, it's MineOS that feels incomplete and awkward.

For almost that reason alone, I feel compelled to limit the available profiles to those which have programmatic, dependable URLs.

Can you explain in greater detail what a manifest.json would do? I am familiar with this in terms of Vanilla Minecraft, but again, I'm needing any expansion of profiles to be (at least for the foreseeable future) dependably found on the internet. I can't be micromanaging files myself and requiring new commits/updates in order to maintain base functionality.

halkeye commented 6 years ago

So I found out there's cfwidget.com which seems to have it all magically done per project

https://api.cfwidget.com/projects/snorshcraft

https://minecraft.curseforge.com/projects/snorshcraft

But I don't yet know how to get a list of all modpacks yet

Ahze85283 commented 4 years ago

@hexparrot would you be willing to add in JavaScript bookmarklet generation to the UI that would allow server operators to click a bookmark while on a curse forge pack page that would then manually added to the UI? If that's the case I can assist with that code.