DG(1)

πŸ“¦
version 2.4 Β· 6 versions
, in epel 10, fedora 43, fedora 44

✨ DG(1) β€” the manual, but make it cute ✨

okay so bestie, welcome to the dg page, from the Generated Python Manual. It's giving main character energy for a templating tool and honestly? deserved. πŸ’–


🌸 NAME 🌸

dg β€” templating system/generator for distributions. that's it, that's the vibe. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

dg [-h] [--version] [--projectdir PROJECTDIR] [--distro DIST]
[--multispec MULTISPEC] [--multispec-selector MULTISPEC_SELECTOR]
[--spec SPEC] [--output OUTPUT] [--macros-from PROJECTDIR] [--container
CONTAINER_TYPE] [--macro MACRO] [--max-passes PASSES] [--keep-block-
whitespaces] (--template TEMPLATE | --multispec-combinations)

no cap, that's the whole shape of it. note the last line: it's an either/or situation, you gotta pick one. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

Generate script using predefined metadata about distribution and templates.

literally it takes the metadata you already have about a distro, smooshes it together with a template, and spits out a script. iconic behaviour, honestly. ✨

As an example of dg usage, to generate Dockerfile for Fedora 21 64-bit system, you may use command(s):

$ cd project/directory $ dg --spec      docker-data.yaml      \
--template  docker.tpl

like... look at her go. πŸ₯Ή


πŸ’– OPTIONS πŸ’–

okay this is the part everyone scrolls to, so let's go, every single one:

  • --version β€” show program's version number and exit. a lil "who am i" moment. πŸ‘‘
  • --projectdir PROJECTDIR β€” Directory with project (defaults to CWD). yes babes, the default is literally your current working directory, she's not shy.
  • --distro DIST β€” Use DIST distribution configuration. Either that DIST.yaml needs to exist in the distgen installation, or it can be any file within PROJECTDIR (relative or absolute file name). so, two doors, pick your entrance. πŸšͺ
  • --multispec MULTISPEC β€” Use MULTISPEC yaml file to fill the TEMPLATE file. feeding the template, basically. πŸ“
  • --multispec-selector MULTISPEC_SELECTOR β€” Selectors for the multispec file. choose your fighter. 🌈
  • --spec SPEC β€” Use SPEC yaml file to fill the TEMPLATE file. the classic route, no cap.
  • --output OUTPUT β€” Write result to OUTPUT file instead of stdout. if you don't use this, it just yells into your terminal instead. πŸ—£οΈ
  • --macros-from PROJECTDIR β€” Load variables from PROJECTDIR. pulling the variables out of there, respectfully.
  • --container CONTAINER_TYPE β€” Container type, e.g. 'docker'. she's a lil container-aware, we love that for her. 🐳
  • --macro MACRO β€” Define distgen's macro. make it, name it, own it. πŸ’…
  • --max-passes PASSES β€” Maximum number of rendering passes, defaults to 32. thirty-two whole passes. she will keep going, but she has limits. 😀
  • --keep-block-whitespaces β€” Disable the jinja2 trim_blocks and lstrip_blocks options. so by default she's tidying your whitespace, and this flag says "no thank you, i want it messy". πŸ™ˆ
  • --template TEMPLATE β€” Use TEMPLATE file, e.g. docker.tpl or a template string, e.g. "{{ config.docker.from }}". yes, a whole template string inline, she's flexible like that. ✨
  • --multispec-combinations β€” Print available multispec combinations. window shopping, but for combinations. πŸ›οΈ

⭐ AUTHOR ⭐

Red Hat Databases team. shoutout to the team, absolute legends. 🫢


tiny reminder bestie: --template and --multispec-combinations are an either/or deal β€” the synopsis says so and the synopsis does not lie. πŸ’€

and that's the page!! mwah πŸ’‹ this was distgen 2.4, dated 2026-08-26, and she ate, fr fr. πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from