Metamation Developer Notes

  • Developer Notes
  • Resource Map
  • Tools
    • Code Formatting
    • Configuring Git
    • Assignments
    • Testing with Windows Sandbox
    • Single Binary Applications
    • Self-Updating Applications
  • Flux Workflow
    • Flux Workflow
    • Flux Development Style Guide
    • Release notes for Flux
    • SonarCloud analysis for Flux
    • Build a Flux SDK Program
    • Shipping Flux
    • Flux.Test
      • BasicBendAuto Test
      • LaserAuto.cs Detailed Documentation
      • Laserexample:Test1
  • Technical Notes
    • File formats
      • .FX File Format
      • Au(Gold) streams
      • .GEO File Format
      • .LST File Format
      • .LST file - technology
      • .BNC File Format
      • .WAD Files: Flux Resource Packages
      • .Curl Files: ASCII config information
    • Folders App
      • Data\Bendtools
      • Data\Machines
    • FluxCode
      • Welcome & Repo Map
      • Architecture & System Context
      • Subsystem *Bend* (Press Brake)
      • Subsystem *BCell* (Bend Cell Automation)
      • API Maps
      • Data Model Catalog
      • Design Patterns -- A Reader's Guide
      • Tests and Golden Paths
      • Guided Code Tours
      • CAM Glossary with Code Mapping
      • Assignments
      • Flux Onboarding Handbook
    • Data flow
      • Part
        • Part.Dwg
        • Part.Load
        • Part.Load to Part.Dwg
      • BendTech.cs
      • Bend Technology
      • Laser Cutting Technology
    • LTS (Long term support mechanism)
    • Machine ID Scheme
  • FluxTester
    • Commands and Scripts
    • Command Cookbook
    • Script Commands
    • BendTooling.cs Test Inventory
    • LaserTooling.cs Test Steps
    • Fluxtester Recipe Book
    • Nesting.cs Overview
    • Nesting.cs Recipe Book
    • Job.cs Overview
    • Job.cs Recipe Book
  • Software license
  • 3d party software
    • Python
  • Documentation
    • Bento documentation
      • Structure of a Bento page
      • Attributes
    • Software
      • Software Requirement
      • Installation
      • Git workflow for documentation contributors
    • Quick start guide
    • Workflow
      • Roles and responsibilities
      • Analyze
      • Edit
      • Proofread
      • Pre-Publish
      • Publish
      • Release cycle
      • Information required for Documentation Team
      • Checklist for Documenters
    • Styleguide
    • Flavoring
    • Translation
      • Ordering translation for a new document
    • Citations
    • Annotation
Documentation
/
Flavoring

Flavoring

At TINC, we create documents for a set of products that are used by different customers within TRUMPF. Each customer has their own identity, which is reflected in the product name, the logo, and other branding elements. To support this, we use a process called Flavoring.

Flavoring is the process of adapting a core document into a customer-specific version—such as for Trumpf, JFY, or Lantek. Flavoring can be apply to entire product documents (e.g., Praxis transformed to JFY+) or modular extractions, where components are split into tailored modules (e.g., Flux transformed into FluxCut, FluxBend, FluxFold).

Bento tool has a set of functionality to perform these tasks using substitutional and conditional compilation. The flavoring is mainly defined by attributes in the manifest.txt and contents.txt file.

Substitutional compilation

Below is a typical example of substitutional compilation in manifest.txt for Flux reference manual to create TecZone reference manual:

FLAVORS=FLUX, JFY, TRUMPF (1)

TITLE=Flux Reference Manual (2)
OUTDIR=../FluxHTML
LOGO=img/logo.png,103,34
COPYRIGHT=Copyright © 2025 by Metamation. All rights reserved.
FAVICON=img/flux-icon.png

ATTRIBUTE=APPNAME:Flux (3)
ATTRIBUTE=BENDAPP:Flux
ATTRIBUTE=FOLDAPP:Flux
ATTRIBUTE=CUTAPP:Flux
ATTRIBUTE=PRAXISAPP=Praxis
ATTRIBUTE=BRAND:TRUMPF

#if TRUMPF (4)
  TITLE=TecZone Bend Reference Manual
  OutDIR=../BoostHTML
  COPYRIGHT=Copyright © 2025 by TRUMPF SE + Co.KG. All rights reserved.

  ATTRIBUTE=APPNAME:TecZone
  ATTRIBUTE=BENDAPP:TecZone Bend
  ATTRIBUTE=FOLDAPP:TecZone Fold
  ATTRIBUTE=CUTAPP:TecZone Cut
  ATTRIBUTE=PRAXISAPP=HomeZone
  ATTRIBUTE=BRAND:TRUMPF
#endif
1 The FLAVORS line defines the available flavors for this document. Each flavor can have its own set of attributes and files, which are used to customize the document for different customers. The first flavor name in this line is the default flavor.
2 The second section defines the title of the document and other metadata. The OUTDIR specifies where the generated HTML files will be placed, and LOGO provides the path to the logo image. COPYRIGHT and FAVICON are also defined here.
3 The ATTRIBUTE section define substitution attributes that replace product names within the document. These attributes can be used to customize the content for different flavors, such as Flux or TecZone.
4 The #if TRUMPF conditional block allows for specific attributes and content to be included only when the TRUMPF flavor is being processed. This is useful for tailoring the document to the specific needs of TRUMPF customers.

Conditional compilation

Below is a typical example of conditional compilation in contents.txt for a Flux reference manual to create TecZone Cut reference manual:

On the left is the files or folder names and on the right is the conditional attributes.

[Intro] (1)
[CAD]
[Cut]           #ifdef TRUMPF (2)
[Bend]          #ifndef TRUMPF
[BCell]         #ifndef TRUMPF
[Fold]          #ifndef TRUMPF
[Settings]      #ifdef TRUMPF
[Database]
[Report]
[Appendix]
1 Defines the content for the document.
2 The #ifdef TRUMPF & #ifndef TRUMPF directive allows for specific sections to be included or excluded based on the flavor being processed. In this case, the Cut section is included only for the TRUMPF flavor, while the Bend, BCell, and Fold sections are excluded.

Exchange files for a flavor

In addition to the manifest file, each flavor can have its own set of files that are used to customize the document. These files can include:

  1. Asciidoc files (.adoc)

  2. Images (.png)

  3. CSS files (.css)

To enable this, the naming of the files must have the flavor name at the beginning as shown below:

Impressum.adoc
TRUMPF.Impressum.adoc
logo.png
TRUMPF.logo.png
Site.css
TRUMPF.Site.css

This option is highly essential for images when creating a flavored document. The images for TRUMPF flavor can be placed in the same img folder. Bento will identify the images based on the flavor name and use the appropriate image for the TRUMPF document.

Conditional attributes in asciidoc file

Conditional attributes can also be used to include or exclude content[1] based on the current flavor. This is done using the ifdef directive in the Asciidoc files. For example, to include content only for the TRUMPF flavor, you can use:

 ifdef::TRUMPF[]
 The text here is included only in the TRUMPF flavor of the product and describes
 how TecZone module is used.
 endif::[]

You can also use the ifndef directive to exclude content for a specific flavor:

 ifndef::TRUMPF[]
 The text here is included in all flavors except for the TRUMPF flavor.
 endif::[]

1. This content can a paragraph, table, images or an entire section in a document.

Contents

  • Substitutional compilation
  • Conditional compilation
  • Exchange files for a flavor
  • Conditional attributes in asciidoc file
Styleguide Translation

      Copyright © 2025 TRUMPF Metamation. All rights reserved.

    Compiled by Bento