-
Notifications
You must be signed in to change notification settings - Fork 1
Home
-
Select a folder (see selectAllFiles) containing the files we want, including:
-
Image Files
.png
.jpg
.jpeg
.psd
.psb
-
A text file
.txt
, containing all the text to insert in the images.
-
-
The program read the text file, recognizing Page Identifiers. Each time a page is identified, the text below is saved in memory. If not a single page was identified, the program does absolutely nothing.
- In case you have a image open, and selected ONLY a text file, everything in the file is used.
-
The program starts to open every image file and does the following:
-
If disableStarterLayer is
false
, layers in starterLayerFormats will be created, and formatted. -
A groupLayer will be created OR selected (see alwaysCreateGroup)
-
For each text line saved for this page, a text layer will be created inside the folder. It will be formatted as in defaultTextFormat OR one of the customTextFormats objects, if this line is identified the lineIdentifierPrefix. If a line starts with ignoreCustomWith, the line will ALWAYS be formatted as in defaultTextFormat.
-
The configuration file is a JSON
file, used in the program to save external user options. Here is a Example File or you can open the default configuration file given to see how things are organized.
Property | Type | Default | Description |
---|---|---|---|
pageIdentifierPrefix | string | ">>" |
Used in the beginning of a line text (ignoring spaces), to identify a new page. A blank string "" will deactivate this. |
pageIdentifierSuffix | string | "" |
Used in the end of a line text (ignoring spaces), to identify a new page. A blank string "" will deactivate this. |
ignorePageNumber | boolean | true |
This will make the program read the number between pageIdentifierPrefix and pageIdentifierSuffix (ignoring spaces) and try to find a file with the correspondent number to use. |
prioritizePSD | boolean | false |
When ambiguous files are selected (Example: 01.png and 1.psd ), we select the file to use based on a list of priorities based on file extensions: '.png', '.jpg', '.jpeg', '.psd', '.psb' . When prioritizePSD is true, we will prioritize the PSD and PSB files |
selectAllFiles | boolean | false |
Instead of selecting a folder containing files, select all files you want, including the text file. |
alwaysCreateGroup | boolean | false |
If this is true, it will ALWAYS create a folder by the name in groupLayer.name. If false, it will create only if it doesn't exists yet. |
ignoreCustomWith | string | "" |
A line starting with this, will ALWAYS be formatted as in defaultTextFormat. A blank string "" or omission will deactivate this. |
columnGroup | boolean | false |
If true , every column of text, will be in a separated group. |
disableStarterLayer | boolean | true |
Disable starterLayerFormats functions. |
disableCustomTextFormats | boolean | true |
Disable customTextFormats functions. |
groupLayer | LFO | { name: "Types" } |
This LFO object will control how the folder layer is formatted. If it have no name, it will use the default one. If a property is not included, it will use default ones from Common Properties. |
defaultTextFormat | LFO | {} |
This LFO object will control how the text will be formatted as default. If a property is not included, it will use default ones from Common Properties and Text Properties. |
customTextFormats | Array<LFO> | [] |
This is an array [] containing one or more LFO objects. Control specific text formats to automatically be used. |
starterLayerFormats | Array<LFO> | [] |
This is an array [] containing one or more LFO objects. Control layers that will be automatically created as the program runs. |
This can be used in defaultTextFormat
, customTextFormats
, starterLayerFormats
and groupLayer
properties from the configuration file.
Property | Type | Default | Description |
---|---|---|---|
name | string | "Default Name" |
The layer name. |
visible | boolean | true |
If the layer will be visible or not. |
opacity | number | 100 |
Layer opacity. Range from 0 to 100. |
grouped | boolean | false |
Layer clipping mask. Don't work on folders. |
blendMode | number | "" |
Layer blend mode. See Blend Mode Options for options. Omit, or use a blank string "" to not change anything. |
allLocked | boolean | false |
Completely block settings and contents of the layer. Will deactivate all 3 below. |
transparentPixelsLocked | boolean | false |
Edit only opaque portions of the layer. |
pixelsLocked | boolean | false |
Pixels can't be edited (with a Paint Brush for example). |
positionLocked | boolean | false |
Layer can't be moved. |
Can only be used in defaultTextFormat
and customTextFormats
from the configuration file. If both lineIdentifierPrefix and lineIdentifierSuffix are equal ""
or omitted in a customTextFormats
object, the object is deactivated entirely.
Property | Type | Default | Description |
---|---|---|---|
lineIdentifierPrefix | string | "" |
Can only be used in customTextFormats . A blank string "" or omission will deactivate this. Identifies the type of formatting to use in a line of text. Will be ignored if ignoreCustomWith identifier was found before this. |
lineIdentifierSuffix | string | "" |
Can only be used in customTextFormats . A blank string "" or omission will deactivate this. |
size | integer | 0 |
Font size. Omit, or use a zero 0 to not change anything. |
font | string | "" |
Font name. Omit, or use a blank string "" to not change anything. |
color | string | "" |
Text color in hexadecimal notation, for example: "#FF0066" . Omit, or use a blank string "" to not change anything. |
boxText | boolean | false |
If true, a TextBox will be used instead of a PointText. |
justification | string | "" |
Text justification. See Justification Options for options. Omit, or use a blank string "" to not change anything. |
language | string | "" |
Text language, useful for auto-wrapping. See Language Options for options. Omit, or use a blank string "" to not change anything. |
antiAlias | string | "" |
Method used to smooth text edges. See Anti Alias Options for options. Omit, or use a blank string "" to not change anything. |
capitalization | string | "" |
Force a capitalization method. Capitalization Options for options. Omit, or use a blank string "" to not change anything. |
Can only be used in starterLayerFormats
from the configuration file.
Property | Type | Default | Description |
---|---|---|---|
duplicate | boolean | false |
Is a duplicate from layer below/before. Can only be used from the 2 layer. |
isBackgroundLayer | boolean | false |
Turn this layer the background layer. Will override a lot of configurations. |
- CENTER
- CENTERJUSTIFIED
- FULLYJUSTIFIED
- LEFT
- LEFTJUSTIFIED
- RIGHT
- RIGHTJUSTIFIED
- BRAZILLIANPORTUGUESE
- CANADIANFRENCH
- DANISH
- DUTCH
- ENGLISHUK
- ENGLISHUSA
- FINNISH
- FRENCH
- GERMAN
- ITALIAN
- NORWEGIAN
- NYNORSKNORWEGIAN
- OLDGERMAN
- PORTUGUESE
- SPANISH
- SWEDISH
- SWISSGERMAN
- NORMAL
- DISSOLVE
- DARKEN
- MULTIPLY
- COLORBURN
- LINEARBURN
- LIGHTEN
- SCREEN
- COLORDODGE
- LINEARDODGE
- OVERLAY
- SOFTLIGHT
- HARDLIGHT
- VIVIDLIGHT
- LINEARLIGHT
- PINLIGHT
- HARDMIX
- DIFFERENCE
- EXCLUSION
- SUBTRACT
- DIVIDE
- HUE
- SATURATION
- COLORBLEND
- LUMINOSITY
- PASSTHROUGH
- NONE
- SHARP
- SMOOTH
- CRISP
- STRONG
- NORMAL
- ALLCAPS
- SMALLCAPS
This is a commented configuration file as example. But remember, .JSON
files CAN'T have comments.
{
// These 3 Configurations determine how we will identify
// a new 'page' in your .txt file:
pageIdentifierPrefix: "[",
pageIdentifierSuffix: "]",
ignorePageNumber: false, // This will ignore the number inside identifiers
// This example will identify lines like:
// [1]
// [02]
// [ 30 ]
// And will try to find files like
// "01.png", "2.psd", "30.jpeg" to insert this text into
prioritizePSD: false, // Prioritize '.psd' and '.psb' over the other files
// If have ambiguous files selected like "01.png" and "1.psd"
// There is a order of priorities, that is:
// '.psd', '.psb', '.png', '.jpg', '.jpeg' OR
// '.png', '.jpg', '.jpeg', '.psd', '.psb'
selectAllFiles: false, // With this, you select every file manually, rather than a folder
alwaysCreateGroup: false, // With this, it will always create a folder named by 'groupLayer.name' below
groupLayer: {
name: "Types", // Folder name
visible: false, // Visibility of the layer
},
defaultTextFormat: {
size: 16, // Font size
font: "CCWildWordsInt Regular", // Font name
boxText: true, // A TextBox instead of a PointText
justification: "CENTER", // Justification
visible: true, // Visibility of the layer
language: "BRAZILLIANPORTUGUESE", // Language
},
ignoreCustomWith: ".", // Lines starting with this, will always be formatted as default
customTextFormats: [ // You can Add as much 'Layer Format Object's as you want
{
// Necessary:
lineIdentifierPrefix: "#", // Lines starting with this, will be formatted as following
// Optional:
// Everything not included will be formatted as in 'defaultTextFormat'
size: 12,
font: "Chinacat",
boxText: false
}
]
}