The Set|File Site

Set File Examples

See Set files in action

This collection of examples demonstrates Set file features from simple configuration to advanced usage.


Simple Examples

Simple Configuration File

Basic application configuration with key-value pairs:


myapp.set

[DATABASE]
Host|localhost
Port|5432
Database|myapp

[SETTINGS]
Theme|dark
Language|en-US
MaxUsers|50

Features: Basic groups, key-value pairs, comments


Protocol Configuration

Serial port and communication settings:

protocols.set

[RS232]
Port|COM1
Baud|9600
DataBits|8
StopBits|1
Parity|N

[MODBUS]
Protocol|modbus|9600|8|1|n
Timeout|1000
RetryCount|3

Features: Multiple groups, complex arrays


Data Tables

Database-Style Records

Structured data with multiple records:

employees.set

[EMPLOYEES]
{id|first_name|last_name|department|hire_date|salary}
101|Alice|Smith|Engineering|2023-01-15|95000
102|Bob|Jones|Marketing|2023-02-20|75000
103|Carol|White|Engineering|2023-03-10|98000
104|David|Brown|Sales|2023-04-05|82000

[DEPARTMENTS]
{id|name|manager|budget}
1|Engineering|Alice Smith|500000
2|Marketing|Bob Jones|250000
3|Sales|David Brown|350000

Features: Field definitions, positional data, multiple tables


Inventory Management

Product catalog with detailed information:

inventory.set

[PRODUCTS]
{sku|name|category|price|stock|reorder_level}
WID-001|Widget A|Widgets|10.00|150|50
WID-002|Widget B|Widgets|15.00|200|50
GAD-001|Gadget X|Gadgets|25.00|75|25
GAD-002|Gadget Y|Gadgets|30.00|100|25

[SUPPLIERS]
{id|name|contact|phone}
1|Acme Corp|John Smith|555-1234
2|Global Supplies|Jane Doe|555-5678

Features: Multiple data tables, numeric data, business logic


Text Blocks

Documentation with Text Blocks

Application information with multi-line text:

application.set

[APP_INFO]
Name|My Application
Version|2.0.0
Description|[{APP_DESCRIPTION}]
License|[{LICENSE_TEXT}]

[{APP_DESCRIPTION}]
My Application is a comprehensive workflow management tool.

Features:
- Task tracking and assignment
- Team collaboration
- Real-time synchronization
- Customizable workflows

Perfect for teams of any size!
[EOG]

[{LICENSE_TEXT}]
MIT License

Copyright (c) 2025 Kirk Siqveland

Permission is hereby granted, free of charge...
[EOG]

Features: Text blocks, text block references, multi-line content


Multi-Language

Internationalization

Content in multiple languages:

i18n.set

[APP_INFO_EN]
AppName|Global Connect
Tagline|Connect with the world
WelcomeMessage|[{WELCOME_EN}]

[APP_INFO_ES]
AppName|Conexión Global
Tagline|Conecta con el mundo
WelcomeMessage|[{WELCOME_ES}]

[APP_INFO_FR]
AppName|Connexion Mondiale
Tagline|Connectez-vous au monde
WelcomeMessage|[{WELCOME_FR}]

[{WELCOME_EN}]
Welcome to Global Connect!
Start connecting with people around the world.
[EOG]

[{WELCOME_ES}]
¡Bienvenido a Conexión Global!
Comienza a conectarte con personas de todo el mundo.
[EOG]

[{WELCOME_FR}]
Bienvenue sur Connexion Mondiale !
Commencez à vous connecter avec des gens du monde entier.
[EOG]

Features: Multiple language groups, text block localization


Advanced Features

Advanced Features Demo

Demonstrating single-use fields, ellipsis, and single-line delimiter override:

advanced.set

[CONTACTS]
{id|name|email|phone|address|city|state|zip}
1|Alice|alice@example.com|555-1234|…
2|Bob|bob@example.com|555-5678|123 Main St|Seattle|WA|98101|…
3|Carol|carol@example.com|555-9999|…|:::note:Call before 3pm

[API_ENDPOINTS]
users|/api/users
products|/api/products
:!search!https://api.example.com/v2/search?query=test|value&sort=name|desc!GET
orders|/api/orders

Features: Single-use fields (##:::##), ellipsis shorthand (##…##), single-line delimiter override


Environment-Specific Configuration

Multiple environment configurations in one file:

env_config.set

[DATABASE_PRODUCTION]
Host|prod-db-01.example.com
Port|5432
Database|myapp_prod
PoolSize|50
SSL|true

[DATABASE_STAGING]
Host|staging-db.example.com
Port|5432
Database|myapp_staging
PoolSize|20
SSL|true

[DATABASE_DEVELOPMENT]
Host|localhost
Port|5432
Database|myapp_dev
PoolSize|5
SSL|false

[CACHE_PRODUCTION]
Provider|redis
Host|prod-cache-01.example.com
Port|6379
TTL|3600

[CACHE_DEVELOPMENT]
Provider|memory
TTL|300

Features: Multiple environment groups, structured naming conventions


Download Examples

All examples available on GitHub:


Create Your Own

Start with a simple example and adapt it to your needs:

  1. Choose an example that matches your use case
  2. Copy and modify the structure
  3. Add your own data
  4. Test with a parser

See Quick Start Guide for basics.


Example Patterns

Common patterns demonstrated in these examples:


Need Help?


← Back to Home



Page last modified on November 29, 2025, at 09:32 PM