Binary File Variables

When downloading binary files via the url attribute, Structure Creator can substitute variables inside supported file formats. This lets you create personalized documents, spreadsheets, and archives from template files.

How It Works

  1. Create a template file (e.g., Word document) with %VARIABLE% placeholders
  2. Host it somewhere accessible via URL
  3. Reference it in your schema with the url attribute
  4. Variables are substituted when the structure is created
<file name="welcome.docx" url="https://example.com/templates/welcome-template.docx" />

If your template contains %PROJECT_NAME% or %AUTHOR%, those placeholders will be replaced with the actual variable values.

Supported Formats

Cross-Platform (Web & Desktop)

These formats work in both the web app and desktop application:

FormatExtensionsVariable Locations
Word.docxDocument text, headers, footers
Excel.xlsxCell values, sheet names
PowerPoint.pptxSlide text, notes
OpenDocument Text.odtDocument text
OpenDocument Spreadsheet.odsCell values
OpenDocument Presentation.odpSlide text
EPUB.epubContent, metadata
ZIP.zipText files inside the archive
Jupyter Notebook.ipynbCode cells, markdown cells, metadata

Desktop Only

Desktop Only: These formats require the desktop application and are not available in the web version.

FormatExtensionsVariable Locations
PDF.pdfForm field values
Image metadata.png, .jpg, .jpeg, .tiff, .webpXMP metadata
MP3.mp3ID3 tags (title, artist, album)
FLAC.flacVorbis comments
TAR.tar, .tar.gz, .tgzText files inside the archive

Office Documents

Word (.docx)

Create a Word template with placeholders in the text:

Welcome to %PROJECT_NAME%!

Author: %AUTHOR%
Created: %DATE%

Reference it in your schema:

<file name="readme.docx" url="https://example.com/templates/readme.docx" />

Variables are substituted in:

  • Main document body
  • Headers and footers
  • Text boxes

Excel (.xlsx)

Create a spreadsheet with placeholder cells:

AB
Project%PROJECT_NAME%
Version%VERSION%
Author%AUTHOR%
<file name="config.xlsx" url="https://example.com/templates/config.xlsx" />

Variables are substituted in cell values. Formulas referencing those cells will recalculate automatically.

PowerPoint (.pptx)

Create presentation templates with variable placeholders in slide text:

<file name="presentation.pptx" url="https://example.com/templates/deck.pptx" />

Variables are substituted in:

  • Slide text
  • Speaker notes
  • Title slides

OpenDocument Formats

LibreOffice and OpenOffice formats work the same way:

<!-- Writer document -->
<file name="document.odt" url="https://example.com/templates/doc.odt" />

<!-- Calc spreadsheet -->
<file name="spreadsheet.ods" url="https://example.com/templates/sheet.ods" />

<!-- Impress presentation -->
<file name="slides.odp" url="https://example.com/templates/slides.odp" />

EPUB Files

Create ebook templates with variable content:

<file name="book.epub" url="https://example.com/templates/book.epub" />

Variables are substituted in:

  • XHTML content files
  • Metadata (title, author, etc.)

Jupyter Notebooks

Create notebook templates with variable placeholders:

<file name="analysis.ipynb" url="https://example.com/templates/analysis.ipynb" />

Variables are substituted in:

  • Code cells
  • Markdown cells
  • Notebook metadata

This is useful for creating personalized data science templates where project-specific names, paths, or configurations can be injected into the notebook.

Archives

ZIP Files

Variables are substituted in text files inside ZIP archives:

<file name="starter-kit.zip" url="https://example.com/templates/kit.zip" />

For example, if the ZIP contains a config.json with %PROJECT_NAME%, it will be substituted.

Binary files inside the archive are copied unchanged.

TAR Archives

Desktop Only: TAR support requires the desktop application.

<file name="backup.tar.gz" url="https://example.com/templates/backup.tar.gz" />

Supports .tar, .tar.gz, and .tgz extensions.

Desktop-Only Features

The following features are only available in the desktop application:

PDF Form Fields

Desktop Only: PDF form field substitution requires the desktop application.

Variables are substituted in fillable PDF form field values:

<file name="form.pdf" url="https://example.com/templates/application.pdf" />

Create your PDF with form fields named to match your variables, or use %VARIABLE% placeholders in default field values.

Image Metadata (XMP)

Desktop Only: Image metadata substitution requires the desktop application.

Variables are substituted in XMP metadata fields:

<file name="photo.jpg" url="https://example.com/templates/photo.jpg" />

Supported metadata fields:

  • Title
  • Description
  • Creator/Author
  • Copyright

Audio Metadata

Desktop Only: Audio metadata substitution requires the desktop application.

MP3 (ID3 Tags)

<file name="intro.mp3" url="https://example.com/templates/intro.mp3" />

Variables in ID3 tags (title, artist, album, etc.) are substituted.

FLAC (Vorbis Comments)

<file name="track.flac" url="https://example.com/templates/track.flac" />

Variables in Vorbis comment fields are substituted.

Platform Availability Summary

FeatureWebDesktop
Office documents (.docx, .xlsx, .pptx)YesYes
OpenDocument (.odt, .ods, .odp)YesYes
EPUB filesYesYes
ZIP archivesYesYes
Jupyter Notebooks (.ipynb)YesYes
PDF form fieldsNoYes
Image XMP metadataNoYes
Audio metadata (MP3/FLAC)NoYes
TAR/TAR.GZ archivesNoYes

Example: Project Documentation Kit

Create a complete documentation package with personalized files:

<folder name="%PROJECT_NAME%">
  <folder name="docs">
    <!-- Personalized Word document -->
    <file name="README.docx" url="https://example.com/templates/readme.docx" />

    <!-- Project tracking spreadsheet -->
    <file name="tracker.xlsx" url="https://example.com/templates/tracker.xlsx" />

    <!-- Presentation template -->
    <file name="overview.pptx" url="https://example.com/templates/overview.pptx" />
  </folder>

  <folder name="assets">
    <!-- Starter kit with config files -->
    <file name="starter.zip" url="https://example.com/templates/starter.zip" />
  </folder>
</folder>

With variables:

  • PROJECT_NAME: my-project
  • AUTHOR: Jane Developer
  • VERSION: 1.0.0
  • DATE: today

All documents will have their placeholders replaced with actual values.