Coder Social home page Coder Social logo

fg-forge-updater's Introduction

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

fg-forge-updater's People

Contributors

bmos avatar dependabot[bot] avatar rhagelstrom avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.