Skip to content

Submits updated packages to the FantasyGrounds Forge

License

Notifications You must be signed in to change notification settings

bmos/FG-Forge-Updater

Repository files navigation

CodeQL Pytest Mypy Ruff

Forge Updater

Uploads new builds to FantasyGrounds Forge and updates item page descriptions without requiring user input. It is intended for use in CI release workflows such as one I use here.

Warning

At the moment, this will only work for the first page of 100 items found on a Forge account.

Warning

Markdown parsing is not quite as permissive as GitHub. If you use tables, you must have an empty line directly before them.

Warning

FG Forge does not allow inline images. To work around this, images are replaced by links using the image's alt text. To ensure this can work, be sure to configure alt text on your README images and reference them via URL (not relative file paths).

Getting Started / Before Using

To run this code, you'll need to have Python 3.10, 3.11, or 3.12 installed on your machine. You'll also need to install the required packages by running the following commands from inside the project folder:

pip install -U pip uv
uv venv
source .venv/bin/activate # Linux or macOS
.venv\Scripts\activate # Windows
uv pip install -e .

Usage

  1. Create a .env file in the project folder containing the following (but with your information):

Note

You can add these values directly to your environment variables.

# your FG forum username
FG_USER_NAME=**********
# your FG forum password
FG_USER_PASS=**********
# the item ID of the FG Forge item you want to modify
FG_ITEM_ID=33
# the name(s) of the (supported -- ext, pak, mod, etc) file(s) you want to upload (can be comma-separated list)
FG_UL_FILE=path/to/file.ext

# [OPTIONAL] set this to FALSE to skip build uploading
FG_UPLOAD_BUILD=TRUE
# [OPTIONAL] set this to "TEST" or "NONE" if you would rather target those channels
FG_RELEASE_CHANNEL=LIVE

# [OPTIONAL] set this to TRUE to prevent replacing the description with the contents of README.md
FG_README_UPDATE=FALSE
# [OPTIONAL] set this to TRUE to remove images instead of creating links
FG_README_NO_IMAGES=FALSE

# [OPTIONAL] set this to TRUE to generate a "cumulative-sales.png" image
FG_GRAPH_SALES=FALSE
  1. Put an ext file to upload into the project folder.
  2. Run the following command from inside the project folder:
python -m src.main

About

Submits updated packages to the FantasyGrounds Forge

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages