mmc-export


Namemmc-export JSON
Version 2.8.7 PyPI version JSON
download
home_pagehttps://github.com/RozeFound/mmc-export
SummaryExport MMC modpack to other modpack formats
upload_time2024-01-11 07:11:23
maintainer
docs_urlNone
authorRozeFound
requires_python>=3.11,<4.0
licenseMIT
keywords minecraft mods modpack converter multimc
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # MultiMC advanced exporter
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/mmc-export)](https://www.python.org)
[![PyPI version](https://img.shields.io/pypi/v/mmc-export?label=mmc-export&color=%2347a637)](https://pypi.org/project/mmc-export)
[![PyPI downloads](https://img.shields.io/pypi/dm/mmc-export?color=%23894bbf)](https://pypistats.org/packages/mmc-export)
[![GitHub license](https://img.shields.io/github/license/RozeFound/mmc-export)](/LICENSE)

Since MultiMC export features are very limited, I created a script that solves this problem, with this script you can export MultiMC pack to any popular format (e.g. curseforge, modrinth, packwiz). MultiMC forks which didn't changed export format much also supported.
**[PrismLauncher](https://github.com/PrismLauncher/PrismLauncher) apparently already have builtin Modrinth export feature starting with version 7.0**

<table class="alert-warn" align=center>
<tr>
    <td> ⚠️ </td>
    <td>
        mmc-export development is currently in <b>the maintenance-only mode</b>.
        This is to show that any abnormal lack of activity isn't going to mean it is
        no longer maintained. mmc-export considered feature-complete, and only will be updated when bugs arrive.
    </td>
</tr>
</table>

# Features

- Support conversion to:
    - CurseForge
    - Modrinth
    - packwiz
- Detects downloadable resourcepacks and shaders
- Supports github parsing[¹](#github-rate-limits)
- Loose modrinth search
- User friendly toml config
- Multiple output formats at once

---
### GitHub rate limits

GitHub has limited requests per hour (up to 60), this means that if you have more than 60 mods, the rest will be excluded from github search. 
If you authenticate with GitHub using `mmc-export gh-login`, the limit will be removed and requests will be faster. You can always log out with `mmc-export gh-logout`.

If you don't want to use github search by some reason, you can specify `--exclude-providers GitHub` as argument.

# How to Use
```
mmc-export -i modpack.zip -c config.toml -f Modrinth packwiz -o converted_modpacks
```
It's recommended to fill config at least with basic info like name and version, some launchers can fail import if these values are empty.

## Sub-commands

`gh-login` - to authrize GitHub \
`gh-logout` - to get info how to deauthorize GitHub 

`purge-cache` - to purge cache. Available arguments:
```
--web: to delete requests cache and downloaded mods
--files: to delete hashes cache
--all: equivalent to --web --files, deletes all cache (default)
```

## Syntax
```
mmc-export [sub-command] [-h] [-c CONFIG] -i INPUT -f FORMAT [-o OUTPUT] [-v VERSION] [--modrinth-search SEARCH_TYPE] [--exclude-providers PROVIDERS]
```

### Explanation
```
-h --help: prints help
-i --input: path to modpack, must be zip file exported from MultiMC.
-c --config: path to config, used to fill the gaps like description or lost mods.
-f --format: output formats, must be separated by spaces.
-o --output: directory where converted zip files will be stored.
-v --version: specify modpack version, will be overriden by config's value if exists
--modrinth-search: modrinth search accuracy
--exclude-providers: providers you wish to exclude from search
--provider-priority: providers priority used for packwiz
--skip-cache: don't use web cache in this run
--scheme: output filename formatting scheme, more info in #scheme-formatting
```
> All paths can be relative to current working directory or absolute.

`--format` options (case-sensitive): 
- `CurseForge`
- `Modrinth`
- `packwiz`
- `Intermediate` (only for debugging, may contain sensitive data like username)

`--exclude-providers` options (case-sensitive): 
- `CurseForge`
- `Modrinth`
- `GitHub`

`--provider-priority` options (case-sensitive): 
- `CurseForge`
- `Modrinth`
- `Other` or `GitHub`

`--modrinth-search` options:
- `exact` - by hash (default)
- `accurate` - by hash or slug
- `loose` - by hash, slug or long name

The example for the optional `--config` file [can be found here](example_config.toml). 

For example, if the script says

> No config entry found for resource: ModName

Then you should add **one** of the following entries to the end of the config:

#### Specify source URL
```
[[Resource]]
name = "ModName"
filename = "the_name_of_the.jar" 
url = "https://cdn.modrinth.com/data/abcdefg/versions/1.0.0/the_name_of_the.jar"
```
#### Hide the warning
```
[[Resource]]
name = "ModName"
filename = "the_name_of_the.jar" 
action = "ignore"
```
#### Explicitly move to overrides
```
[[Resource]]
name = "ModName"
filename = "the_name_of_the.jar" 
action = "override"
```
#### Delete the file altogether
```
[[Resource]]
name = "ModName"
filename = "the_name_of_the.jar" 
action = "remove"
```
#### Make the mod optional
Append `optional = true` to any of above

#### Delete any file
This can be defined to delete any file that isn't downloadable from CurseForge/Modrinth, e.g. mod config or metadata file.
```
[[File]]
name = "Useless file.txt"
action = "remove"
```

## Scheme Formatting

Must be used as `--scheme "{keyword}_Literally any text"` without file extension, follows python's [format string syntax](https://docs.python.org/3/library/string.html#format-string-syntax)

#### Available keywords: 
- `abbr` - provider abbreviation, usually 2 capitals, e.g. `MR`, `CF`
- `format` - full format name, e.g. `CurseForge`, `Packwiz`
- `name` same as `pack.name` - modpack name
- `version` same as `pack.version` - modpack version
- `pack` - pointer to [Intermediate](mmc_export/Helpers/structures.py#L50-L66) structure

Default scheme is as simple as `{abbr}_{name}`

***Caution: if you don't use any format specifc keywords, output files will overwrite the same file several times***, can be ignored if you output to only one format.
Also, be aware of your filesystem limitations, unsupported characters may lead to an error, or inaccesible file.

# How to Install / Update
```
pip install -U mmc-export
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/RozeFound/mmc-export",
    "name": "mmc-export",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11,<4.0",
    "maintainer_email": "",
    "keywords": "minecraft,mods,modpack,converter,MultiMC",
    "author": "RozeFound",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/cd/55/b0994d56e239af0c96aceb1e8f1ff665e09c7b30175a90796fb436595153/mmc_export-2.8.7.tar.gz",
    "platform": null,
    "description": "# MultiMC advanced exporter\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/mmc-export)](https://www.python.org)\n[![PyPI version](https://img.shields.io/pypi/v/mmc-export?label=mmc-export&color=%2347a637)](https://pypi.org/project/mmc-export)\n[![PyPI downloads](https://img.shields.io/pypi/dm/mmc-export?color=%23894bbf)](https://pypistats.org/packages/mmc-export)\n[![GitHub license](https://img.shields.io/github/license/RozeFound/mmc-export)](/LICENSE)\n\nSince MultiMC export features are very limited, I created a script that solves this problem, with this script you can export MultiMC pack to any popular format (e.g. curseforge, modrinth, packwiz). MultiMC forks which didn't changed export format much also supported.\n**[PrismLauncher](https://github.com/PrismLauncher/PrismLauncher) apparently already have builtin Modrinth export feature starting with version 7.0**\n\n<table class=\"alert-warn\" align=center>\n<tr>\n    <td> \u26a0\ufe0f </td>\n    <td>\n        mmc-export development is currently in <b>the maintenance-only mode</b>.\n        This is to show that any abnormal lack of activity isn't going to mean it is\n        no longer maintained. mmc-export considered feature-complete, and only will be updated when bugs arrive.\n    </td>\n</tr>\n</table>\n\n# Features\n\n- Support conversion to:\n    - CurseForge\n    - Modrinth\n    - packwiz\n- Detects downloadable resourcepacks and shaders\n- Supports github parsing[\u00b9](#github-rate-limits)\n- Loose modrinth search\n- User friendly toml config\n- Multiple output formats at once\n\n---\n### GitHub rate limits\n\nGitHub has limited requests per hour (up to 60), this means that if you have more than 60 mods, the rest will be excluded from github search. \nIf you authenticate with GitHub using `mmc-export gh-login`, the limit will be removed and requests will be faster. You can always log out with `mmc-export gh-logout`.\n\nIf you don't want to use github search by some reason, you can specify `--exclude-providers GitHub` as argument.\n\n# How to Use\n```\nmmc-export -i modpack.zip -c config.toml -f Modrinth packwiz -o converted_modpacks\n```\nIt's recommended to fill config at least with basic info like name and version, some launchers can fail import if these values are empty.\n\n## Sub-commands\n\n`gh-login` - to authrize GitHub \\\n`gh-logout` - to get info how to deauthorize GitHub \n\n`purge-cache` - to purge cache. Available arguments:\n```\n--web: to delete requests cache and downloaded mods\n--files: to delete hashes cache\n--all: equivalent to --web --files, deletes all cache (default)\n```\n\n## Syntax\n```\nmmc-export [sub-command] [-h] [-c CONFIG] -i INPUT -f FORMAT [-o OUTPUT] [-v VERSION] [--modrinth-search SEARCH_TYPE] [--exclude-providers PROVIDERS]\n```\n\n### Explanation\n```\n-h --help: prints help\n-i --input: path to modpack, must be zip file exported from MultiMC.\n-c --config: path to config, used to fill the gaps like description or lost mods.\n-f --format: output formats, must be separated by spaces.\n-o --output: directory where converted zip files will be stored.\n-v --version: specify modpack version, will be overriden by config's value if exists\n--modrinth-search: modrinth search accuracy\n--exclude-providers: providers you wish to exclude from search\n--provider-priority: providers priority used for packwiz\n--skip-cache: don't use web cache in this run\n--scheme: output filename formatting scheme, more info in #scheme-formatting\n```\n> All paths can be relative to current working directory or absolute.\n\n`--format` options (case-sensitive): \n- `CurseForge`\n- `Modrinth`\n- `packwiz`\n- `Intermediate` (only for debugging, may contain sensitive data like username)\n\n`--exclude-providers` options (case-sensitive): \n- `CurseForge`\n- `Modrinth`\n- `GitHub`\n\n`--provider-priority` options (case-sensitive): \n- `CurseForge`\n- `Modrinth`\n- `Other` or `GitHub`\n\n`--modrinth-search` options:\n- `exact` - by hash (default)\n- `accurate` - by hash or slug\n- `loose` - by hash, slug or long name\n\nThe example for the optional `--config` file [can be found here](example_config.toml). \n\nFor example, if the script says\n\n> No config entry found for resource: ModName\n\nThen you should add **one** of the following entries to the end of the config:\n\n#### Specify source URL\n```\n[[Resource]]\nname = \"ModName\"\nfilename = \"the_name_of_the.jar\" \nurl = \"https://cdn.modrinth.com/data/abcdefg/versions/1.0.0/the_name_of_the.jar\"\n```\n#### Hide the warning\n```\n[[Resource]]\nname = \"ModName\"\nfilename = \"the_name_of_the.jar\" \naction = \"ignore\"\n```\n#### Explicitly move to overrides\n```\n[[Resource]]\nname = \"ModName\"\nfilename = \"the_name_of_the.jar\" \naction = \"override\"\n```\n#### Delete the file altogether\n```\n[[Resource]]\nname = \"ModName\"\nfilename = \"the_name_of_the.jar\" \naction = \"remove\"\n```\n#### Make the mod optional\nAppend `optional = true` to any of above\n\n#### Delete any file\nThis can be defined to delete any file that isn't downloadable from CurseForge/Modrinth, e.g. mod config or metadata file.\n```\n[[File]]\nname = \"Useless file.txt\"\naction = \"remove\"\n```\n\n## Scheme Formatting\n\nMust be used as `--scheme \"{keyword}_Literally any text\"` without file extension, follows python's [format string syntax](https://docs.python.org/3/library/string.html#format-string-syntax)\n\n#### Available keywords: \n- `abbr` - provider abbreviation, usually 2 capitals, e.g. `MR`, `CF`\n- `format` - full format name, e.g. `CurseForge`, `Packwiz`\n- `name` same as `pack.name` - modpack name\n- `version` same as `pack.version` - modpack version\n- `pack` - pointer to [Intermediate](mmc_export/Helpers/structures.py#L50-L66) structure\n\nDefault scheme is as simple as `{abbr}_{name}`\n\n***Caution: if you don't use any format specifc keywords, output files will overwrite the same file several times***, can be ignored if you output to only one format.\nAlso, be aware of your filesystem limitations, unsupported characters may lead to an error, or inaccesible file.\n\n# How to Install / Update\n```\npip install -U mmc-export\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Export MMC modpack to other modpack formats",
    "version": "2.8.7",
    "project_urls": {
        "Homepage": "https://github.com/RozeFound/mmc-export",
        "Repository": "https://github.com/RozeFound/mmc-export"
    },
    "split_keywords": [
        "minecraft",
        "mods",
        "modpack",
        "converter",
        "multimc"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bda2cd15aee7ef66bad89de376d08427e5ef9411a3234b4266c552b128d446dd",
                "md5": "47501d56de191b80b31afc3e0fc3c9ac",
                "sha256": "cfcafd7bb8a40c8060045b4c337e8df4f525d9b3da28d42ac20d2f949ab8f02d"
            },
            "downloads": -1,
            "filename": "mmc_export-2.8.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "47501d56de191b80b31afc3e0fc3c9ac",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11,<4.0",
            "size": 21460,
            "upload_time": "2024-01-11T07:11:20",
            "upload_time_iso_8601": "2024-01-11T07:11:20.942027Z",
            "url": "https://files.pythonhosted.org/packages/bd/a2/cd15aee7ef66bad89de376d08427e5ef9411a3234b4266c552b128d446dd/mmc_export-2.8.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cd55b0994d56e239af0c96aceb1e8f1ff665e09c7b30175a90796fb436595153",
                "md5": "434774cdd4b301ea7a17b7819481be29",
                "sha256": "212836e33848fa6badb1c3333be8c386fde08656ace4c3042b7ff2854408fbdb"
            },
            "downloads": -1,
            "filename": "mmc_export-2.8.7.tar.gz",
            "has_sig": false,
            "md5_digest": "434774cdd4b301ea7a17b7819481be29",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11,<4.0",
            "size": 20036,
            "upload_time": "2024-01-11T07:11:23",
            "upload_time_iso_8601": "2024-01-11T07:11:23.046280Z",
            "url": "https://files.pythonhosted.org/packages/cd/55/b0994d56e239af0c96aceb1e8f1ff665e09c7b30175a90796fb436595153/mmc_export-2.8.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-11 07:11:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "RozeFound",
    "github_project": "mmc-export",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "mmc-export"
}
        
Elapsed time: 0.30224s