documentation

This commit is contained in:
iou1name 2019-06-05 11:11:17 -04:00
parent 1f0f6f0efa
commit e0afebc5e6
3 changed files with 8 additions and 8 deletions

View File

@ -13,13 +13,14 @@ Python packages: ` `
## Usage ## Usage
### Master ### Master
Copy `overwrought_master.py` and the matching config file to your `.minecraft/` folder. Edit the config file appropriately. Copy `overwrought_master.py` and the matching config file to your `.minecraft/` folder. Edit the config file appropriately.
`$ python3 overwrought_master.py action [options] [target]` `overwrought_master.py action [options] [target]`
__actions__ __actions__
* `add` Add a new mod to the modpack. `target` must be a url to a curseforge mod project page. By default, it will prioritize release phases as Release, Beta and then Alpha. `--phase` can alter this. Will always grab the latest version of whichever phase it targets. * `add` Add a new mod to the modpack. `target` must be a url to a curseforge mod project page. By default, it will prioritize release phases as Release, Beta and then Alpha. `--phase` can alter this. Will always grab the latest version of whichever phase it targets.
* `add_all` Add a list of mods to the modpack. `target` must be a file containing a newline-delineated list of curseforge mod project page urls. Will prioritize release phases similar to `add`, however `--phase` will not affect it. * `add_all` Add a list of mods to the modpack. `target` must be a file containing a newline-delineated list of curseforge mod project page urls. Will prioritize release phases similar to `add`, however `--phase` will not affect it.
* `update` Update a specific mod in the modpack. `target` must be the url associated with the mod. By default, it will prioritize the release phase previously added. `--phase` can alter this. Will only update if the targeted mod is more recent than the one previously downloaded. * `update` Update a specific mod in the modpack. `target` must be the url associated with the mod. By default, it will prioritize the release phase previously added. `--phase` can alter this. Will only update if the targeted mod is more recent than the one previously downloaded. By default, the old version of the mod will be moved to another folder `old_mods`. If `--delete` is passed, it be deleted instead.
* `update_all` Update every mod in the modpack. No `target` needed. Will prioritize release phases similar to `update`, however `--phase` will will not affect it. * `update_all` Update every mod in the modpack. No `target` needed. Will prioritize release phases similar to `update`, however `--phase` will will not affect it. By default, the old version of the mod will be moved to another folder `old_mods`. If `--delete` is passed, it be deleted instead.
* `summary` Generate a summary page as html. Summary page displays a list of all mods in the modpack and a change log that is updated as changes are made to the modpack. * `summary` Generate a summary page as html. Summary page displays a list of all mods in the modpack and a change log that is updated as changes are made to the modpack.
* `post` Upload the modpack so the remote server specified in `config_master.py`. Note that only mods not currently on the server, or which are of a different version, are sent. A copy of the current database and summary page is also sent.
### Server ### Server
`gunicorn -b localhost:5000 -e SCRIPT_NAME=/overwrought overwrought_server:app` `gunicorn -b localhost:5000 -e SCRIPT_NAME=/overwrought overwrought_server:app`

View File

@ -9,4 +9,3 @@ web server/reverse proxy eg. Nginx should allow access to this directory.
modpack_name = "motherlode1" modpack_name = "motherlode1"
pw_hash = "PW_HASH" pw_hash = "PW_HASH"
mods_dir = "/var/www/overwrought/mods" mods_dir = "/var/www/overwrought/mods"
"""

View File

@ -290,8 +290,8 @@ if __name__ == "__main__":
import argparse import argparse
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
description="A series of tools and functions for managing a" \ description="A series of tools and functions for managing a "
+ "Minecraft modpack.", "Minecraft modpack.",
) )
parser.add_argument( parser.add_argument(
"action", "action",
@ -301,8 +301,8 @@ if __name__ == "__main__":
parser.add_argument( parser.add_argument(
"target", "target",
nargs='?', nargs='?',
help="The mod, mod url, or file containing a list of urls to " \ help="The mod, mod url, or file containing a list of urls to "
+ "work with.", "work with.",
) )
parser.add_argument( parser.add_argument(
"-p", "-p",