User Manual

The TextGenerator consists of two text boxes; the pattern text box at the top where the user enters a pattern, which is the basis for the generated combinations displayed in the results text box at the bottom of the application. The pattern is a verbatim text string with "symbols" that are parsed for variable substitution to generate multiple combinations of the original pattern. See the Nomenclature page for an explanation of the terms used herein.

Usage

The pattern defines the occurrence of tokens, which are made up from members. This is done by using a set of special characters that are recognized by the TextGenerator.

Basically, any string of characters prefixed with [[ and suffixed with ]] and contains text in between is evaluated as a symbol. The string inside the prefix and suffix is the token, of which there are two types: the variable and the reference. The variable is a string of members, separated by a "divisor". These members are the literal values that will be used to replace the entire symbol when generating all permutations (e.g. combining the members of each variable).

The reference token, on the other hand, is a pseudo variable that simply identifies the location where a regular variable token shall be inserted again. This enables the possibility of using the same variable several times at different places in the pattern.

The members that make out the variable token and optionally the conditional reference token is a list where each item is separated by the divisor. Each member must fulfill one of the following rules:
  • It must be a sequence of alpha-numerical characters, including the underscore character (_).
  • It must be a number.
  • Any sequence of any characters contained within quotation marks (").

List of special characters

Character Function
[[ Denotes the start of a symbol.
]] Denotes the end of a symbol.
| The divisor. Separates members inside a variable.
\number Reference identifier. References a variable by the zero-based index.
\" An escaped quotation mark (") inside a quoted string.


Please note that the divisor, the reference identifier and the quotation marks must be inside the symbol denotation characters. See the examples below.
However, the variables and the variable references must not be declared in any particular order. Multiple lines are also allowed in the pattern (but not inside a variable).
The variable only accepts letters and numbers.

Shortcuts

Use the following shortcut keys to control the generation from the user interface.

Key Function
F5 Generate using the current pattern.
F6 Cancel the ongoing generation.
F10 Clear the results.
F12 Copy the results to the clipboard.

Examples

The following examples serves as a guide on how to define valid patterns.

Basic combination

Pattern:

Bitrate: [[128|160|192|256]]kbps	Sample rate: [[22|44|48]]kHz

This pattern has two variables; the first one with four members (128, 160, 192 and 256), and the second one with three members (22, 44 and 48).
Also note that the pattern contains a horizontal tab outside the symbols. This white space (and all other characters) will be transferred "as is" to the results.

Results:

Bitrate: 128kbps	Sample rate: 22kHz
Bitrate: 128kbps	Sample rate: 44kHz
Bitrate: 128kbps	Sample rate: 48kHz
Bitrate: 160kbps	Sample rate: 22kHz
Bitrate: 160kbps	Sample rate: 44kHz
Bitrate: 160kbps	Sample rate: 48kHz
Bitrate: 192kbps	Sample rate: 22kHz
Bitrate: 192kbps	Sample rate: 44kHz
Bitrate: 192kbps	Sample rate: 48kHz
Bitrate: 256kbps	Sample rate: 22kHz
Bitrate: 256kbps	Sample rate: 44kHz
Bitrate: 256kbps	Sample rate: 48kHz

Quoted strings

Pattern:

I like [[apples|cherries|"forest fruits"]] in my [[scones|"Corn Flakes (TM)"]]!

This pattern has two variables; the first one contains three members (apples, cherries and "forest fruits") and the second variable contains two members (scones and "Corn Flakes (TM)").
Since the members "forest fruits" and "Corn Flakes (TM)" contains spaces and other non-alpha-numeric characters, they must be written inside quotation marks.

Results:

I like apples in my scones!
I like apples in my Corn Flakes (TM)!
I like cherries in my scones!
I like cherries in my Corn Flakes (TM)!
I like forest fruits in my scones!
I like forest fruits in my Corn Flakes (TM)!

Quoted strings with quotes

Pattern:

[["Peter \"Pete\" Thornton"|"Angus MacGyver"]] is trapped in a [[cave|"multi billion dollar \"company\""]]!

This pattern has two variables; the first one contains two members (Peter "Pete" Thornton and Angus MacGyver) and the second variable contains two members (cave and multi billion dollar "company").
As mentioned before, all members that are not strictly alpha-numerical sequences must be written inside quotation marks. However, when using a quotation mark inside a quoted string, add a backslash (\) in front of the quotation mark like this: \" . This will insert a quotation mark at that location.

Results:

Peter "Pete" Thornton is trapped in a cave!
Peter "Pete" Thornton is trapped in a multi billion dollar "company"!
Angus MacGyver is trapped in a cave!
Angus MacGyver is trapped in a multi billion dollar "company"!

Using basic references

Pattern:

Manufacturer [[Alfa|Beta|Gamma]], Reference number [[1|2|3|4]] (id [[\0]]:[[\1]])

This pattern has two variables; the first one with three members (Alfa, Beta and Gamma), and the second one with four members (1, 2, 3 and 4).
It also has two references; the first one references the first variable (with index 0), and the second one references the second variable (with index 1). These references will subsequently be replaced by the corresponding variable member.

Results:

Manufacturer Alfa, Reference number 1 (id Alfa:1)
Manufacturer Alfa, Reference number 2 (id Alfa:2)
Manufacturer Alfa, Reference number 3 (id Alfa:3)
Manufacturer Alfa, Reference number 4 (id Alfa:4)
Manufacturer Beta, Reference number 1 (id Beta:1)
Manufacturer Beta, Reference number 2 (id Beta:2)
Manufacturer Beta, Reference number 3 (id Beta:3)
Manufacturer Beta, Reference number 4 (id Beta:4)
Manufacturer Gamma, Reference number 1 (id Gamma:1)
Manufacturer Gamma, Reference number 2 (id Gamma:2)
Manufacturer Gamma, Reference number 3 (id Gamma:3)
Manufacturer Gamma, Reference number 4 (id Gamma:4)

Conditional references

Pattern:

My momma says I'm [[special|cute]]. Other [[people|parents]] say I'm [[\0|retarded|"butt ugly"]]  (not [[\0]]). ):

This pattern has two variables; the first one contains two members (special and cute) and the second variable also contains two members (people parents).
The pattern also contains one conditional reference and one ordinary reference. The conditional reference is referring to the first variable (with index 0), but it will replace the variable's member with its own member. However, the second reference also refers to the first variable, but without replacing the member.

Results:

My momma says I'm special. Other people say I'm retarded (not special). ):
My momma says I'm special. Other parents say I'm retarded (not special). ):
My momma says I'm cute. Other people say I'm butt ugly (not cute). ):
My momma says I'm cute. Other parents say I'm butt ugly (not cute). ):

Last edited Jul 8, 2010 at 9:39 AM by Reyhn, version 35

Comments

No comments yet.