Skip to content

132nd-vWing/GRG-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GRG-bot

Gridded Reference Graphics (GRG) bot

Installation

Insert the bot's token and your own user-ID into environment and run deploy.sh

Usage

In the #grg-bot discord channel, upload an image, and put !grg at the beginning of the caption message. The bot will then convert the image into a GRG according to your specifications, and return all files in a .7z-archive. You can pass further options, like !grg title=AO SIERRA, h_pages=2. Multiple options must be separated by a comma.

All GRGs are returned both as PNG (for your DCS kneeboard) and as PDF (for printing or use on a second monitor/device).

DCS uses an aspect ratio of 3:4 for kneeboards. If the output ratio for individual pages (everything that is not joined) does not match 3:4, it will get padded to match.

The options are divided into keyword arguments and flags. Keywords are:

  • h_pages=1|2|...: How many horizontal GRG pages you want to split your map into. If you provide a value greater than 1, all pages will be enumerated in the title bar. Default: 1
  • keypad=0|1|2|3|4: Where to print the keypad template. 0 disables the keypad, 1 puts it in the lower left corner, 2 is lower right, 3 upper right and 4 upper left. Default: 1
  • north=0|1|2|3|4: Where to print the north indicator. See keypad. Default: 3
  • nx=2|3|...: number of horizontal grid elements per page of output. Default: 6
  • ny=2|3|...: number of vertical grid elements per page of output. Default: 8
  • scale=NUMBER: overall width of the image in nautical miles. When given, a scale will be printed in scalecorner with the width and height of a single grid element in nautical miles and meters. Default: 0.0
  • scalecorner=0|1|2|3|4: Where to print the scale. See keypad. Default: 2
  • title=TITLE: Adds a title above each page. Default: empty
  • v_pages=1|2|...: Works like h_pages, but for vertical segments. Default: 1
  • width=NUMBER: The width of a page of output in centimeter. Default: 10.5 (sheet of A6 paper in portrait)

Flags are:

  • join: GRG-bot will return a second archive that contains one large GRG, consisting of the joined smaller pages. Especially useful for JTACs, AWACS, printing and secondary monitors.

Example

Input image:

!grg title = QESHM AIRFIELD, h_pages = 2, ny=9, scale=2.72, width=10, north=4, join

Input image

GRG-bot will return the following (scaled down for GitHub):

Output page 1

Output page 2

Output page 3