Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1 of 178
Tinderbox v5 Manual
Link Types 28
Macros 28
Prototypes 29
Prototype Inheritance 30
Any Note Can Be A Prototype 31
Prototypes and Children 31
Built-in Prototypes 32
The Toolbar 33
Importing Notes 34
Drag and Drop 34
Spreadsheets 34
Explode 35
Email 35
Views 37
Moving around 37
Map views 38
The Prototype Tab 39
Links 39
Adornments 39
Image Adornments 40
Locking Adornments 40
To make an adornment "sticky" 40
Smart Adornments 41
Cleanup 41
The Up-Arrow 41
Changing The Appearance of Notes 41
Custom badges 43
Changing the appearance of the Map background 44
Picture Adornments 44
Displaying Text In Maps 44
Subtitle 45
Display Expression 45
Hover Expression 45
Containers 46
Summary Tables 47
Outline views 48
Outline Views 48
The disclosure triangle 48
The Outline Icon 49
Editing a note title 49
Hoisting 50
Separators 50
Changing the View Focus 51
Checkboxes 51
Columns 51
Timeline views 52
Timeline appearance 52
Scope of the Timeline 52
Where settings are stored - containers vs. notes 53
Placing notes in discrete bands 53
Color of the main view 53
2 of 178
Tinderbox v5 Manual
Color of the main view 53
Coloring Timeline bands 53
Timeline band labels 53
Adornments 53
Varying Scale and Label size 54
Customizing the Scale bar 54
Note appearance on the Timeline 54
Moving notes in the Timeline 54
Chart & Treemap views 55
Chart Views 55
The disclosure triangle 55
Treemap Views 55
Changing the View Focus 56
Arranging notes 57
Outline Views 57
Chart Views 57
Treemap Views 57
Aliases 58
To create an alias 58
To find the original note of an alias 58
Properties of Aliases 58
Links 60
Types of Links 60
Basic Links 60
Using a parking space 61
Text Links 61
To create a text link: 61
Internet Links 62
Link Types 63
Browse Links 64
To view links in the Browse Links window 64
Deleting Links 65
To delete a link 65
To delete a text link 66
The Roadmap View 66
To view links with the Roadmap 66
Linking to Text 67
WikiLinks 67
Footnotes 69
To create a footnote 69
Following Links 70
To follow a text link 70
To follow a basic link 70
To choose which link to follow 70
Which Link Will Be Followed? 71
Overlapping Text Links 71
Agents 72
Creating an agent 72
Agent Search Criteria 72
Searching for text patterns 73
Searching attributes 74
3 of 178
Tinderbox v5 Manual
4 of 178
Tinderbox v5 Manual
5 of 178
Tinderbox v5 Manual
6 of 178
Tinderbox v5 Manual
Sorting 133
TextFormat 134
Textual 134
Weblog 135
Appendix 2: Regular Expressions 136
Wildcard Characters 136
Character Ranges 136
Anchors 137
The \ [backslash] Character 137
Parentheses 137
Appendix 3: Actions, Expressions and Rules 139
Attribute Types 139
Attribute References 140
Note Designators 140
Group Designators 141
find() 142
Queries 142
true and false 142
Comparisons 142
Text Patterns 143
Other Queries 143
Actions 144
String Functions 145
String Operators 145
String Operations 146
format() 146
string encoding 147
Numeric Functions 148
Mathematical Operators 148
sum(), sum_if, avg and avg_if() 148
Converting Numbers to Strings 149
Color functions 149
Color Operators 149
Converting Colors to Strings 149
Converting Strings to Colors 149
Manipulating Colors 150
Date Functions 150
Date Properties 150
Date Operators 150
Date/time comparison operators 151
List & Set Functions 151
List & Set Operators 151
List Operations 153
Logic functions 153
Logical Operators 154
Logical equality tests 154
Logical Group Operators 154
Link Functions 155
Link Operators 155
Making Links 155
Macros 156
Macro Operator 156
eval() and action() 156
Shell Expressions 156
Shell Operator 156
Template actions 157
Restoring the default value 158
7 of 178
Tinderbox v5 Manual
8 of 178
Tinderbox v5 Manual
9 of 178
Tinderbox v5 Manual
10 of 178
Tinderbox v5 Manual
Tinderbox 5 is a universal binary, based on a new compiler, new libraries, and new development
tools. In addition, numerous under-the-hood improvements make Tinderbox 5 faster than ever.
New text engine supports highlighting, strikethrough, super- and subscripts, and indented
paragraphs.
Outlines can have checkboxes and columns
Unicode note names and note text
Inspectors let you change the properties of notes more easily
New note shapes, borders, and translucent notes in maps
In-place Editing in maps
Stationery and oft-used files can be kept indefinitely in the Open Recent menu
URL attributes
Copy items in an outline and paste the outline in any program that accepts text
Improved Chart views
v5.0.2:
Maps - highlighting/animation of currently selected notes' links
v5.1.0:
UTF-8 for export means less character encoding when using HTML, XML, etc.
Improved agent & alias performance
v5.5.0:
Simplenote synch support
Maps - shaped adornments, new shape
Title strikethrough
Colored outline item backgrounds & selections
OPML export improvements
Map - option to let agent contents be moved manually
Features for embedding and exporting images are temporarily suspended (see details for
relaxations in v5.6.0 & v5.9.0).
For a complete run-down on everything new in Tinderbox, see the Release Notes in the
Tinderbox Help Menu.
11 of 178
Tinderbox v5 Manual
Tinderbox Basics
NOTES
Tinderbox is a personal content assistant, a tool for making, analyzing, and sharing notes.
Notes are the basic units of writing and information in Tinderbox. Each note has:
Notes live in Tinderbox documents. You must create a document before you create notes. You can
create many Tinderbox documents, and individual Tinderbox documents can comfortably contain
thousands of notes.
You can open several different Tinderbox documents at the same time.
HIERARCHY
Notes can contain other notes. This allows you to arrange notes in a hierarchy.
A note that contains other notes is called a container. You could create chapters containing sections
containing divisions; or topics containing subtopics; or any other hierarchy that fits your work.
You don’t need to create a hierarchy in your Tinderbox document; you can leave all the notes at the
same level.
LINKS
A link is a connection between one note and another. Links allow you to make connections between
ideas, and to quickly move between linked notes. A link can lead from a note as a whole, or from
selected text within a note (like linked text on the Web).
You can also create a link to a URL—an external document on the Internet. Following the link will
open that location in your Web browser.
12 of 178
Tinderbox v5 Manual
Notes
Notes are the basic units of writing and information in Tinderbox.
There's no fixed limit to the number of notes Tinderbox can handle. You can easily manage
thousands, even tens of thousands of notes in Tinderbox.
Each note has:
A note can hold many pages of text, but it's usually best to keep notes short. This makes it easy to
find exactly what you're looking for, and helps agents find specifically what they're seeking.
Almost every aspect of a note—its shape, position, color is associated with an attribute. Tinderbox
makes it easy to add new attributes, and to move information from your notes in attributes. You can
search and sort for any attribute. Tinderbox documents can often be instructed to set attributes
automatically and intelligently.
You don’t need to define your attributes in advance; Tinderbox is designed to let your notes evolve
and adapt as your understanding changes and deepens.
Much more will be said about working with attributes in the chapter on Attributes.
To create a note
Remember that you must create or open a document before you create a note. (Choose New from
the File menu, or press ⌘-N)
or
right-click in the window, then choose Create Note from the contextual menu
double-click
13 of 178
Tinderbox v5 Manual
If In-Place Editing is turned on (in the Maps pane of the Preference window), you enter the note
name directly in the view window. Otherwise, Tinderbox displays a dialog where you can enter the
note’s name and adjust other properties.
To write in a note
This will open a text window for that note. The procedure is the same for editing existing note text.
There is no dialog; just close the window when you want to.
(Whenever you create a new note, you can have a text window automatically open for that note. You
can turn this on in the General pane of Document Preferences... in the Edit menu (⌘8).)
To delete a note
A note’s children are the notes it contains— the notes that are subsidiaries of it in the hierarchy.
To rename a note
In map, chart, or outline views, simply click on a note name and hold the mouse down briefly to edit
the name. Or,
then
14 of 178
Tinderbox v5 Manual
In a text window,
The "Rename" dialog offers other options for the note, such as color, attribute, actions, and rules.
These features will be explained in more detail later.
The sidebar
Each text window has, by default, a sidebar containing menus for popular Tinderbox functions such
as attributes, links, scripts, and prototypes. (These will be discussed later).
To hide the sidebar, choose Hide sidebar from the Views file menu, or use ⌘⌃T. To show it again,
choose Show sidebar or press ⌘⌃T again.
The “gear” menu at the lower left-hand corner of the text window will show or hide the sidebar. The
sidebar is automatically hidden in very narrow text windows.
Type the text you're looking for and, as soon as you've typed the first three or four characters,
Tinderbox will find the matching notes in the open document. Double-click a note name to open its
text window with your search term highlighted.
The find dialog searches for regular expressions — text patterns with wild cards — as well as
performing simple searches. See the Appendix 2: Regular Expressions for details.
15 of 178
Tinderbox v5 Manual
Common words
The Common Words window displays a "cloud" of the 100 most common words found in a note, a
section (a note and its descendants), or the entire document. More common words appear larger.
Click on any word to search for the word in a note's text and title.
For note and section, each distinct occurrence of a word is counted. For the document level view,
Tinderbox counts the number of notes that contain a word one or more times. Words of four
characters and fewer are ignored, as are very common English words.
To extend the list of common words for a document
Listing notes
All notes in the document will be listed, with each one represented by a tiny icon of the note at the
left, which will be colored as for note's $Color attribute. Click a note and click Open to open that
note's text window.
Similarity is based on word usage such as the note's text, title, and text contained in user attributes.
In addition, notes having the same prototype are more similar than notes that have different
prototypes, and notes having roughly similar amounts of text are more similar than notes that have
very different amounts of text.
Files
Each note can be easily associated with a file — an image, a movie, a podcast, an Automator action,
a Tinderbox document, a folder, or even an application — through the note’s File attribute. This lets
you keep the Tinderbox document small and fast, while providing ready access to outside data when
you need it.
You can define additional File attributes as user attributes if needed. But most Tinderbox notes
16 of 178
Tinderbox v5 Manual
should only need to refer to a single file; if you want to have multiple File attributes, your note may
really comprise several different notes.
The file association will be stored in the note's File attribute, and may be launched from a menu on
the File button.
To remove a file from a note
Files are stored as absolute paths; renaming or moving the file may make it inaccessible from the
Tinderbox note.
Scripts
Tinderbox allows you to execute Applescripts from within a note. Tinderbox will run the script, which
should be saved in uncompiled form (i.e. saved as 'text' , as a '.applescript' file), automatically
whenever the text window for the note is opened, or whenever the note's script button is pressed.
The script will now run automatically whenever the note is opened unless you turn off automatic
running of scripts.
To turn off automatic running of scripts
choose Document Preferences (for this document only) or Tinderbox Preferences (global) from
the Edit menu
in the General tab, uncheck the Run Scripts Automatically box and click OK
History
17 of 178
Tinderbox v5 Manual
The history list is a list of every note you have selected in the current Tinderbox session.
double-click its name in the history list, or select its name and press the space bar. Its text
window will open.
click Clear
To clear only recent notes in the history list, select a note in the list and click Rewind. All the note
names after the note you selected will be cleared.
18 of 178
Tinderbox v5 Manual
Writing in Notes
The text window for any note is simply a window where you read and write the note's text and
images.
To open a text window
In any view window or list of notes,
To type in a note
To put the time or date in a note, choose Insert Date from the Edit file menu.
To put an image into a note
copy the desired image from your graphics application or from the Scrapbook (see notes on
temporary suspension of this feature)
paste the image into a text window, wherever in the text it should appear (see notes on
temporary suspension of this feature).
Note that you can’t drag the image directly; you need to select the portion you wish to move to
Tinderbox, copy, and paste.
To copy an image of the current view window,
select Copy view picture from the Edit menu (see notes on temporary suspension of this
feature)
This feature copies the entire view image, not just the visible part.
Text Appearance
The Style menu and the Fonts palette (⌘T) give you control over the appearance of your text,
including size, color, and alignment. Additional formatting options are available in the Text pane of
the Inspector palette (⌘1).
If you are Import text from other programs, the text may include hard line breaks. The Edit menu
command Remove Line Breaks removes unwanted line breaks from the selected text.
Spelling
From the Edit menu’s Spelling submenu, choose Check Spelling to highlight errors in the current
note.
Check Spelling As You Type will highlight spelling errors after every keystroke.
If a word indicated as misspelled really isn't, click it, then select Ignore Word or Learn Word.
19 of 178
Tinderbox v5 Manual
Attributes
In addition to its title and text, each Tinderbox note has a long list of attributes that describe aspects
of the note: its name, color, position, shape, and size. You can define your own attributes as well.
Attributes let you (and Tinderbox) put meaningful information in a known place.
For an informal note, you might simply write information in the note’s text:
Read Gibbon’s Decline and Fall of the Roman Empire
In other contexts — research notes for a dissertation, say — you
might prefer to be a bit more formal:
Author: Edward Gibbon
Title: The Decline and Fall of the Roman Empire
Author and Title are examples of attributes; by putting the name of the author in a specific place, it is
easy for us (and for our Tinderbox agents) to distinguish a book by Gibbon from a book that is about
Gibbon.
You don’t have to define Tinderbox attributes before you begin making and using notes. Tinderbox is
designed to encourage experimentation and evolutionary change in your work. As your needs
change and your understanding grows, you can add, change, and delete attributes whenever you
like.
Each attribute has a value; values can be numbers, character strings, boolean (true/false) values,
dates, colors, files, and so forth. Whenever you rename, edit, or change a note in Tinderbox, you are
actually changing the value of one or more attributes of that note.
There are two types of attributes:
System attributes: information built into all Tinderbox documents such as the color of the note,
or its width and height. Tinderbox keeps this information about every note, and you may view,
use, and change it.
User attributes: you may add your own attributes that every note will have. For instance, you
could add the attribute "Priority," and assign every note a priority level from one to five. Or in a
bibliography, create the attribute "Type" and tag the note for each source as either "primary" or
"secondary."
Read-only attributes: information such as the date and time the note was created, or the date
and time it was last modified. Other read-only attributes, such as TextLength and ChildCount,
describe properties derived from the document’s current state and are inherently read-only.
Tinderbox keeps this information about every note, and you may view and use it, but you
cannot change it.
Tip: attribute names are case sensitive—"Height" is not the same as "height."
You can inspect and change the value of any attribute in a note's Get Info... window (choose Get Info
from the Note menu). Inherited values are in gray; values set specifically for this note are in black,
and read-only values are italicized.
Key Attributes
20 of 178
Tinderbox v5 Manual
Tinderbox keeps track of hundreds of attributes for each note, but only few attributes are likely to be
of chief interest to you. If you are making notes about some books, for example, key attributes might
include author, title, and ISBN number.
A note's key attributes are displayed at the top of its text window. You can choose the key attributes
by setting the value of the attribute named KeyAttributes — just enter the names of the
attributes you'd like to make key attributes, separating them with semi-colons.
select the key attribute from the Key Attributes menu in the text window sidebar
OR
drag the key attribute from the Attributes palette and drop it into the text window
OR
select the note and press Enter to view the note’s Rename dialog. Choose key attributes
from the Key Attributes popup menu, and press OK.
Drag key attributes to up or down to rearrange them, or drag them out of the key attributes table into
the text area of the note to remove them.
Attribute data types are discussed in more detail further below, but it is worth noting how attribute
data types are displayed or edited slightly differently when a key attribute:
Action, File and String data types appear as a simple edit box
Boolean data type displays as a tick-box (ticked = true).
Color data types has a color chip to the left of the edit box, which displays the color currently
set. The value in the box may be a named Tinderbox color or hexadecimal color value.
Date type attributes are show as the day, month and year plus hours and minutes, formatted
according to the user's OS' System Preference for the 'short' data format. If a date is entered
manually and the time is omitted, the current system time is appended. Seconds are not used.
Number data types are displayed as exponential numbers if very large or very small (0.000001
as 1e-06). If there are large numbers of decimal places, these may be truncated in the display
(though not the underlying data).
List and Set data types are shown as a single string with semicolons delimiting individual
values.
URL data type shows a globe icon before to the text edit box. If the icon is clicked, the currently
displayed URL is opened in the user's default web browser.
For String, List and Set data types, a disclosure triangle at the right end of the attribute edit box
21 of 178
Tinderbox v5 Manual
opens a pop-up list which shows all discrete values for that attribute in the current document; for list
and sets the listing is of all discrete list values across the document. As value lists may grow long,
they are limited to 99 values. For such attributes no pop-up list control if shown - so the absence of a
disclosure triangle indicates many values. Listings are case sensitive ('dog' and 'Dog' will be
separate entries).
Clicking a list item sets a String attribute to that value or with Lists and Sets it is appended to existing
values.
Where value lists are offered, autocompletion is available. As the user types a value it is completed
with the nearest possible case sensitive match. Up and Down keys can be used whilst editing to
scroll other possible list values for the stored value list.
Using the quick stamp palette allows you to change the value of that attribute for one selected
note or for many selected notes.
In the Info window for a note shows all the note’s attributes and allows you to change the value
of any attribute.
The Value menu contains Stamps that allow you to change the value of that attribute for
selected notes.
22 of 178
Tinderbox v5 Manual
The Quickstamp inspector lets you change any attribute for the currently-selected note(s).
From anywhere,
select the desired attribute from the popup menus in the palette
type the desired value into the Value text field
click Apply to apply that value to that attribute in the selected note or notes
or
double-click the desired attribute in the right-hand column of the list. (The left-hand column
shows the attributes, the right-hand column shows their values.)
in the dialog box, enter a new value for the attribute
Some attributes are read-only and cannot be set. For example, the value of a note’s $WordCount
depends on the number of words in its text. Read-only attributes are italicized in the list.
The default value of an attribute is the value Tinderbox uses if no specific value has been set for that
note.
The Attributes window lets you change the default value of attributes. If you set the default value of
Color to red, then all newly-created notes will be red, and all notes for which no specific color was
chosen will also become red.
23 of 178
Tinderbox v5 Manual
To open the Attributes palette, choose Attributes from the Window menu (⌘-2).
In the attribute palette,
select the tab of the palette corresponding to the type of attribute you want to modify built
in to Tinderbox
select the desired attribute in the scrolling list of attributes
type the desired default value in the text field on the palette
click Change
Then,
in the dialog box, choose a name, a type, and a default value for the new attribute
click OK or press Return to dismiss the dialog
All notes will have this new attribute and will use the default value for the new attribute until you set it
in particular notes.
Attribute types
Attributes can be of various types, to contain various kinds of data:
String
Any sequence of text. "Yes," "Marie Hancock-Lowickie, Jr.," and the first paragraph of the Gettysburg
Address would all be valid values for a String attribute. $Name is an example of a string attribute.
color
24 of 178
Tinderbox v5 Manual
named colors. The name (string) of a color that either comes pre-defined in Tinderbox, or which
you have defined for this Tinderbox document using the Colors pane of the attribute palette.
Names set as text strings are stored as strings. Examples: "blue", "red", "minty-fresh-green",
"subtle yellow".
hexadecimal: six hexadecimal digits, the format used for describing colors in HTML. A
hexadecimal value should be preceded by a number/hash sign sign. Example: #A482BF
hue-saturation-value: hue—a value from 0 to 360 degrees; saturation and value—from 0 to 100
percent. Preceded by HSV, and enclosed in parentheses. Examples: HSV(0,100,50),
HSV(240,80,80). HSV values are stored in the six-digit hexadecimal form (as above).
RGB: Red, green, and blue, with intensity levels represented as integers from 0 to 250.
Examples: rgb(0,0,0) and rgb(68,153,68). RGB values are stored in the six-digit hexadecimal
form (as above).
$BorderColor, which controls the color of a note's main border, is an example of a Color attribute.
You may drag color swatches out of the Colors pane of the Attributes palette, and drop them on
notes in the map, outline or treemap views.
When displayed as a key attribute, Color type attributes show a color swatch next to the text value.
The swatch shows the current color value and if clicked, can be used to set a new color using any of
the OS' color picker panes.
In many respects, Color-type attributes can be considered a special form of String-type attribute
File
The pathname to a file. File-type attributes are used mainly or such System attributes as
$HTMLExportTemplate.
Boolean
A true/false value. May use either 1/0 or true/false. $ShowTitle is an example of a Boolean
attribute. If setting the value via action code, the value is never quoted (as a string would be). The
true/false values are also case-sensitive - i.e. do not use True or False.
When displayed as a key attribute, Boolean type attributes show a tick box; ticked equates to true,
un-ticked to false.
Date
A date and time. When entering a value for a date, you may use your local Macintosh date formats
and a variety of other standard forms. You can also use the terms yesterday, today, and tomorrow,
and add or subtract units of time. Time (in hours/minutes only) is always part of Date data even if not
displayed. For example, these are all acceptable values for a date attribute (on a month/day ordered
Mac):
25 of 178
Tinderbox v5 Manual
10/25/2002
10/25/02
10/25 (assumes the current year)
November 15, 1955
Nov 15 55
today
today - 7 days
yesterday + 4 months (expressing date values relative to the current time is often convenient
when defining agents and actions.)
Wednesday (interpreted as next Wednesday)
11/25/2002 12:43
On non-US Macs, the day/month order might vary as might the allowed delimiters for
day/month/year/time. Tinderbox defers to the current users "international" System Preferences for
allowable formats. Internally, the data is stored in a locale-independent format so a date set on a US-
locale Mac will still be correct is the document is subsequently opened on a French-locale Mac.
If sharing files cross-locale do be aware of where dates represented in code as string literals which
thus fix a locale type. In such cases it is better to store that date in a Date type attribute in a note
somewhere and refer to the attribute, ensuring the date is locale independent.
$Created is an example of a Date type attribute.
Number
List
Lists are strings separated by semicolons, and are useful for lists of topics, categories, and tags.
Status: urgent;delegatedToMartha
Topics: programming;computer languages;courses;news
Tags: tips and techniques; readme; TuesdayMeeting
Lists can be assigned with Stamps, Quickstamp, the Get Info Window, or the Key Attributes table.
They may also be set by agents and other actions.
Lists can be sorted.
In many respects, List-type attributes can be considered a special form of String-type attribute (a
string with semicolon delimited values), meaning that Lists can be coerced to/from Strings.
TimeLineBandLabels is an example of a list attribute.
Set
26 of 178
Tinderbox v5 Manual
Although Set pre-dates List as a Tinderbox attribute data type, Sets are best though of as a special
form of List. The primary difference is that Sets only hold one instance of any given unique list value;
passing a List with duplicate values to a Set will de-dupe it; it can always then be returned back to a
List type so it is a list but now lacking dupes.
A Set, unlike a List, can't be sorted.
In many respects, Set-type attributes can be considered a special form of String-type attribute (a
string with semicolon delimited values), meaning that Sets can be coerced to/from Strings.
$KeyAttributes is an example of a Set attribute.
URL
The Action data type is only used internally. $AgentAction, $DisplayExpression, $OnAdd, $Rule and
$TableExpression are all Action type attributes. As may be guessed, these attribute all hold strings of
Tinderbox action code and are evaluated as such when used.
In many respects, Action-type attributes can be considered a special form of String-type attribute.
Exporting Attributes
The value of any attribute can be exported to HTML using the expression ^value($attribute_name)^.
For example, if we have stored the location of an image in user attribute ImageName, we might
export:
<img src="^value($ImageName)^">
Colors
Tinderbox uses color names to refer to specific colors. In the Colors panel, you can change the color
scheme and add their own. For example, if you prefer a subtler color scheme, you might redefine
"black" to a medium gray, "blue" to a slate blue, and red to a rusty earth tone.
27 of 178
Tinderbox v5 Manual
Stamps
Stamps are actions that set attributes. Like a rubber stamp, a Stamp changes the selected note or
notes to which you apply it, providing you a custom tool kit for your needs. See the Stamps chapter of
this manual for details.
Link Types
Links Types presents a list of the types of links possible between notes. Users may change the name
and color of links here, make individual link types (or just their link labels) invisible in map views, or
create their own link types.
Macros
Macros bundle complex export expressions into simpler, more memorable packages. See the Using
Macros section of the HTML Templates chapter for more.
28 of 178
Tinderbox v5 Manual
Prototypes
Often, the easiest way to describe a note is to explain how it differs from another note. We say that
the first note serves as the prototype of the second: it shares all the properties of the prototype,
except where we specify otherwise. For example, Oliver Twist might be prototype for Great
Expectations: Great Expectations inherits all the properties of its prototype, save for Title and
PublicationDate which we specify explicitly.
Prototypes let you specify the default value for an entire class of notes. Whenever Tinderbox checks
an attribute that you haven't specifically set, it will use the value from the prototype. Change an
attribute in a prototype and you change it for the notes that use that prototype.
A few attributes are inherent and are never inherited. For example, moving Oliver Twist
in the map should not move Great Expectations. Inherent attributes include: Created,
Modified, Height, Width, XPos, and YPos.
Prototypes are an advanced feature—you may not need to use them—but they're powerful time-
savers for complex projects.
To create a prototype,
create a new note, however is convenient, or select and existing note to serve as a
prototype
in the dialog box to name the note, check the box can be a prototype
To use a prototype,
or
select the note in the map view. A tab appears beneath the note showing the note's
prototype, if any. Right-click the prototype tab to select a new prototype from the popup
menu
or
select the note in the outline view, and right-click on the rectangular note icon to select a
new prototype from the popup menu.
Your note will now use the selected prototype: it will inherit the values for most of its attributes from
the prototype note. When you change the value of any of those attributes in the prototype, the value
of that attribute in all of the notes that use that prototype will change as well.
29 of 178
Tinderbox v5 Manual
Prototype Inheritance
Tinderbox notes inherit from their prototype; when you give a note a prototype, you’re telling
Tinderbox, "this note is just like its prototype, except for the differences I tell you about."
Whenever Tinderbox looks up the value of an attribute, it reviews the following checklist:
If the note has a value for that attribute, that’s the value.
Otherwise,
If the note has a prototype, and if the prototype has a value, then we inherit the prototype’s
value.
Otherwise,
Otherwise,
A note’s own values always override inheritance. Suppose that note Prototypical Task is gray. We
create a new note called Today's Meeting that inherits from Prototypical Task. Initially, Today's
Meeting inherits everything from its prototype, so it’s gray, too. But if we set the Color of Today's
Meeting to blue, it turns blue. Meanwhile all other tasks remain gray.
Now, we make yet another note, Conference Call, which also inherits from Prototypical Task. It, too, is
gray, because Prototypical Task is gray.
But perhaps we’d like all tasks to be green; we change the Color of Prototypical Task to green. Now,
Conference Call turns green, because it inherits its Color from the prototype. Today's Meeting
remains blue, because you gave it a specific color; a note’s own values always take precedence over
inheritance.
30 of 178
Tinderbox v5 Manual
Equivalently, set the note’s attribute IsPrototype to true. This adds the prototype to Tinderbox’s
prototype menus.
31 of 178
Tinderbox v5 Manual
Built-in Prototypes
Tinderbox offers a small number of specimen prototypes built into the application that can be added
to any Tinderbox document.
If Tinderbox detects an existing 'Prototypes' note (case-sensitive), the newly added prototypes note
is added to that container. Otherwise a new 'Prototypes' container is created at root level in the
current document.
32 of 178
Tinderbox v5 Manual
The Toolbar
To show or hide the Toolbar, choose Show Toolbar or Hide Toolbar from the Window menu, or press
⌘⇧T.
Top Row
1. Switch to the Marquee cursor—use this to select multiple notes in view windows. Cursor is the
arrow when over a note.
2. Create a Web link from the selected text in a text window
Bottom Row
1. Switch the the Hand cursor to scroll views
2. Create a link from the selected note. Click on the destination to complete the link, or park the link
temporarily in a parking space.
Right side
1. Parking spaces—click one of these, after starting a link, to hold the link temporarily. You can then
adjust views to bring the destination into view; click the parking space to pick up the link once again.
Several parking spaces are provided which allow concurrent parking of up to 3 discrete links.
33 of 178
Tinderbox v5 Manual
Importing Notes
Tinderbox provides many options for importing text from various sources.
To move moderate amounts of text between Tinderbox and another application, it may be easiest to
copy and paste the text. This approach has the added benefit of giving you a chance to review your
notes: arrange them, color-code them, consolidate related notes, and prune out notes that are out-of-
date or irrelevant.
Spreadsheets
Selecting a table in a spreadsheet and pasting it into Tinderbox will create a useful set of notes.
34 of 178
Tinderbox v5 Manual
The first row is treated as a set of headings, which map to attributes. New user attributes will be
created for attributes that do not already exist.
A new container will be created to for the table's rows.
Each row of the table becomes a note. The table's fields are key attributes, and these attributes
are populated from the table
Explode
You can convert a large text file into several notes by specifying where Tinderbox should make the
divisions.
The new notes will appear as children of the original note, in a new container called Exploded Text.
Delimiters you can use to separate the source content include:
Explode can also optionally delete the delimiter character(s), making it easier to use custom string
that would look odd if left in the output.
It is also possible to control what part of the exploded text is used as a new note's title. Options are:
first sentence
first two sentences
first paragraph
remove title from text. This is useful for making title-only notes via explode.
Whatever the option above, note titles are limited to 512 characters and truncated with an ellipisis if
longer.
Email
The user may email data directly to a Tinderbox document. (This feature has particular interest for
iPhone users, who can easily email snippets to key Tinderbox files)
A Tinderbox file may be connected to its own POP3 mailbox, which it will check when opened (and
again when the Fetch Now button of the Network Status pane is pressed). The mailbox should be
35 of 178
Tinderbox v5 Manual
dedicated to this Tinderbox document, as it deletes messages after Tinderbox reads them.
A new Mail Preferences Pane in Document Preferences allows you to turn the current TBX
document's mail checking on or off (default is off), and to specify:
Tinderbox creates a new container /Mail (i.e. at root level in the TBX), and adds new notes for each
message in the mailbox. The notes are then deleted from the server (this is a natural by-product of
using a POP3 server to draw down mail).
The $Email attributes of email notes contain the 'From' address of the email.
You may drag notes from /Mail and place them anywhere in your Tinderbox document - they are now
Tinderbox valid notes.
Limitations:
only plain text email is currently supported but email that contains encoded non-English
characters (RFC 2047) are decoded.
attachments and MIME/HTML email bodies may be ignored.
proxy servers and alternate ports are not currently supported.
You may choose to include an action, in your inbound email, that will set the new (emailed) note's
$Container attribute on arrival. Thus, when Tinderbox receives an email it scans the subject and the
message body for instructions of the form:
Tinderbox: /path-to-(or)-inbox-container
...or...
Tinderbox: /path-to-(or)-inbox container [action code]
The first argument (a path) specifies a container in which the mail is to be stored If the container does
not exist, it will be created. The argument is a TB path string so can be anywhere within the TBX, as
long as correctly specified, and not just as sub-containers of the default 'mail' container. If a TBX's
note names are not unique it will be necessary to cite as much of the path to the target container as
is necessary to give a unique path.
Tinderbox: /longer/unique/path/to/inbox
The optional second argument (action code), specifies an action that will be applied to the newly-
created note.
An example, using both arguments:
Tinderbox: /UrgentMail [$Color="red";]
will save the note in "UrgentMail" instead of "Mail", and will also set its $Color to Tinderbox defined
color "red". Note that in this case the use of the [ ] brackets is explicit, and isn't simply an editorial
device to indicate the argument is optional. Put another way, you must use square brackets around
the second argument otherwise Tinderbox can't parse out the action code and apply it as intended.
36 of 178
Tinderbox v5 Manual
Views
You may keep many view windows open while working in Tinderbox. Often, keeping several view
windows open can be very helpful. A chart window might, for instance, show you the entire structure
of your work, while a map window lets you work with the details of one section. Or, if you are creating
many links between two parts of your document, you could have a view window open on each area.
To open a new view window choose New ... view from the View menu; or use a keyboard shortcut:
⌘⌥M — new map window
⌘⌥C — new chart window
⌘⌥O — new outline window
⌘⌥T — new treemap window
⌘⌥N — new Nakakoji text export window
⌘⌥H — new HTML view window
⌘⌥E — new explorer window
Moving around
Use the hand cursor to move the view in a window. If the marquee tool is active, hold the option key
(⌥) to switch temporarily to the hand tool.
Use the horizontal and vertical scroll bars to move around in a view window.
To scroll directly to a specific note, simply type the first characters of the note’s name.
37 of 178
Tinderbox v5 Manual
Map views
The Tinderbox map view shows all the notes inside a container. You can arrange notes and
containers as you like, perhaps placing related notes close together.
Map views provide great scope for expressing tentative, preliminary, or provisional relationships
among your notes, and for discovering emergent structure. Tinderbox provides a host of visual
dimensions — shape, color, borders, badges, and many more — that you can use to express the
properties of notes.
To place a note inside another note or inside a container, simply drop it inside another note.
OR
OR
right-click where to want to place the note and choose Create Note… from the menu
OR
OR
click and hold the note for a moment, and edit the note’s name in the map. (Assumes edit-
in-place option is enabled.)
38 of 178
Tinderbox v5 Manual
Links
A map view shows the links between notes.
If both the source and destination of the link are in the map, the link is drawn as a line between the
boxes. If the source or the destination of the link are outside the map, the link is drawn as a short
arrow departing from or arriving at a note.
In this map, Cicero is linked to Brutus, Antony, and Caesar. Because Caesar is inside the container
"In Gaul", only the start of the link to Caesar appears in the map.
If the Maps Preference "Allow Enactment" is ticked, if one or more notes are selected, the map's
adornments, notes and links are all dimmed except for outbound links from the selected notes and
the targets of those links. The highlighted links' style is changed to a animated dashed line whose
also animation indicates the the direction of the link by cycling towards the link target.
Adornments
Adornments are labels that you can add to the background of a map view to help organize the map.
You can adjust the size, placement, color, and text color of an adornment, and a map view can have
many adornments, or none. Adornments do not show up in any other views. Adornments can serve to
39 of 178
Tinderbox v5 Manual
label neighborhoods in a map view, but they do not affect the hierarchy or the links of any notes.
To create an adornment
OR
Image Adornments
You can use adornment to place images in the background of the Tinderbox map.
OR
drag an image file into the Tinderbox map while holding the ⌘ key.
Locking Adornments
It it often convenient to lock the position of large adornments. The attribute Lock fixes an
adornment's (or note's) position in the map, preventing it from being inadvertently moved. The
attribute works as a toggle for locking.
OR
press Enter (⌅) or Function-Return (fn↩) to rename the selected adornment, and click the
checkbox, Locked.
If an adornment is sticky, objects (including other adornments, notes, agents, and containers) lying
on the adornment will stick to the adornment when the adornment is moved. This makes it much
40 of 178
Tinderbox v5 Manual
easier to work with large, complex maps by moving whole sections of notes together. The attribute
works as a toggle for the sticky state.
To toggle 'sticky'
OR
press Enter (⌅) or Function-Return (fn↩) to rename the adornment, and select the
checkbox, Sticky.
press Delete
Smart Adornments
Tinderbox "smart adornments" have a query, just like agents.
The smart adornment searches within its map—that is, amongst its siblings in the document outline
—for notes that match its query. Matching notes will be moved to the smart adornment, and notes
that do not match the query will be moved off the adornment. (Locked notes and adornments are
never repositioned by a smart adornment.)
Smart Adornments are handy for automatically organizing containers to which you are frequently
adding notes—especially if these notes are added automatically. When you add notes yourself, you
naturally place them appropriately, but when notes are being moved around your Tinderbox
document by agents or inserted from email, smart adornments can help keep things organized.
Cleanup
The Cleanup popup menu, at the bottom of a map window, gives you ways to rearrange all the notes
in the map. You can arrange the notes in a grid, a staggered grid, a row, a column, or a box.
If you select specific notes in the map, Cleanup only moves the selected notes. If only one or no note
is selected the cleanup is applied the whole map.
Like Smart Adornments, automatic cleanup can help organize clutter.
The Up-Arrow
If you press the up-arrow button, in the bottom-left corner of a map view window the view will zoom
out to show a view of one level up in the hierarchy. This will be an entirely different view than the one
you were just seeing: the whole map will be contained within one of the notes shown in the new view.
If the view is already zoomed all the way out—showing the entire document—then the up-arrow will
be inactive.
41 of 178
Tinderbox v5 Manual
right-click the note, and choose a color from the Color menu
OR
OR
OR
right-click the note and choose a shape from the Shape submenu
Three additional patterns are available only to agents and containers to provide information about
42 of 178
Tinderbox v5 Manual
their contents.
plot(expression[,min,max]): The expression is evaluated in turn for each child of the agent or
container, and a graph of the result is drawn in the body of the agent or container. The graph
color is determined by the attribute PlotColor. If min and max are not specified, the plot is
automatically scaled to the range of the data.
bargraph(expression[,min,max]): The expression is evaluated in turn for each child of the agent
or container, and a bar graph of the result is drawn in the body of the agent or container. The
graph color is determined by the attribute PlotColor. If min and max are not specified, the plot is
automatically scaled to the range of the data.
xyplot(x-expression, y-expression [,ymin,ymax]): The expressions x-expression and y-
expression are evaluated in turn for each child of the agent and container, and a Cartesian
graph of the result is drawn in the body of the agent or container. The graph color is determined
by the attribute PlotColor. If ymin and ymax are not specified, the plot is automatically scaled to
the range of the data
To add a border
the Border Inspector pane is the most convenient way to adjust a note’s border. You may
also use submenus of the Note menu and of the note’s contextual menu to change border
color and styles.
Select a note
In a map view, right-click in the note’s upper right-hand corner
or
In an outline view, right-click in the space to the left of the note title
Choose a badge from the popup menu
Custom badges
A selection of nearly fifty badges is included with Tinderbox, but you can easily add your own badges
or replace built-in badges with new images. User badges may be stored as standard Macintosh .icns
files in:
~/Library/Application Support/Tinderbox/badges/
From v5.5.0, the format for badges has changed from ICNS to PNG, making it easier for users to
create custom badges; pre-existing ICNS will need to be re-saved in PNG format.
43 of 178
Tinderbox v5 Manual
Picture Adornments
Pictures may be inserted into the background of a map view as picture adornments. Like text
adornments, picture adornments don't show up in any other views, and don't affect the hierarchy or
the links of any notes. Locked picture adornments are ignored from drag-selections of notes.
For an image to be available to insert as a picture adornment, the file's contents must be copied to
the clipboard. Thus first open the file in Preview (or an image editor), 'select all', 'copy'; the content is
now on the clipboard ready for pasting and image may be closed. Picture adornments can only be
inserted via the Map view pop-up menu. (a Cmd+V paste will not work).
A simpler alternative is to Cmd+drag a suitable image from a Finder window and drop it onto a Map
view.
Images are inserted and displayed at 'actual size' (i.e. for current desktop resolution - normally 72
dpi). Resizing the picture's 'frame' won't zoom the image size but it will crop it if smaller than the
image. If a shape is set for the adornment, the image is cropped by the shape's boundaries. The
image does scale if the whole map is zoomed in or out.
Note that image format must be a bitmap image, not vector-based (i.e. CAD or EPS). The $Opacity
attribute is also supported for image attributes. The image files may have the extensions (formats)
.gif, .jpg, .jpeg, or .png.
Just as adornments aren't exported in HTML Export, neither are picture adornments.
44 of 178
Tinderbox v5 Manual
The text is always drawn in the default text font. A suitable size is normally chosen automatically, but
may be overridden by setting the attribute MapBodyTextSize.
If $MapBodyTextSize is 0, Tinderbox chooses a suitable font size.
If $BodyBodyTextSize is 1, no body text is drawn.
Otherwise, $MapBodyTextSize is the font size, in points, for drawing the note's body text.
Subtitle
The value of the attribute $Subtitle is displayed in map view beneath the note’s title, if sufficient
space is available.
The appearance of the subtitle is controlled by the attributes SubtitleColor, SubtitleSize, and
SubtitleOpacity. The built-in template Dashboard provides an example for using subtitles.
The subtitle is most easily added or changed in the Name panbel of the Inspector (⌘-1).
Display Expression
In maps and other views, Tinderbox typically displays the note’s Name attribute to identify each note.
Sometimes, you might want to display additional information: how much text the note contains, who
is responsible for a project, or when a task is due.
The attribute DisplayExpression lets you change the note’s label without changing the value of
its Name.
The DisplayExpression attribute is simply an expression in action code, just as used in Tinderbox
rules, container actions, and agent actions. If DisplayExpression is empty, Tinderbox displays the
note’s name; otherwise, Tinderbox evaluates the expression and displays the result.
For example:
$Name+" ("+$WordCount+" words)"
--> Chapter 3 (7500 words)
$Name+":"+format($DueDate,"l")
--> Return books to library: 12/30/2008
For more information on actions and expressions, see Appendix 3: Actions, Expressions, and Rules .
Hover Expression
You may display additional information about a note when the mouse hovers over the note.
The attribute HoverExpression lets you specify the information that will be shown while hovering.
A note may have its own HoverExpression, but often will inherit HoverExpression from a prototype.
The HoverExpression attribute is simply an expression in action code, just as used in Tinderbox rules,
container actions, and agent actions. If HoverExpression is empty, hovering over that note has no
effect.
For example:
$WordCount+" words"
--> 7500 words)
would display the current word count of the note, and
$WordCount+" words\n\n"+$Text
45 of 178
Tinderbox v5 Manual
would display the word count followed by an empty line, and then display the first lines of the note’s
text.
For more information on actions and expressions, see Appendix 3: Actions, Expressions, and Rules .
Containers
In map view, containers display a miniature view of their contents, including many of the icon
customizations except displaying body text..
Containers are always drawn with a distinctive shape with the title bar at the top and rounded
corners at the bottom. (Compare agents, which have rounded top corners and a title at the bottom).
The relative scale of the interior of a container is set by the attribute InteriorScale.
You can drag notes into the body of a container, or drag them out of the container to move them into
the current map.
Click and drag the interior background of a selected container to scroll the notes inside the
container.
Normally, container titles are a single line, drawn at the top of the container. If you wish to expand the
size of the title bar, simply drag its lower edge (for containers) or upper edge (for agents).
In this container, the title bar has been enlarged to permit Tinderbox to display a second line of the
title.
46 of 178
Tinderbox v5 Manual
Summary Tables
Containers and agents may display a summary table if their title bar is tall enough to accommodate
it.
The contents of the summary table are determined by the attribute TableExpression, which should
evaluate to a string using the vertical bar character "|” to separate columns. For example:
$Name+"|"+$AssignedTo
would display the name and the word count for each note.
The table heading is taken from the attribute TableHeading; for example:
TASK|ASSIGNED TO
Tinderbox displays one line for each child of the agent or container, until it runs out of space or lists
each child.
If the TableExpression for a child note evaluates to the empty string "", that row of the table is
skipped.
If the TableExpression for a child note evaluates to the string "-", a single hyphen, that row of the
table is replaced by a horizontal rule.
47 of 178
Tinderbox v5 Manual
Outline views
Outline Views
An outline view shows the hierarchical structure of the document as an indented outline. It is easy to
restructure the hierarchy of the document in an outline window, by dragging parts of the hierarchy to
other parts of the hierarchy.
The outline view does not show any of the links in the document.
Outlines are best when you understand the structure of your information, and when it’s easy for you
to put everything in its proper place. If you frequently find yourself puzzling over where to put a note,
consider working in Map view for a while. You can always reorganize later.
You can have several outline windows open at once, focusing on different portions of your document.
You may also wish to keep maps and outlines open simultaneously.
A note which has children is displayed in an outline view with a small triangle to its left.
When the triangle points down, the children are shown in the outline. When the triangle points right,
the children are not shown.
OR
48 of 178
Tinderbox v5 Manual
The “icon” that appears next to the disclosure triangle in the outline conveys a host of information in
a very small space.
Double-clicking the icon “Hoists” the note, focusing the window on the note and its descendants.
To edit a note’s title in an outline, simply click and hold the title. After a brief delay, a frame will
appear around the title and you may revise the title at you wish. The click-hold delay is the same
duration as that used to trigger a file rename in Finder
Several key shortcuts are available when using the in-place note editor:
49 of 178
Tinderbox v5 Manual
OR
The conventional Rename dialog is always available from the Note menu, the note’s contextual
menu, or by pressing Enter (⌅).
Hoisting
Hoisting a note focuses the view on it and its descendants. Unhoist returns the focus to the top-level
note. These commands are available in chart and outline views.
OR
Identifying prototypes
In outline view, the note icon for notes which can serve as prototypes is now surrounded by a light
green circle. This helps distinguish notes intended to serve as prototypes. See the Prototypes section
of the Notes chapter for more information.
Separators
A separator is a horizontal line in the outline view that may be colored and titled like other notes via
the Note and Colors menus.
To make a separator:
OR
50 of 178
Tinderbox v5 Manual
Checkboxes
If this View menu item is ticked, the status of $Checked is displayed as a check-box to the left of an
outline item's icon, i.e. at the left-most end of the line entry.
This can be useful for tasks like to-do lists, etc., as the box value can be toggled by clicking on it.
Columns
If this option in the view menu is ticked, it is possible to enhance the view by adding one or more
columns of system or user attribute data to the right of the existing title ($Name) data. This can be
very useful for visual data review, spreadsheet-style.
By default, $ChildCount data is added as the first new column A right-click menu at column head
allows the column contents to be changed, deletion of the column or addition of a new column.
Horizontal order of the column (except the normal $Name data, icons, etc.) is possible via drag-drap
of the column titles.
Boolean attributes are displayed as tickboxes which can be toggled in situ (though only if the the
parent item is first selected). All other column view displayed data is view-only.
51 of 178
Tinderbox v5 Manual
Timeline views
The Tinderbox Timeline shows all the descendants of a selected note. The notes are displayed in a
horizontal timeline, using their $StartDate and $EndDate attributes to determine horizontal position
and automatically arranging notes vertically for legibility.
If none of the notes have a $StartDate, Tinderbox uses their $Modified attribute instead.
Timeline views let you explore complicated events and plan complex processes. They can be
invaluable for determining what happened in events that are incompletely understood, and for
ensuring that plans can be performed as expected and can adapt to unexpected problems.
Tinderbox provides a host of visual dimensions — colors, typography, badges, and many more — to
help distinguish key events and clarify their relationships.
To view the timeline for a container, select an agent or container and choose New Timeline from the
View menu ( ⌘-option-T )
Timelines do not show separators or agents.
The newly-created note will automatically receive the $StartDate for the point at which you clicked.
To move a note in the timeline, drag it horizontally. The note’s vertical position will adjust
automatically as you drag the note to avoid overlaps.
To change the $StartDate of a note in the timeline, select the note and drag the left resize handle. To
change the $EndDate of a note in the timeline, select the note and drag the right resize handle.
Timeline appearance
By default, all descendant notes (N.B. not just children) are plotted in a container's Timeline view.
Any note in scope without a $StartDate set is listed in a sidebar to the left titled "NO DATE".
52 of 178
Tinderbox v5 Manual
If $TimelineStart and $TimelineEnd are set for the container, the timeline is constrained to these
dates. Descendant notes with date information but which lie outside the defined Timeline start/end
are placed in a left sidebar titled "OUT OF RANGE".
Where both "NO DATE" and "OUT OF RANGE" data exist both sidebars are drawn separately at the
left of the Timeline with "OUT OF RANGE" closest to the actual timeline.
Values for the look and feel of the overall view, as opposed to per-note data is stored in the attributes
of the parent container of the notes in the view - i.e. the container selected when Timeline view was
opened.
When no note is selected in the view focus is on the view itself which is useful if opening the
Inspector or Info View to edit atributes.
By default all notes are drawn in a single horizontal band, stored as $TimelineBand. Bands are
numbered upwards from Zero. Descendant notes from different outline depth or parent containers
will all plot in the band is their $TimelineBand is the same.
Notes can placed on discrete timeline bands by setting a different $TimelineBand value or dragging
notes to a new band in the view. Dragging downwards below the bottom existing timeline will cause
a new band to be added (and the dropped note to be set to that $TimelineBand value).
Bands without data below the highest-used band in the view are drawn at a fixed height.
The color of the timeline part of the view is the parent container's $MapBackgroundColor. Vertical
grid lines indicating major scale increments (depending on current scale) are drawn in the parent's
$TimelineGridColor.
Timeline bands are drawn in alternating colors. All even-numbered bands, with numbers starting
from zero, are drawn in a tint of $TimelineColor; all odd-numbered bands are drawn in
$MapBackgroundColor. For a given Timeline view these colors are those of the view's source
container.
Bands may optionally be given labels, via a List-type attribute $TimelineBandLabels and further
modified via $TimelineBandLabelColor and $TimelineBandLabelOpacity. All three attribute values
are those of the source container of the Timeline.
Adornments
Map adornments with a $StartDate (and $EndDate) are drawn on the Timeline across (and behind) all
53 of 178
Tinderbox v5 Manual
bands. Adornments can overlap. If $EndDate isn't specified the adornment is drawn with an arbitrary
width (which will vary according to the Timeline scale when the adornment is first drawn). Dragging
the left/right drag handles of a selected adornment will update its $StartDate/$EndDate. A Smart
adornment's query is ignored within a Timeline (unless its OnAdd alters a matched note's
$StartDate/$EndDate).
Two scrubber controls at the top of the view allow the horizontal scale to be expanded/compressed
and for on screen labels to be made bigger/smaller.
The view container's $TimelineScaleColor and $TimelineScaleColor2 can be used to alter the look of
the bottom scale bar.
54 of 178
Tinderbox v5 Manual
Chart Views
A chart view shows the hierarchical structure of the document very clearly, as a tree chart. A chart is
also handy for seeing many notes in one window. It is easy to re-structure the hierarchy of the
document in a chart window, by dragging parts of the hierarchy to other parts of the hierarchy. The
view shows badges (if applied) and log titles will wrap to aid best use of layout space.
A chart view does not show any of the links in the document.
Chart view should be used for smaller (parts of large hierarchies) owing to OS limitations in the
overall virtual canvas on which the chart gets drawn.
A note which has children is displayed in a chart view as a pointy-ended block (rather than a plain
rectangular block).
click a triangle point to alternate between showing or hiding that note’s children in the chart
view.
OR
Treemap Views
A Treemap view shows the hierarchical structure of the document as boxes within boxes, taking up
the entire window. You can re-structure the hierarchy of the document in a treemap window by
dragging the box representing a note (and the boxes it contains) into another box in the window. A
treemap view does not show any of the links in the document, but can visualize complex hierarchies
that are difficult to explore in more conventional views.
55 of 178
Tinderbox v5 Manual
56 of 178
Tinderbox v5 Manual
Arranging notes
Outline Views
You can drag notes in an outline window to rearrange the document’s hierarchy.
Drag-postioning a note:
Drop the note while it is over the right third of another note—while the cursor is a right-pointing
triangle—to make the note you are dragging a child of the note you drop it on.
Drop the note while it is over the middle of another note—while the cursor is an up- or down-
pointing triangle—to make the note you are dragging a sibling of the note you drop it on.
(If you drop the note elsewhere in the outline window, it will snap back to its starting location.)
Indenting notes in the outline:
Press Tab (⇥) on the keyboard to indent the selected note one more level in the outline.
Hold down the Shift key while you press Tab (⇧⇥)on the keyboard to unindent the selected
note out one level in the outline.
Chart Views
You can drag notes in a chart window to rearrange the document’s hierarchy. With the arrow tool,
drag a note:
Drop the note while it is over the right third of another note—while the cursor is a right-pointing
triangle — to make the note you are dragging a child of the note you drop it on.
Drop the note while it is over the middle of another note—while the cursor is an up- or down-
pointing triangle—to make the note you are dragging a sibling of the note you drop it on.
(If you drop the note elsewhere in the chart window, it will snap back to its starting location.)
This is effectively the same behaviour as used in Outline view.
Treemap Views
In a treemap window, drag a note inside another note to make it a child of that note in the hierarchy.
If the note you are dragging into is mostly covered up (because it has children), you can drop the note
you are dragging onto the target note’s title bar.
You can drag notes into and out of each other in a treemap window, to completely re-arrange the
hierarchy.
57 of 178
Tinderbox v5 Manual
Aliases
An alias of a note is a new note that is permanently tied to its original. The alias can has its own place
in the outline and the map, but in almost all respects the properties of an alias are the properties of
the original.
An alias allows a note to be in two places at once. The original note can be in one place in the
hierarchy; the alias can be somewhere else entirely. But both the original note and the alias have the
same contents: the same text window, the same attributes, and so on. When you change an alias,
you change the original.
When you delete an original note, Tinderbox deletes all its aliases. Deleting an alias, however, does
not delete the original.
Aliases are one of the most powerful tools in Tinderbox, and one of the most flexible ways for
organizing your notes in ways that a hierarchy doesn’t permit. Aliases are also useful for building
Web sites, where the same content may be required in several different parts of the exported Web
site.
A note can have many aliases, or none.
To create an alias
From anywhere,
select a note
choose Make Alias (⌘L) from the Edit menu
The alias will be created as a sibling of the original note. You can then move it anywhere in the
document that you want.
From anywhere,
Properties of Aliases
An alias has the same name as its original. Change the name of either the alias or the original, and
both will change.
The name of an alias is always drawn in italics.
An alias cannot contain children.
When you open a text window on an alias, you are opening a text window on the original. When you
edit the attributes of an alias, you are editing the attributes of the original.
A few attributes are inherent, and belong to the alias and not its original. For example,
58 of 178
Tinderbox v5 Manual
an alias has its own position in the map, so Xpos and Ypos are inherent. Other
inherent attributes include Height, Width, Parent, Created, and Modified.
If you delete an alias, the original will remain. If you delete the original note, all aliases to it will be
deleted.
59 of 178
Tinderbox v5 Manual
Links
A link is a connection between one note and another. Links allow you to make connections between
ideas, and to move quickly between linked notes.
Types of Links
Tinderbox has three types of links:
basic links — links that connect an entire note to another note (or a section of text within that
note). When you create a link by using the link tool to click between notes in a view, you are
creating a basic link.
text links — links that connect a section of text within a note to another note (or a section of
text within that note) or to an external URL (see below).
Internet links. A link out of the document from a selection of note text to a web URL. Following
such a link will open that location in your Web browser.
Basic Links
then
right-click, ctrl-click or click-and-hold on the source note with the arrow tool
choose Create Link... from the contextual menu
choose a type for the link, if desired
click OK to dismiss the dialog
If you start to make a link and then you change your mind, just click the link tool again to cancel
linking, or press the Escape (⎋) key.
If a web link is created and a URL is found on the clipboard, that URL is auto-inserted as a candidate
URL for the new web link.
60 of 178
Tinderbox v5 Manual
A parking space allows you to link two notes that are not visible at the same time and create links to
and from text. When you click a parking space in the middle of making a link, it holds on to the link
for you until you're ready to complete the link.
You don't need to clear old parking spaces, just put a new link in the parking space to replace the old
one. When you close Tinderbox all existing parked spaces are cleared (you won't see them next time
you open the app).
The Find view (⌘F or Edit menu) and Locate view (⌘⌥L or View menu) are often useful for rapidly
locating link destinations.
Text Links
61 of 178
Tinderbox v5 Manual
In a text window,
or
click the link tool on the toolbar (or press ⌘⌃L or otherwise start the link)
if
if not
then,
If you change the text that is the source of a text link, add more text to the source of the link, or
remove some text from the source of the link, the link remains anchored to the modified text.
If you delete all of the text that is the source of a link, but no other text, the link remains: it is linked to
no text, but is at the place in the text where the linked text used to be. If you start typing at that point
in the text, the new text will become part of the text link.
If you add more text to the end of a text link, the added text also becomes part of the text link.
Remember that you can type the special character option-space so that the text you type after the
option-space is not part of the preceding text link.
In a text window, press and hold command+option (⌘⌥) to highlight all text links.
Deletion of links is described in 'Deleting Links' further below.
Internet Links
A text link can link to an external Internet resource. When an Internet link is followed, the destination
will be opened in a Web browser (if it is a Web page), in an email program (if it is an email address)
and so on.
62 of 178
Tinderbox v5 Manual
In a text window,
Link Types
You can assign each link a type, to express the purpose or category of the link. For instance, if your
Tinderbox document is mapping a logical argument, you might want links of types thesis, support,
conclusion, exception, and so on, to indicate the types of connections between parts of the
argument.
A link does not need to have a type. If you do not assign it a type to a link, it will not have one.
To assign a type to a new link:
locate the link, for instance, by choosing Browse Links from the Note menu and clicking the
link
enter a value in the Type field or choose one from the drop-down menu next to the field
click the Apply button
63 of 178
Tinderbox v5 Manual
From there, you can type a new value in the Name or Color field. (Click Change to save your
changes.)
To delete the selected link type for the current document, click the Delete button.
You can also make a link type invisible in the map view:
Browse Links
The Links window lets you see all the links originating from the selected note, and edit them if you
want.
For every link originating from the selected note, the Links window shows:
In the far right of the list, a T indicates that the link is a text link.
From anywhere,
choose Browse Links... from the Note menu, or press ⌘\ (if you are in a view window, first
select the correct note with the mouse or arrow tool.)
64 of 178
Tinderbox v5 Manual
In a view window, first select the source note with the arrow tool (unnecessary from a text
window);
Choose Browse Links from the Note menu; or use another method of opening the Links
window for that note
In the Links window, select the desired link in the scrolling list
Type or choose a new type in the type field (near the lower left of the window), then click the
Apply button
Choose Browse Links from the Links menu in the sidebar of the text window
Choose the desired link from the list
Change the link type in the dialog
Click OK to dismiss the dialog
Deleting Links
To delete a link
65 of 178
Tinderbox v5 Manual
In a map window,
From anywhere,
choose Browse Links… from the Note menu, or press ⌘\ (if you are in a view window, first
select the correct note with the arrow tool.)
in the Links window, select the desired link in the scrolling list
press the Delete key to delete the selected link
use its close box to dismiss that Links window
A text link can be deleted like any other link, as described above. Or,
In a text window,
The Roadmap lets you see all of the links leading to or from a selected space—the local area of a
complex hypertext.
66 of 178
Tinderbox v5 Manual
To open a roadmap,
select a note
choose Roadmap from the Note window
OR
right-click on the note and choose Roadmap from the contextual menu
OR
press ⌘⌥R
The selected note will be shown at the top center of the view, with a thumbnail view of its text below
it. The left column lists all notes that are linked to this note. The right column lists all notes that this
note links to.
You can have many roadmap windows open at once—each showing the links leading to and from a
different note.
To change the focus of a roadmap
Double-click any note in either column. The roadmap will change to show it as the central note, with
links leading in and out of it in the two columns. Any open view windows will also change to make
that note the selected note.
Linking to Text
A link to text will take you to that particular text, in that note, when it is followed; both basic-to-text
and text-to-text links are possible. If the target text is not visibly when the note window opens, it will
be scrolled into view. Rarely needs with short notes, linking to text can be useful if notes contain
large amounts of text and it might otherwise be hard to quickly find the referred-to text when
following a link.
A link to text may originate from anything.
From anywhere,
begin the link as described previously, and click a parking space to hold the link for you
open the text window of the destination
with the cursor, select the text that is the link’s destination
click the parking space, to pick up the link
click the selected text
choose a type for the link, if desired
click OK to dismiss the dialog
WikiLinks
Tinderbox has built-in wiki support.
67 of 178
Tinderbox v5 Manual
⌘-⌥-click on any WikiWord (in Tinderbox, a capitalized word with both internal capital and lower-
case letters, i.e. 'CamelCase') to open the note whose title is that WikiWord. If no such note exists,
Tinderbox offers to create one for you. The new note is always created as a child of the current note,
and you can drag the new note anywhere in your document.
Be cautious when mixing Basic links and WikiWord links in the same note. In such a
scenario, ⌘-⌥-clicking anywhere inside a note's text area (though obviously, not on
an embedded basic link), including on WikiWords, will open the first basic link listed in
the Links drop down for the note. Basic links have a higher priority than WikiLinks,
which are dynamic by nature.
WikiLinks do not appear in Tinderbox's tools for examining and finding links, such as the Browse
Links dialog, Roadmap, various query and template calls, nor will a WikiLink be highlighted when
holding down ⌘-⌥ in the text window or drawn on the Map view. When a WikiLink is ⌘-⌥-clicked,
Tinderbox always looks for a matching named note, whether or not such a note has already been
created. In this sense, it should not be thought of as a proper link, but a pointer to a potential location;
a link that does not exist until clicked on, which then ceases to exist after activation.
WikiLinks are not exported to HTML.
68 of 178
Tinderbox v5 Manual
Footnotes
The Footnote submenu of the Note menu provides a fast and easy way to create a new note from a
selected word or phrase.
In one click, it:
To create a footnote
In a text window,
choose Note:Footnote:As Sibling from the Footnote submenu of the Note menu.
OR
choose Note:Footnote:As Child from the Footnote submenu of the Note menu.
Tinderbox will create a new note named after the selected text, and open a text window for you to
write in that new note.
Tinderbox will also create a new text link from the selected text to the new note (of link type of 'note'),
and a new link from the new note back to the selected text (of link type of 'note+').
Depending on the menu option chosen, the footnote note is created either next to the note it
annotates—a sibling of the source note—or as its child.
This new note is like any other note. You can write in it, add images, and add more links as you
choose (see notes on temporary suspension of the image feature). You can close its text window, and
the text window you came from will still be open.
Creating notes and links with the note tool can be handy for adding definitions, explanations,
footnotes, or other quick annotations. You can easily follow the text link from the annotated text to
the note, and easily follow the link from the note back to the annotated text.
The different link type naming of the links to/from the footnote make it easier to identify notes with
footnotes or footnotes themselves.
69 of 178
Tinderbox v5 Manual
Following Links
To see text links, even if Colored Text Links are disabled in Document Preferences, press and hold
the Command (⌘) and Option (⌥) keys.
In a text window,
while holding down the Command and Option keys(⌘⌥), click within the text of the link.
or
click to place the insertion point within the text of the link.
choose Navigate (⌘]) from the Note menu.
In a text window,
while holding down the Command and Option keys(⌘⌥), click any text that is not part of a
text link.
or
with the insertion point within any text that is not part of a text link,choose Navigate (⌘])
from the Note menu.
A note may have many links departing from it: several basic links, several text links. You can see
what these links are and choose which one to follow:
70 of 178
Tinderbox v5 Manual
When you follow a link from a note—by clicking on text, or by clicking the forward button, for
instance—Tinderbox goes through this procedure:
Was the click within a single text link?
If so, then follow that link. If not...
Was the click within overlapping links?
If so, then display a dialog allowing the choice of which link to follow. If not...
Follow the first (uppermost) link in the list of links that is not a text link
Inspecting the list of links in the Links window can tell you which link from a note will be followed.
Re-arranging the order (priority) of links in the Links window can control which link from that note will
be followed, under which circumstances.
When you try to follow a link from a section of text that is the source of more than one text link,
Tinderbox will display a dialog listing all the outbound links.
In that dialog,
71 of 178
Tinderbox v5 Manual
Agents
Agents are persistent searches.
Agents constantly scour your Tinderbox document, looking for notes of interest—that is, for notes
that match the agent’s criteria. As you add notes to the document, or change existing notes, your
agents automatically update themselves. Agents are active assistants, helping to keep your work
organized and to draw your attention to issues you might perhaps overlook.
Agents can match notes—including container notes, separator notes, aliases, other agents but not
map adornments.
Agents seldom move, and never delete your notes. Instead, agents contain aliases of notes that
match their criteria. You can open, inspect, and edit these aliases.
Your agents can also sort their results, and agents can perform actions on the notes they find.
For example, an agent might locate all books in your research notes that have been
borrowed from a library and are now overdue. It might sort them by the library from
which they were borrowed, and then by author. And it might give these notes a
prominent red border to make them stand out, and also tag them with the topic
"Overdue" to remind you to return them.
Actions are discussed in their own chapter.
Creating an agent
OR
Right-click, or the background of the view , and choose Create Agent... from the contextual
menu
Tinderbox displays a dialog that lets you name the agent and tell it what to look for. To finish
creating the agent,
72 of 178
Tinderbox v5 Manual
Other agents search for combinations of criteria, or for complex patterns of text.
Tinderbox makes it easy to add new agents when you need them, and to improve agents gradually as
your needs change.
Tinderbox provides two ways for building agent queries. You can build simple agents by using the
pulldown expression menus in the middle of the agent dialog; these will help you get started.
Alternatively, you can simply type more advanced queries into the agent dialog.
The pulldown menus in the middle of the agent dialog allow you to create a search expression.
Alternatively, you can simply type the agent’s query into the agent query text field. The text field at
the middle of the agent dialog shows the search expression you have built using the expression
menus in the dialog. Modify this by typing in the text field, or create a search entirely from scratch by
typing in the text field.
73 of 178
Tinderbox v5 Manual
$Text.cintains("Email: \w+@.+$")
will look for notes that contain lines like the following:
Email: info@eastgate.com
That is, the agent looks for the letters “Email: “, followed by one or more letters (\w+), followed by an
‘@’, followed by one or more characters leading up to the end of a line ($).
Appendix 2 discusses regular expressions in more detail. Some
common and useful special characters include:
. matches any character
* matches zero or more occurrences of the previous character.
+ matches one or more occurrences of the previous character.
\s matches any white space character
\S matches anything EXCEPT a white space character
\w matches a word character, such as a letter
\W matches any non-word character, such as punctuation
Searching attributes
Another common pattern for agents is to examine each note’s attributes and look for particularly
interesting notes. For example, we might want to locate notes new notes:
$Created>"yesterday"
or we might seek notes that are colored red:
$Color=="red"
The left-hand side of the comparison is always the name of an attribute. The comparison operators
include
== > >= < <= ≠ !=
The right-hand side of the comparison may be a constant value, as in the examples above, or it may
be a reference to another attribute. For example,
$Color==$BorderColor
will find notes where the border color matches the color, and
$Height==$Width
will find square notes.
The ‘$’ sign tells Tinderbox, “this is the name of an attribute”; since the left-hand side of the
comparison is always an attribute, the $ is optional on the left.
$Name=="TrueName" notes named "TrueName"
$Name==$TrueName notes whose name matches the value of the attribute TrueName
More complex queries may be constructed using logical operators & (and), | (or), and ! (not).
Parentheses may be used to group expressions:
$DueDate<tomorrow & ($Topic=="Iraq" | $Status == "Urgent")
74 of 178
Tinderbox v5 Manual
Faster Search
Searching for text patterns is powerful and flexible, and Tinderbox works hard to ensure that
searching is blindingly fast.
Nonetheless, searching very large documents for complex patterns will eventually become slow. If
your agents need to search numerous lengthy notes for complex textual patterns, they will require
more time. To accommodate them without slowing down your work, Tinderbox will update the agents
less frequently.
You can give your agents a hand by avoiding unnecessary work. For example:
Constrain your queries: If all the notes of interest lie within on container, it is often faster to write
inside(/archives)&$Text.contains(...complex pattern)
than
$Text.contains(...complex pattern)&inside(/archives)
In the first example, Tinderbox knows it can skip notes outside the archives and so can do less work.
Let agents use other agents: Often, several agents may want to limit their search to the same group
of notes — tasks that have not yet been completed, say, or articles that have been published. If each
agent repeats each part of the query, each needs to do work that has already been performed.
Instead, create an agent specifically to look for Open Tasks
$Prototype=="Task"&$Complete==false
and let other agents limit their search to notes inside(/Open Tasks).
Simpler patterns. The query word ( a word ) — is true for all notes that contain the given word
in the title, text, or any string attribute. Because word() need not consider wildcard characters or
other regular expression issues, it is much faster than conventional search.
More Queries
Any expression may serve as an agent query. Some of the most common queries include:
inside( name of note ) — finds notes that are the children of the note named in the parentheses
descendedFrom( name of note ) — finds notes that are descended from the note named in the
parentheses. A note’s descendants are its children, its children’s children and so on.
linkedTo( name of note ) — finds notes that have links leading to the note named in the parentheses
linkedFrom( name of note ) — finds notes that have links coming to them from the note named in
the parentheses
first( name of note[,count] ) — finds the first child of the note named in the parentheses. Optionally,
finds the first count children.
last( name of note[,count] ) —finds the last child of the note named in the parentheses. Optionally,
finds count children.
contains( name of note ) — finds the note which acts as the container of the named note.
word(a word) — for a given single word value, finds all notes containing that word in their title, text
75 of 178
Tinderbox v5 Manual
inside
descended from
linked to
linked from
first inside
last inside
is container of
contains word
is between
has indentation
is similar to
Sorting
Popup menus in the Agent properties dialog allows you to sort the contents of agents (and
containers). For example, an agent might gather all notes that are red, and sort them alphabetically
by title. You may sort by any attribute.
76 of 178
Tinderbox v5 Manual
A second popup menu lets you choose to sort capital and lower-case characters separately (case-
sensitive), to ignore differences of capitalization when sorting (case-insensitive), or to sort by the last
word (as when sorting a list of names).
The popup menus next to "Sort by" are the agent’s primary sort order; the menus next to "and by" are
an optional secondary sort order.
Agent Actions
An agent may perform an action (or actions) on the notes it finds. For instance, an agent could find all
the notes that contain the text Connie and turn them blue.
For information on using agent actions, see the chapter on Actions.
Updating Agents
Tinderbox agents search your document for all the notes that match your queries. If your document is
large and your queries complicated, your agents need to do a great deal of computational work.
Tinderbox agents do their work every few seconds, and typically are nearly invisible to you. If you
have many agents, Tinderbox updates only a few agents at a time. But if your agents require so
much time that you find it interrupts your work, you can choose to update agents only on request.
77 of 178
Tinderbox v5 Manual
Normally, agents update automatically and the File menu item Update Agents Automatically is
checked. Select this item to turn off automatic agent updates.
Agent Priority
In some cases, you may find it useful to update certain agents infrequently. For example, if an agent
is comparing $DueDate to "today", the result is unlikely to change in the next few seconds.
The AgentPriority attribute and the Priority popup menu let you reduce the update frequency of
individual agents, or even turn them off entirely.
An agent that has been turned off is sometimes called a frozen agent. It retains whatever aliases it
had created when you turned it off, and will behave as a normal container until you turn the agent on
once more.
78 of 178
Tinderbox v5 Manual
Actions
Actions can make your Tinderbox document smarter and more helpful by automatically doing things
that you might forget, or things that you might not have time to do yourself. For example, an agent
might search for especially interesting and urgent notes that might interest you, and perform the
action $Color="red" to call them to your attention.
Several different kinds of notes can perform actions.
Actions In Tinderbox
A Tinderbox action sets the value of an note’s attribute. Because almost every facet of your
Tinderbox document is, in fact, the value of an attribute, actions are flexible and powerful.
Tinderbox is a personal content assistant; actions let you arrange for Tinderbox to perform chores
on your behalf, helping to organize and tag information and bringing especially interesting or urgent
items to your attention.
Actions and inheritance work together to help keep your metadata in good shape. Many people begin
projects with ambitious plans for metadata: topic categories, tag lists, timestamps and statuses of all
sorts. But each additional tag and category takes thought and time; eventually, you skip the
metadata because you’re in a hurry. And each bit of metadata opens opportunities for mistakes; you
look back and realize that some items that you classified under Category 1 actually belongs another
category. Then, some marginal cases confuse matters; soon, you aren’t using categories at all and
vowing eventually to go back and categorize everything. The ambitious category system gathers
dust.
Tinderbox actions can help reduce the bother of metadata by automatically filling out the correct
information and by making sensible initial guesses. It is often preferable to have a few things slightly
miscategorized or mistagged, than to have everything tossed into a single endless list.
At the same time, it is important for assistants to accept some limitations. Tinderbox actions never
create or delete notes. The assistant can suggest delete a note that seems out of place or obsolete,
but the final decision is always yours.
This chapter from the Tinderbox User’s Manual describes the most common and useful Tinderbox
actions. See Appendix 3 of the manual for details on all Tinderbox actions. The Tinderbox Cookbook
is a valuable resource, demonstrating each Tinderbox action, and aTbRef – Mark Anderson’s
Tinderbox Reference in Tinderbox – discussed each action as well.
79 of 178
Tinderbox v5 Manual
As time passes, you may well discover new topics you’d like to have, but you may not be eager to
review all your old notes.
Tinderbox agents can help. Agents can search for unfiled notes that contain significant words and
phrases; these can be gathered for your attention or even automatically classified.
Containers can help too, because the container may provide valuable context. Suppose your
container holds notes you’re making during a symposium on the naval history of the Second World
War. The container might automatically propose keywords or tags “WW2” and “Navy”. Rules can
enforce workflow requirements or business logic; for example, if you expand a Task into a container
holding several subtasks, a Rule could automatically change the Task into a Project.
if($ChildCount>1) {$Prototype="Project";}
Actions are themselves stored at attributes of notes. They can be inherited from prototypes, so
related notes can share the same actions. Actions can even create and modify other actions.
Expressions
Tinderbox actions can perform interesting and useful computations as they pass information within
and between notes.
Common binary operators include
! logical not
- numeric negation
The conventional order of operations and operator precedence are used, and expressions with equal
precedence are evaluated from left to right. Parenthesis may be used to group expressions as
desired.
equality: true if the values of left and right side expressions are
== equal. $Price=="100" checks whether $Price is equal to
80 of 178
Tinderbox v5 Manual
"100."
inequality: true if the values of left and right side expressions are
!=
not equal.
Container Actions
Container actions set a note’s values when a note is moved to the container, or when a note is
created inside that container. A container action suggests a sensible or typical value, which you can
then change later if you like. For example, a weblog’s archives might set
$PublicationDate=today when a new note is moved into the Public container, but you remain
free to backdate the post if you wish.
Adornment Actions
Adornment actions set a note’s values when the note is moved onto the adornment. An adornment
with an action is often a special tool that let’s you do something conveniently.
Agent Actions
Agents gather aliases of notes to bring them to your attention, and agent actions change attribute
values of the notes that meet the agent’s criteria. Agents often perform routine tasks that you might
forget; for example, they can automatically assign general topics to notes.
Rules
Rules enforce constraints and business rules. If a container says that $PublicationDate =
"today", that’s a suggestion. When a rule says it, it’s the law: If you change the value, the rule will
81 of 178
Tinderbox v5 Manual
Contradictions
Contradictory actions may lead to constant document changes and should be avoided.
For example, two different agents might each be trying to change the color of the same note. The first
agent looks for HighPriority notes, and sets their color to be red. A second agent looks for Invalid
notes, and sets their color to orange. What will happen if a note is both high-priority and invalid? One
agent will turn it Orange, then the other agent will turn it Red, and then the first agent will make it
Orange again.
Try to avoid contradictory actions. For example, you might decide that the agent that flags invalid
notes might simply add a badge instead of changing the color
Action: $Badge="flag yellow"
Alternatively, we might decide that a high-priority note should never be flagged as invalid:
Query: $Valid==true | $HighPriority==true
This agent would collect all valid notes ($Valid==true) and also all high priority notes, even if those
notes are invalid. Expressions like these lets agents work together instead of constantly
contradicting each other.
Rules
A rule is an action attached to a note (or container). Rules typically acts only on that note.
For example, the rule
$Urgent = any(children,$Urgent)
will make a note Urgent if any of its children are urgent.
Rules run continuously. If a note’s rule turns it red
$Color = "red"
and you manually set the $Color to green, the rule will change the color to "red" the next time it runs.
Setting Actions
82 of 178
Tinderbox v5 Manual
Select a note
Choose Rename from the Note menu, or press Enter (fn-Return)
In the Rename dialog , type the desired action(s) into the Action or Rule field (for Agents), or
into the OnAdd or Rule field (for notes and adornments).
Click OK to dismiss the dialog box.
If an action or rule cannot be parsed, Tinderbox will select the troubled item but will not dismiss
the dialog until the error is corrected.
Writing Actions
Setting Values
Multiple Actions
Data Types
Each attribute has a type, which determines what kind of information that attribute contains. Some
attributes are dates, some numbers, some are strings. Details about types are discussed in Appendix
3: Actions, Expressions, and Rules.
Tinderbox automatically converts types as needed.
83 of 178
Tinderbox v5 Manual
The format() operator converts various types of attributes to text strings, giving you control of exactly
how the string will be formatted.
format(value,format_string)
For example:
format($Created,"L")
takes the note’s creation date and formats it as a "long local date", such as "Sunday, March 23, 2007
1:26pm".
For more information about formatting dates, see Appendix 5: Date Formats.
If value is a list or a set, the format string is the delimiter used to separate items in the set.
$Text = format($PriceList,"\r")
replaces the note’s text with a list of prices, each separated by a carriage return.
Alternatively, you may supply five arguments to format the set as an HTML, XML, or xoxo list:
format(value,list-prefix,item-prefix,item-suffix,list-suffix)
For example, to format a set $Topics as an unordered HTML list:
format($Topics,"<ul>","<li>","</li>","</ul>")
Formatting Numbers
If a value is a number, format() lets you specify the precision and width of the decimal number:
format(value,precision, width)
For example, if $MyNum is 3.1415927, then
format($MyNum,2,7) is " 3.14"
format($MyNum,2) is "3.14"
format($MyNum,0) is "3"
An alternative with numbers is to use the Number.precision() operator (see Appendix 3).
$MyNum.precision(2) is "3.14"
84 of 178
Tinderbox v5 Manual
Attribute references may refer to other notes through keywords such as "parent", "child", "next" and
"previous". A full list of keywords is found in Appendix 3. For example:
$Status=$Status(parent)
makes the status of this note the same as the status of the parent, while
$Status(parent)=$Status
sets that status of this note’s parent to match its own.
Attribute references may also refer to a note through its unique name, or through a path expression:
$ChildCount(/London/monuments)
refers to the note named “monuments” inside the top-level container named "London".
Conditional Assignment
Actions may be conditional:
if (query) {action} if (query) {action} else {action}
The query may be any expression that could appear in an agent. See the chapter on Agents and
Appendix 3 for a full discussion.
A very common conditional action is a suggestion, assigning a value only if no value has yet been
assigned. For example,
if(!$Status) {$Status="waiting for action"}
A more compact way to write this in Tinderbox is the conditional assignment |=:
$Status |= "waiting for action"
The |= operator assigns a new value to an attribute only if the attribute does not already have a value.
85 of 178
Tinderbox v5 Manual
The runCommand() function lets you run any command-line process or script. For examples,
$Text = runCommand(command_line, input)
runs the specified command line, passing it the result of evaluating input. The value of runCommand
is the standard output of the command. For example:
$Status=runCommand(“sendmail -f address@example.com”,$Text)
will send the note’s text as an email message, or
$Text=runCommand(“ls ~/Documents”)
will replace the note’s text with a list of the files on the user’s Documents folder.
Template actions
Export template markup is primarily used for exporting Tinderbox information to HTML or XML, but it
may also be used in actions. This feature was formerly popular, but is now seldom useful. Use of
export codes in actions is now deprecated.
Export codes are introduced by a caret (^) following the = sign. The remainder of the expression, up
to the next semicolon or the end of the action, is interpreted as an export template. The following
example works but is deprecated:
$MyString=^ Note ^value($Name)^: ^linkTo(/someNote)^;
If you wish to use the template mechanism to construct a complex string, a cleaner approach is the
exportedString function.
exportedString(note,templateFile)
exportedString(note,templateString)
The first form of exportedString takes a reference to a note and the name of a template note or
template file, and returns the result of applying the template to the note. The second form requires no
template; instead, its second argument is itself the template's code string.
exportedString(this,"^value($Name(parent))^")
or
exportedString(this,$MyTemplate)
In the second example, the $MyTemplate attribute would hold export code.
For more information about HTML Export and markup Tinderbox uses for this process, see the HTML
Templates chapter of this manual and Appendix 4.
86 of 178
Tinderbox v5 Manual
Tinderbox actions are powerful, and the extensive list of possibilities in Appendix 3 of the User’s
Manual might seem daunting at first.
You don’t need to know every action to use Tinderbox superbly. Tinderbox is intended to help you
extend and revise your documents as your needs change, so you can gradually add richer actions to
streamline your work later, when you more completely understand what you need.
When you see an opportunity to let Tinderbox perform dull chores for you, simply refer to the built-in
manual to find the actions you need.
87 of 178
Tinderbox v5 Manual
Stamps
Stamps make it easy to set the values of attributes quickly and consistently.
Stamps appear in the Stamps menu; choosing a stamp applies that stamp to the selected notes.
Stamps are especially useful for repetitive actions, such as marking tasks as Completed.
The Quickstamp Inspector pane also provides a convenient tool for inspecting a Tinderbox
document, letting you compare the values of any attribute as you select different notes.
To create a stamp
From anywhere,
Then,
To apply a stamp
From anywhere,
Select the desired note or notes. To select multiple notes, use the marquee tool or shift-
select, cmd-select, or Select All (⌘-A)
Select the desired stamp from the Stamps menu
Quickstamp
The Quickstamp Inspector lets you create a temporary stamp, providing a quick way to change the
attributes of any selected note.
To open the Quickstamp Inspector, choose Inspector from the Window menu (⌘-1).
88 of 178
Tinderbox v5 Manual
The Quickstamp Inspector assigns new values to all the currently-selected notes. If the selected
notes share the same current value, that value is also displayed in the inspector:
In addition, the QuickStamp Inspector also lets you restore the note’s value to whatever value it
would normally inherit. Simply press the use default button.
With large selections of notes, the Quickstamp Inspector shows a busy indicator whilst the process
is still running.
89 of 178
Tinderbox v5 Manual
You can create a note whose text is the contents of a Web page you designate. Tinderbox can
automatically fetch the contents of that Web page, so that the note is always updated with the
current contents of that Web location.
You can have notes that open automatically in a Web browser.
URL
$URL lets you associate a URL with a note. Other attributes use this URL to fetch data.
Examples:
http://www.eastgate.com
mailto:info@eastgate.com
AutoFetch
If $AutoFetch is true, the note will attempt to download text from the URL specified in $URL. If no
URL is specified, or if the URL cannot be reached, or if Tinderbox cannot open an internet
connection, AutoFetch has no effect.
The attribute $AutoFetchCommand extends AutoFetch’s capabilities. AutoFetchCommand is an
action, using the same syntax as agent actions and rules. It runs when the file is loaded, exported,
and possibly during idle moments. Typically, AutoFetchCommand will invoke an outside program,
perhaps fetching some information from the user's hard disk or network. For example:
$Text=runCommand("ls ~Documents")
will replace the text of the note with a list of all the files currently in the user's Documents folder.
$Delivered=runCommand ("myDatabaseQuery "+$TrackingID)
will run the shell script myDatabaseQuery, passing it the value of the note's TrackingID attribute as
an argument.
Remember, you can use stamps, Quick Stamps, and prototypes to help you organize and set
attributes easily.
ViewInBrowser
If $ViewInBrowser is true, opening a text window on this note will also open the Web page
indicated by the URL attribute, using in your Web browser
ReadOnly
90 of 178
Tinderbox v5 Manual
If $ReadOnly is true, you cannot modify the text in this note—you can only view it. It makes sense
to set this true for notes that fetch their contents from the Web.
LastFetched
$LastFetched records the date and time when a note was post recently updated from the Web.
91 of 178
Tinderbox v5 Manual
Email To Tinderbox
Though Tinderbox is the tool for notes, you may sometimes need to gather information when
Tinderbox isn’t ready to hand. In some cases, the most convenient solution may be to set up a
special mailbox for key Tinderbox documents. For example, myProjects@example.com could be the
mailbox for your Projects Tinderbox document.
Note that the email account should be dedicated to this Tinderbox document. Do not use your main
email account, as Tinderbox will download messages and remove them from the server.
If email checking is turned on, a Tinderbox will attempt to check its email when it is first opened, and
also whenever the Fetch Now button in the Network palette (⌘-3) is pressed. If no internet
connection is available or if the email server cannot be reached, Tinderbox will await a future
opportunity to check mail.
If Tinderbox finds mail on its server, it will download and delete each message in turn. Each message
becomes a note inside the container named Mail at the top level of the document hierarchy.
If the container does not yet exist, Tinderbox will create a new 'Mail' container at root level. Once
created, do not move or rename this container as Tinderbox will re-create the original one; the
container name is case sensitive and it must be at root level.
The Subject of the email becomes the name of the note. The text body of the email becomes the text
of the note. Only plain text email bodies are currently supported; MIME email and attachments are
discarded.
Note that the Mail container may have OnAdd actions. These actions are applied to the newly-
received email notes as soon as they are created. For example, the Mail container could scan the
note and choose a suitable Prototype automatically.
Incoming email's body text is scanned for a discrete single line starting "Tinderbox: ". If found the
first (only the first) is scanned for two parameters:
92 of 178
Tinderbox v5 Manual
The target container (mandatory). Use "/Mail" fro the default container otherwise give a
quoted full path or partial path or note name of another container. For partial paths or note
names the first match in outline order will be used if not unique. If the specified container
doesn't exist, Tinderbox will create it before adding the new note.
Action code (optional, mandatory enclosing [ ] if used). A set of [ ] enclosing one or more
complete action code expressions, e.g. $IsUrgent=true. Targeted attributes must already
exist - they won't be created for you. The expression code, including [ ] should not exceed 59
characters, assuming you sue the default container. This limit is the standard (under-the-hood)
per-line length of 80, minus return character and the path 'Tinderbox: ' mark-up , etc. The limit
means this method should not be regarded as a mass data import mechanism.
Email Limitation
Email to Tinderbox requires a standard POP email service that can be reached on the standard POP
port (port 110). IMAP mail servers are not currently supported, but free or inexpensive POP mailboxes
are readily available from a variety of hosting services.
93 of 178
Tinderbox v5 Manual
Exporting to HTML
Tinderbox provides exceptionally powerful and flexible export to HTML and XML. Every Web site and
application has unique needs and requirements; Tinderbox makes it easy to pour information from
your Tinderbox notes into HTML and XML files that meet your exact needs.
Indeed, Tinderbox templates can export data to all sorts of other programs and formats. Since HTML
and XML are likely the most common formats in use today, our discussion will focus on these.
HTML Templates
An HTML template is simply an HTML file in which special codes, or "placeholders", indicate where
Tinderbox should insert information from each note; see the section further on about Placeholders for
more detail. For example, ^title^ is replaced by the title of the note, and ^text^ is replaced by
the text of the note.
Tinderbox defines a host of placeholders for various purposes, but the majority of these are required
very rarely. The principal placeholders are ^title^, ^text^, ^format^, ^value^, ^include^, and
^children^; understanding these will suffice for many users.
When you export a document, Tinderbox takes each note, puts information in the appropriate places
in the appropriate template, and thus creates a new HTML file for that note.
Text. The text in your notes translates to text on Web pages. Special characters, such as © and
“curly quotes” that are not part of the standard ASCII 128-character set, will also be translated
appropriately for the Web.
Images. Images will be placed in the translated Web pages where they appear in the Tinderbox
notes. Tinderbox will automatically translate the image files into formats suitable for the Web (either
JPEG or PNG files); see notes on temporary suspension of this feature.
Text links. Tinderbox links from portions of text will translate into links from that text on the web page
to other exported notes or external web links.
94 of 178
Tinderbox v5 Manual
Text appearance
Tinderbox’s translation attempts to translate text styles, such as italics, boldface, and relative size, to
similar text styles on most Web browsers.
The translation also attempts to recognize such meaningful items as headings and lists, and create
appropriate HTML to display those items. Tinderbox has a simple lists feature that treats a paragraph
beginning with an asterisk as an unordered list; use two or more asterisks to embed lists within lists.
Or, you can instruct Tinderbox to leave your text exactly as written—you will want to do this if you
have incorporated Web formatting codes into your text already; do this using ^text(plain)^.
Lists
Tinderbox has a simple lists feature that treats a paragraph beginning with an asterisk as an
unordered list. Use two or more asterisks to embed lists within lists.
Ordered lists may be created by beginning new paragraphs with the '#' symbol.
Basic links
If you choose, Tinderbox can add links to each Web page corresponding to the basic links from that
note.
Hierarchy
If you choose, by adding appropriate export codes Tinderbox can create additional links from text on
each Web page to provide access to the notes that are nearby in the Tinderbox hierarchy (ancestors,
siblings, children, etc.).
Overlapping text links
Text on a Web page cannot be the source of more than one link. Text in a note that is the source of
more than one link is linked on the Web to a special Web page listing the links that can be followed.
Views
View windows—map views, chart views, outline views, and treemap views—are not available on the
Web.
Multi-paragraph text links
On the Web, the text that is the origin of a link cannot span a paragraph boundary. The source of a
Tinderbox text link can span a paragraph boundary. Tinderbox does not check for this violation when
it exports text links; if you are creating for the World Wide Web, you will want to avoid creating such
text links. (If you do export such a text link, various Web browsers interpret this incorrect link markup
with varying degrees of forgiveness. Your link may work on some Web browsers and not on others.)
Links to included notes
Basic and text links to notes included within other notes aren't exported. This is because a note may
95 of 178
Tinderbox v5 Manual
be included in many places and Tinderbox can't guess to which exported page to source page
should link.
Other interface items
Other items of the Tinderbox interface are also unavailable on Web pages, including:
The Common Words and Similar To views have special export codes to allow their data to be
exported as lists.
Text
Headings
96 of 178
Tinderbox v5 Manual
Tinderbox recognizes paragraphs as headings when the paragraph uses a font size larger than the
default text font size.
If the font is 2-3 points larger than the default font size, the paragraph is treated as an <h3> heading.
If the font is 4-5 points larger, it is treated as <h2>.
If the font is at least six points larger, it is treated as <h1>.
Lists
Tinderbox recognizes lists in your notes, using a simple convention. A series of paragraphs that begin
with an asterisk ‘*” or a bullet ‘•’ character is interpreted as an unordered list.
Ordered lists may be created by beginning new paragraphs with the '#' symbol.
List markup may be customized through markup attributes:
HTMLOrderedListStart/End
HTMLListStart/End
HTMLListItemStart/End
Lists are automatically indented in the text window. Automatic indentation of lists may be turned off
by default in the Text pane of Document Preferences (⌘-8), or for individual notes by setting
$AutomaticIndent to false.
Tinderbox also provides some built-in templates that are available to all documents.
Tinderbox also lets you store export templates in external files, and older Tinderbox documents often
use external templates. All export templates for a particular document must be stored in the same
folder. We will refer to this folder as the HTML templates folder, but it may have any name you
choose, and may be a different folder for each of your documents.
To specify which is the HTML templates folder for a Tinderbox document, choose a default HTML
template for the document. Tinderbox then looks for all other templates as well within the folder that
contains the default HTML template.
97 of 178
Tinderbox v5 Manual
choose a template from the template popup menu, near the top right of the controls in the
window. This menu will list all the HTML template files in the HTML templates folder.
98 of 178
Tinderbox v5 Manual
HTML View
An HTML View shows you the HTML that would be created by exporting the selected note with the
current HTML export settings. The window also provides convenient controls for changing many of
these settings. Export and Preview buttons allow you to export the note to as a file or to view it in your
Web browser.
You can have many HTML Views windows open at once, showing different notes.
Opening the HTML view for an alias, opens the HTML view for the alias' original.
Tip: To select text in an HTML view window: hold down option while you select the text. This lets you
copy the text, in case you want to inspect or test its HTML elsewhere.
Export Options
The Export pane of a note's HTML View lets you control which notes are exported, choose a file
name, and preview individual notes.
Export
If this box is checked, this note will be exported to HTML when you export the document. (Equivalent
to setting $HTMLDontExport to false.)
Export children
If this box is checked, this note’s children will be exported to HTML when you export the document.
(Equivalent to setting $HTMLExportChildren to true.)
Markup text
If this box is checked, Tinderbox’s export to HTML translate text styles, such as italic, bold, headings,
and lists, using HTML markup.
If this box is unchecked, Tinderbox exports the text of the note without adding HTML markup codes.
Quote HTML
Check this if you want to include examples of HTML in your text as HTML -- i.e., <p> will appear as
<p>, not be translated into a paragraph break. (Equivalent to setting the $HTMLQuoteHTML attribute
to true)
File name
When Tinderbox exports a note to HTML, it automatically generates a name for the HTML file base
on the note’s title. If you want a note’s file to have a specific name—so that you can know what name
to link to from another Web site, for instance—enter a name here. (Equivalent to setting the
$HTMLExportFilename attribute.)
File extension
99 of 178
Tinderbox v5 Manual
The extension—usually ".html"—that should be added to the filename for the HTML file. (Equivalent
to setting the $HTMLExportExtension attribute.)
Template
The template used when exporting this note to HTML. Choose a template from the popup menu,
which lists in turn all the template notes, all the built-in templates, and each external HTML template
file in the HTML Templates folder. (Equivalent to setting the $HTMLExportTemplate attribute.)
Export folder
The folder, usually on your local hard disk, where the HTML files created for this document should be
saved. Press this button to select a new export location.
Update
Click this button to update the HTML shown in the window to reflect any changes you have made to
the options in this window.
Export
Click this button to export this note to HTML. Exporting will overwrite any older HTML files of the
same name(s). Only the current file is exported, aliases are not exported (use a full HTML export for
this.
Preview
Click this button to export the note to HTML and open the resulting HTML in your Web browser. Note
that the preview feature will result in an HTML file being created on your hard drive.
first paragraph
These fields specify what HTML markup should surround the first paragraph of text when the text of
this note is exported to HTML. They default to <p> and </p>. (Equivalent to setting the
HTMLFirstParagraphStart and HTMLFirstParagraphEnd attributes.)
subsequent paragraphs
100 of 178
Tinderbox v5 Manual
As above, but for all other paragraphs of text in the text of the note. (Equivalent to setting the
HTMLParagraphStart and HTMLParagraphEnd attributes.)
indented paragraphs
Tinderbox recognizes paragraphs that begin with a tab character as special. These are exported with
HTMLIndentedParagraphStart and HTMLIndentedParagraphEnd tags. Starting a paragraph with a tab
character is often used to indicate an indented or block-quote paragraph.
Empty by default, this is what is exported immediately before a note's opening paragraph markup
and after a note's final paragraph market, respectively. Can be useful in connection with CSS
stylesheets, such as setting before and after to <div> and </div>. (Equivalent to setting the
HTMLExportBefore and HTMLExportAfter attributes.)
The Style tab of HTML View lets you customize the markup applied to bold, italic, and other styled
runs of text.
bold
The before and after fields hold the opening and closing tags for bold passages and default to <b>
and </b>. (Equivalent to setting HTMLBoldStart and HTMLBoldEnd attributes.)
italic
The before and after fields hold the opening and closing tags for an italic passage, <i> and </i> by
default. (Equivalent to setting the HTMLItalicStart and HTMLItalicEnd attributes.)
underline
The before and after fields hold the opening and closing tags for an underlined passage, <u> and
</u> by default. (Equivalent to setting the HTMLUnderlineStart and HTMLIUnderlineEnd attributes.)
strikethrough
The before and after fields hold the opening and closing tags for an strikethrough passage, <strike>
and </strike> by default. (Equivalent to setting the HTMLStrikeStart and HTMLStrikeEnd attributes.)
HTML Preferences
The HTML pane of the Preferences dialog controls how your document will be exported into HTML.
You will want to set these options before you export to HTML.
To open the Preferences dialog, choose Document Preferences... from the Edit menu (⌘-8).
The text in this field should describe where the HTML files will be stored when your document is
101 of 178
Tinderbox v5 Manual
available for Web reading (no matter where they are originally saved). Some examples:
If you are creating HTML files to read locally on your computer (to test your export, perhaps) you
can leave this field blank.
Tinderbox exports hrefs with relative addresses, so for most Web-serving applications you can
also leave this field blank (rather than filling it in as described next).
If your HTML page files will eventually be made available in a directory named web_texts within
a directory named public, and that directory is on a machine whose Internet address is
carthage.utara.edu, then this field should contain
http://carthage.utara.edu/public/web_texts/
Tip: changing the URL (Web server) information will not change where Tinderbox stores the HTML
files—you choose that when you export, using the usual Macintosh file dialog. This information only
describes where those files should be for the links to work.
You should choose which template Tinderbox should use by default when you export to HTML. This
will be the template used for notes that do not specify a different template.
You may choose an external file, a template note, or a built-in template.
Choose whether the names for the HTML files Tinderbox creates should end with the .html extension
or .htm.
For convenience while testing your exported files on your Macintosh, select which application should
open when you double-click one of these HTML files.
Tinderbox must translate the images in your document from the Macintosh image format (PICT) to a
format suitable for use on the Web. You may choose to have images translated into JPEG images, or
into PNG images. (At this writing, PNG images are only understood by newer Web browsers.)
Tinderbox creates the image files, and the references to them in the HTML files (see notes on
temporary suspension of this feature).
Export paragraphs:
102 of 178
Tinderbox v5 Manual
as prose: if this option is selected, paragraph breaks (carriage returns) in text are exported as
paragraph markers <p> in HTML. This is standard HTML for most applications. On most Web
browsers, this separates paragraphs of text with a bit of extra white space. This option is selected by
default.
as poetry: if this option is selected, paragraph breaks (carriage returns) in text are exported as break
markers <br> in HTML. This can be useful if you are using line breaks to separate lines—as in poetry,
or lists of data—that should not be separated by extra white space when converted to Web format.
From anywhere,
Save the document. This is a good idea before any major change, or before using any
powerful tool.
Choose Document Preferences... from the Edit menu (⌘-8)
Recall that when you export your document into HTML, Tinderbox creates many HTML files and also
many new folders to put them in. For instance, if the note “Big Cats” contains the notes “Lions”,
“Tigers”, and “Jaguars”, Tinderbox will create the HTML file BigCats, as well as the new folder
BigCats. The folder BigCats will contain the HTML files Lions.html, Tigers.html, and Jaguars.html.
HTMLDontExport
Boolean attribute. If true, the note won't be exported when other notes in the same document are
exported to HTML. No aliases of this note will be exported. If other notes ^include this note, nothing
will be added.
103 of 178
Tinderbox v5 Manual
HTMLExportChildren
Boolean attribute. If false, the children of the note will not be exported upon export to HTML.
Remember that if this attribute is false, Tinderbox never even examines the child notes when
exporting to HTML. So individual child notes may have HTMLDontExport set either true or false, and
will not be exported in either case.
The easiest way to set this attribute is with the Export children as pages checkbox on the HTML view
window for the note.
HTMLExportExtension
Text attribute. The extension added to the end of the HTML file created for this note. Defaults to .html.
The easiest way to set this attribute is with the File extension text field on the HTML view window for
the note.
HTMLExportFileName
Text attribute. The name of the HTML file created for this note.
In most cases this field is blank, and Tinderbox automatically creates a name for the HTML file from
the note name. For a particular note this may not be what you want: perhaps you’d rather have a
more legible name, or perhaps other sites refer to a particular file. In that case you can use this
attribute to tell Tinderbox what file name to use instead.
The easiest way to set this attribute is with the File name text field on the HTML view window for the
note.
HTMLExportTemplate
Filename attribute. The template that should be used to export this note to HTML. If left blank, the
note is exported with the default HTML template, as set in Preferences.
The easiest way to set this attribute is with the Template popup menu on the HTML view window for
the note.
If there’s a mistake in the content—you see that you wrote "Thoreua" where you want
"Thoreau".
You could edit the Web page in a text editor or Web page editor and fix the mistake—change
"Thoreua" to "Thoreau". But the original Tinderbox note will still have the mistake, and if you export it
again, the mistake will reappear in the Web page.
Or, you could fix the mistake in the Tinderbox note, and then export it again to HTML. This gets you a
new Web page, with the mistake fixed, and eliminates it once and for all.
104 of 178
Tinderbox v5 Manual
If it doesn’t look the way you want—you look at the Web page, and decide that you want more
cellpadding in the table, or a different background color.
Remember that you can select text in an HTML view window: press and hold the option key while
you select the text. This lets you copy the text, in case you want to inspect or test it elsewhere.
Again, you could edit the Web page in a text editor or Web page editor and make the change. But if
you use the template you used here for more than one Tinderbox note, you will have to make this
change many times—once for each Web page created using this template.
A better idea is to use that text editor or Web page editor to edit the template that was used to create
this Web page. In the template, change the cellpadding or background color or make whatever
change you’ve decided on.
Then, export the note (or notes) again, using the modified HTML template. The change you made to
the template will be reflected in all the new HTML files created with it.
105 of 178
Tinderbox v5 Manual
HTML Templates
Export templates are a simple but enormously flexible way to export your data in exactly the form you
want. The template supplies the structure of the exported file, with placeholders marking where
Tinderbox is to add information from your document.
An HTML export template need not be complicated. Here is a very simple template for an HTML Web
page:
<html>
<!-- Put the title of the note into the browser title bar -->
<head><title>^title^</title></head>
<!-- Begin the body of the Web page -->
<body>
<!-- Place the content (text and images) of the note -->
^text^
</body>
</html>
Template Essentials
Tinderbox offers a great variety of export template codes, giving you immense flexibility. You can
export Tinderbox notes as HTML, XML, or in many other formats. You can easily control nearly every
aspect of the process, making Tinderbox a convenient front end to a host of systems and services.
The full array of export codes are described in Appendix 4. But most of these codes are seldom used.
In this chapter, we will discuss the much smaller number of export codes that you are likely to use
frequently.
Placeholders
Tinderbox placeholders begin with a caret (^), entered by typing Shift+6.
^title^
^value($Color)^
The placeholder continues from the opening caret and ends with white space, an optional closing
caret, or a closing parenthesis. Although the closing caret is optional, it is best to include one unless
familiar with exporting - the closing caret saves Tinderbox having to make assumptions about where
a particular code ends.
A placeholder ends with a closing parenthesis, white space, or a caret; the closing
caret is only required if the placeholder directly abuts a printing character.
Most placeholders refer to the note that is currently being exported, but some placeholders can
extract information from different notes.
^title^ : the name of this note
^title(this)^ : equivalent to ^title
^title(parent)^ : the title of this note's container
106 of 178
Tinderbox v5 Manual
^title(/tasks/132)^ : the title of the note "132" inside the container "tasks"
Placeholders that refer to other notes can refer to them in several ways:
Paths
Export templates allow you to identify notes by relative or absolute paths. For example:
/news is the top-level note named "news"
/news/local is the note named "local", inside the top-level note "news"
The file name "." stands for this note, and ".." stands for the parent of this. Thus,
../Chicago is the note named "Chicago" that is a sibling of this note
../.. is the grandparent of this note
If a path begins with "/", the path begins at the top level of the document. If it does not begin with "/",
it begins inside this.
Content codes
To export the title of a note, we simply include the placeholder
^title^
^title(object)^
For example, we might want to show the title and the parent's title:
<h2> ^title(parent)^ : ^title(this)^ </h2>
Similarly, we can use ^text^ to convert a note’s text into HTML and insert it into our page.
107 of 178
Tinderbox v5 Manual
Similarly, we can use ^text^ to convert a note’s text into HTML and insert it into our page.
^text^
^text(note)^
^text(note,max_words)^
While the note’s text and title are most likely to be of interest, we can export any attribute.
^value($attribute)^
gets the value of any attribute you specify, for this note.
^value($attribute(parent))^
gets the value of any attribute of this note’s parent.
Older templates used ^get(attribute)^ and ^getFor(parent,attribute)^, and these
obsolete forms continue to work. Note that in ^value^ attribute names take a $-prefix, whereas this is
not used in most other export codes.
^title^
^get(Name)^
^value($Name)^
But ^value^ also evaluates expressions, permitting more complex forms:
Total Price: ^value($Price*$Quantity)^
Macros
108 of 178
Tinderbox v5 Manual
Macros provide a convenient shorthand, helping you save typing and making your work easier to
keep up-to-date.
^do(disclaimer, show, contact, phone)^
might expand into a lengthy, customized passage that might need to appear in many notes, and that
would be tedious to retype.
<h3>DISCLAIMER</h3>
<p>These notes regard production plans for show, a projected
production of Imaginary Studios, Inc. All plans are preliminary and
strictly confidential. Writers are cautioned that all details are
subject to change, and that final budgets are not approved until signed
by contact. If you have questions, please call contact at phone. </p>
Note that, if the legal department wants to change the wording of the disclaimer, we need only
change the macro. If we had typed the disclaimer in several places, we would need to search and
correct each occurrence. A macro is a text pattern that, when invoked, expands into a larger
element.
^do(...)^
To define a macro, use the Macros pane of the Attributes window (⌘-2). For example:
Name: dot
Value: <img src="anImage.gif" height="16" width="16">.
Defines a macro that will replace ^do(dot)^ with the specified 16-pixel image.
The ^do^ command may take additional arguments that are passed to the macro. Wherever the
macro contains the substring $1, that substring will be replaced by the first additional argument. The
substring $2 will be replaced by the second additional argument.
If a paragraph consists entirely of a macro, paragraph markup is not applied. This is useful, for
instance, as it makes it easy to use a macro to insert an element like an image (<img>) which
requires no enclosing paragraph.
Conditional Export
Occasionally, you may want to export some information for some notes, but not for others. Of course,
you could use two different templates. But if the changes are small, you can use ^if to vary the
behavior of the template depending on the contents of the note.
^if( condition )^ ...... ^endif^
^if (condition)^ ... ^else^ ..... ^endif^
Here, condition may be any expression. For example
^if( $Created>"today-1 week" )^NEW!^endif^
will export the phrase “NEW!” in notes less than a week old.
if condition is true, Tinderbox exports everything from the ^if()^ statement to the ^else^ or the
^endif^.
Be careful to ensure that every ^if()^ is balanced by a corresponding ^endif^.
Conditional logic can greatly reduce the number of templates you need, at the cost of increasing
their complexity. Conversely, if your templates are becoming a tangle of ^ifs, consider breaking them
into several separate templates.
109 of 178
Tinderbox v5 Manual
Group Codes
Most HTML markup elements concern an individual note, either this or a designated note. Some
element consolidate information from a group of notes.
For example
^every(children,$Urgent)^
is true if each child of this note is has a true value for its Urgent attribute.
The group designators include
^every(group,attribute)^
^every(group,attribute,value)^
true if every member of the group (such as every child) is true (if two arguments are supplied) or if
every member of the group has a specific value for that argument (if three arguments are supplied).
Always true if there are no examples of that group
^any(group,attribute)^
^any(group,attribute,value)^
true if any member of the group is true (two arguments) or if any member of the group has an attribute
with the specific value (three arguments). Always false if there are no members of the group.
^count(group)^
counts the number of elements in the group
^min(group,attribute[,precision])^
the smallest value in the group.
^max(group,attribute[,precision])^
the largest element in the group
^sum(group,attribute[,precision])^
computes the sum of all elements in the group.
^mean(group,attribute[,precision])^
computes the arithmetic average of the group
Several group codes allow an optional argument, precision; if supplied, it indicates the number of
decimal places desired in the result.
Note that most group codes can also be expressed using ^value^. For instance:
^value(any(children,$IsOverdue))^
An Example Template
110 of 178
Tinderbox v5 Manual
<html>
<!-- Put the title of the note into the browser title bar -->
<head><title>^title^</title></head>
<body bgcolor="#FFFFFF">
<!-- The content (text and images) of the note -->
^text^
<!-- if this note has basic links leading from it, -->
^if(^exists(basicLinks)^)^
<!-- a list of the basic links, formatted as a table -->
^basicLinks(
<table border="2" cellspacing="0" cellpadding="3" width="100%">
<caption><strong>Related pages:</strong></caption>
<tr>,
<td>,
</td>,
</tr></table>)^
<!-- end of the if condition -->
^endif^
<!-- a horizontal rule -->
<hr height="3" width="75%" align="center">
<!--some export and credit information -->
<cite>This page was last modified on ^value(format($Modified,"*"))^,
by ^value($Creator)^,
and was exported to HTML on ^value(format(date("today"),"*")^
using ^version^</cite>
</body>
111 of 178
Tinderbox v5 Manual
</html>
112 of 178
Tinderbox v5 Manual
Complex Pages
Tinderbox has a very powerful facility for building Web pages built out of many notes. This is useful
because even a simple personal page might have links to archives on the left edge, recent articles
on the right, a headline at the top, and daily updates in the center.
Tinderbox could build such a page by gathering each article (each one a separate note) and sorting
them by date. If you decide that sorting by title would be more useful, it's an easy change. If you need
to revise the entry for one article, just open that note. By keeping notes separate from layout,
Tinderbox helps focus your attention and keeps things simple.
This feature, particularly when combined with the power of agents, is a very powerful way to create
dynamic Web content. Tinderbox agents can build lists automatically, scanning your document
continuously for notes that fit criteria of interest. One agent might look for new notes, another might
look for anything marked Urgent, a third agent might search for old notes that have not yet been
acted upon. All these lists could then appear in separate sections of a project page or dashboard.
To build a web page from many notes, you'll create or use HTML export templates which pull lots of
notes together into a page Web page, and control exactly how the pieces fit together.
^children^
This ^children^ code tells Tinderbox to include the children of the current note or agent in the
current Web page. A template is applied to each child before it is added to the page. If a template is
specified in the markup
^children(myTemplate)^
that template is used for every child. If no template is specified
^children^
each child note's $HTMLExportTemplate is used.
Using ^children^ in an agent’s export template is a very powerful way to create dynamic Web
content. An agent’s children are aliases of all the notes that satisfy its criteria. An agent could gather
all the notes that have been added since a certain date, or that belong to a certain category, and use
^children to export all of them as a list .
^children^ ^children(template)^ ^children(template, count)^
The argument template should designate a template note, a built-in template, or an external export
template file. This this will be applied to each child in turn, regardless of the child's own template.
If supplied, a second argument, count, specifies the maximum number of children to be exported.
Tip:the template file used by ^children^ will be very different from a template file
intended to export a single note. Since the children are being included in a single Web
page, the children’s template file should not include opening and closing codes such
as <html>, <head>, and <body>. The children’s template is often very
brief, containing only the code to make the desired elements from each child appear
correctly in the context of the overall Web page.
In older versions of Tinderbox, ^children^ was called ^justChildren^. Whilst the old name continues
to function, the new name is clearer and the old form is deprecated. A new code ^descendants^,
replaces the previous function of ^children^.
^include^
113 of 178
Tinderbox v5 Manual
The ^include^ template code includes a specified note in the Web page for the current note.
^include^ adds a single note, but that note's export template may include other notes as well. It's
common to ^include^ several different notes in the same template.
Be careful not to ^include^ a note in itself!
^include( note_name [, template])^
From v5.9.2, ^include^ offers the alternative of including the output of a group of notes rather than a
single note. For this, pass in a list of Paths, or do this dynamically via find(), collect() or collect_if() or
such operators.
The argument note_name designates which note is to be included. The optional argument template
should be the name of an HTML template file.
If you do not specify a template, the note is formatted using the HTML export template assigned to
the note in its $HTMLExportTemplate attribute.
^randomChildOf^
This template code allows you to include a randomly selected child of a specified note. The syntax is
very similar to the syntax for ^include^ and ^children^:
^randomChildOf( note[, template])^
The argument note designates the note whose random child is to be exported. The optional
argument template should be the name of an HTML template file; if no template is specified, the
note’s own template is used.
Format strings
L: local time, in long format, using the system format settings (example: Tuesday, April 29, 2003.)
l: local time, in short format, using the system format settings (example: 4-29-03)
d: day of the month (example: 29)
D: formats date 01-31, with leading zero
m: number of month (example: 4)
M: abbreviation of month (example: Apr)
MM: name of month (example:April) w: abbreviation of weekday (example: Tue)
M0: formats month numerically 01-12, with leading 0
W: name of weekday (example: Tuesday)
114 of 178
Tinderbox v5 Manual
Comparing dates
Tinderbox automatically records two dates as read-only attributes: $Created (the date and time when
a note was first made), and $Modified (the date and time when the note was most recently changed).
Notes that use AutoFetch notes also record $LastFetched. You can create your own date attributes,
too; for example, $Published might be the date when a note was first added to the public version of
your Web site.
115 of 178
Tinderbox v5 Manual
Tip: Radio Userland users must enable remote Internet access in Radio Userland
Preferences, and must enable the Blogger API. These may be off in default
installations.
116 of 178
Tinderbox v5 Manual
If notes for these posts already exist, their contents will be updated to match the weblog.
Warning: you will lose any changes you have made to these notes. New notes will be
made for any weblog posts for which corresponding notes do not currently exist. (If
the document already contains notes posted to the weblog, the newly created notes
will appear in the same container. Otherwise, the newly-created notes will appear at the
top level of the document.)
Pinging
Tinderbox can "ping" Web services such as and weblogs.com from Tinderbox to announce that your
site has been updated., This helps notify other systems of the change. If you upload your site by FTP,
you should ping after uploading revised files.
To enable pinging
117 of 178
Tinderbox v5 Manual
Exporting text
To export the text of all or some of the notes in your Tinderbox document,
Select a note
Choose New Nakakoji View from the View menu (⌘⌥N)
Select a text export template, to describe how the text should be exported
Choose how much of the document should be exported—which note or notes, or the entire
document
Export the text.
Text export templates are much like HTML templates; they describe the framework for exporting a
note and provide placeholders for information each note supplies. Most text export templates are
very simple.
For each exported note, Tinderbox copies the text export template to the output file. Placeholders are
replaced with information from the note. For example:
^title^
is replaced by the note’s title,
^text^
by the note’s text, and
^value($theAttribute)^
by the value of theAttribute. Most of the placeholders described in HTML Export may also be used in
text export, but these are less often necessary—or inappropriate.
There is seldom need to use ^include^ or ^children^ in text export, since text export provides
implicitly exports all the descendants of a note or the entire document.
Nakakoji View
Nakakoji views are named for Prof. Kumiyo Nakakoji, who, with Yasushiro Yamamoto, was the first to
implement a continuous text view of all the text in a hypertext.
A Nakakoji view window shows you how the text in the selected note (or document, or portion of the
document) would be exported with the chosen text export template.
In this window you can:
118 of 178
Tinderbox v5 Manual
The radio buttons at the left of a Nakakoji view window choose how much of the document to export
(and show in the window):
Entire document:
[Name of note] and contents: export the text in the selected note and its descendants—the
notes it contains, the notes they contain, and so on.
Selected notes: export the text in the currently-selected note or notes.
Path: export the text in the selected note, and all notes linked to it by a chain of links of the link
type you choose. The popup menu lists all the link types used in the document.
The popup menu at the top center of the window lets you choose which template should be used
when exporting to text. Choose a file name from the popup menu, which lists all the export template
notes, the built-in templates, and the files in the document’s text export templates folder.
The same text export template is applied to all exported notes.
To Export: press the Export button to export the text of the note (or notes or entire document).
119 of 178
Tinderbox v5 Manual
Preferences
Preferences control aspects of how documents appear and Tinderbox behaves on your computer.
Document Preferences apply only to the document that is open. Choose Document
Preferences... from the Edit menu or press ⌘-8
Tinderbox Preferences apply to newly-created documents. Choose Tinderbox Preferences...
from the Edit menu.
Tinderbox Preferences also controls Tinderbox’s behavior when no documents are open — for
example, whether Tinderbox shows the introductory screen or creates a new document at startup.
Preference Panes
General: Enter your username and choose whether to open new notes immediately, have the toolbar
be initially visible, enable auto-save and auto-backup of documents, re-open the last used
document, show dialog at startup.
Text: Alter margins, paragraph spacing, fonts, text size and alignment, text color, background color,
width, and height. Choose whether to magnify fonts, remember window positions, keep windows
open, magnify pictures, frame text links, or have colored text links (and if so, choose the color of text
links, visited links, and active links).
Title: Choose whether to show titles in text and explorer views. Select background and text color for
the titles, font, size, and alignment.
Maps: These preferences control maps, outlines, and other views. Choose whether to show links,
used curved links, and allow enactment (a short "zoom" animation that shows you what's happening
when you move down into, or up out of, a container). Select the background color and/or apply a
background pattern, and the font and size of note labels; darken the colors used for drawing outline
text; control whether edit-in-place of new notes in major views is enabled.
HTML: Enter your URL (web server) and select your HTML template. Choose whether to export text
links, basic links, hierarchical links, and link types. Choose a format for link images and which
application to open/edit files with. Export paragraphs as prose (paragraph breaks) or poetry (line
breaks). Choose whether exported names end with .html, .htm, or neither. Select the font and font
size used for the HTML View window.
Text Export: Choose your text export template and preferred editor; sets the font preference for text
export display.
Warnings: Choose whether to show warnings about duplicate names and before changing default
values. run linked AppleScripts automatically. Get a warning before deleting notes either always,
never, or only if the note has children.
Ping: (Document Preferences only): Enter the title and URL of your weblog to enable the pinging of
weblogs.com or another server. You may change the default Server and Method, which are set up for
the most popular server as of this writing, or click the Restore Factory Defaults button to return to the
original values.
Weblogs: (Document Preferences only): Set up Tinderbox to post to remote weblogs. User and
Password are those associated with your blog. Other settings (server, WeblogID, Weblog type) will
depend on your remote weblog; see the Web Pages Built of Many Notes chapter for more detail on
remote weblogs.
120 of 178
Tinderbox v5 Manual
Email: If you wish this Tinderbox document to receive email from its own mailbox, enter the login
information for the mail account here.
121 of 178
Tinderbox v5 Manual
Text Pane
Font (especially if your preference is still set to Geneva)
Font size (try 14 or 16pt)
Width and Height (modern screens are bigger)
Maps Pane
Turn on In-Place Editing
Turn on Charts and Outlines Have Darker Colors
HTML Export Pane
Font size (try 14 or 16pt)
Text Export Pane
Font size (try 14 or 16pt)
122 of 178
Tinderbox v5 Manual
Tinderbox Resources
123 of 178
Tinderbox v5 Manual
To Contact Us
Eastgate Systems, Inc.
134 Main Street
Watertown, MA 02472 USA
phone:800-562-1638 +1 617-924-9044
fax:+1 617-924-9051
Tinderbox Forum: http://www.eastgate.com/Tinderbox/forum/
Tinderbox wiki: http://www.eastgate.com/wiki2/
e-mail: info@eastgate.com
Web: www.eastgate.com
124 of 178
Tinderbox v5 Manual
Publishing Notes
Acknowledgements
Tinderbox™ software copyright © 2002-2009 by Eastgate Systems, Inc. All Rights Reserved.
Documentation copyright © 2009 by Eastgate Systems, Inc. All Rights Reserved.
The information in this document is subject to change without notice. Eastgate Systems, Inc., makes
no warranty of any kind regarding this material and assumes no responsibility for errors that may
appear in this document.
Tinderbox™ is a trademark of Eastgate Systems, Inc. Civilized Software is a service mark of
Eastgate Systems, Inc.
Special Thanks for documentation help to: Eric A. Cohen, Jen Muehlbauer, Mark Anderson, and Barry
Webster
Microsoft®, Windows®, Windows NT®, and Internet Explorer® are registered trademarks of
Microsoft Corporation. IBM® is a registered trademark of International Business Machines
Corporation. Apple is a registered service mark, MacintoshTM and AppleScriptTM are trademarks,
and QuickTime® is a registered trademark of Apple Computer, Inc. UNIX® is a registered trademark
of The Open Group.
Other product names mentioned in this document may be trademarks or registered trademarks of
their respective owners. Product names are used for identification only, with no intent to infringe.
Mention of third-party products is for informational purposes only and constitutes neither an
endorsement nor a recommendation. Eastgate Systems, Inc., assumes no responsibility with respect
to the performance or use of these products.
125 of 178
Tinderbox v5 Manual
documentation;
IV) use this program, or permit this program to be used, on more than one computer at any one time.
Non-compliance with any of the above restrictions will terminate this license.
This license is not a sale. Title and copyrights to the program and accompanying documentation and
any copy remain with Eastgate Systems, Inc.
Household License:
You and up to four (4) other persons who occupy the same household may use the program on their
respective computers. "Household" means a person or persons who share the same home,
apartment, condominium or dormitory suite, but shall also extend to student household members
who are primary residents of the household but who reside at a separate on-campus location.
126 of 178
Tinderbox v5 Manual
Appendix 1: Attributes
This appendix lists Tinderbox’s built-in System attributes and describes their program semantics —
that is, their meaning and use within Tinderbox.
Attribute names are case-sensitive. This 'Agentaction' will not be interpreted by Tinderbox as a
reference to the AgentAction attribute. By convention, system attributes start with capitals, are
intercapitalized and capitialize acronyms: 'Border', 'ShadowBlur', 'URL', 'HTMLDontExport'.
In Tinderbox code, an attribute' value is referenced by placing a '$' before the filename. $Name gives
the value of attributed 'Name'. When making offset references to attributes via designators or paths,
there must be no space between the attribute name and the parentheses, $Name("parent") - this is
discussed further in Appendix 3 'Attribute References'.
Agent
AgentAction (action) - describes the action the agent performs, for instance, Color=red
AgentCaseSensitive (boolean) - if true, agent searches are case-sensitive
AgentPriority (number) - the more often the agent runs
AgentQuery (string) - the criterion for which the agent searches
Appearance
Badge (string) - the name of the badge displayed for this note.
Border (number) - the size of a border around adornments and notes. If Border is zero, no border is
drawn.
BorderBevel (string) - if "raised" the border is bevelled; if "normal" the border is a simple outline
(adornments) or bevelled (notes). If "plain" it is a simple outline; if "none" the border is not drawn.
BorderColor (color) - specifies the color of the adornment’s border. The special keyword
"automatic", draws an opaque border in the adornment's natural color. Adornments are otherwise
translucent.
BorderDash (number) - The length of a dashes for dashed borders; a value of 0, the default, gives a
solid line border.
Color (color) - color of notes view.
Color2 (color) - a second color used by the Pattern attribute (see below). In the Inspector, this is
called the “Accent Color”
Opacity (number) - the opacity of the note. Normal opacity is 100; translucent notes have an opacity
of 50.
Pattern (string) - Map view only, fills the face of the note or adornment. Values include "lines",
"gradient", "radial", "diagonal", "cylinder", "bar()", "vbar()"; also - for containers only - values "plot",
"xyplot", and "bargraph".
PlotColor (color) - color used for drawing the plot(), xyplot() and bargraph() patterns for containers
and agents.
Shadow (boolean) – turns drop shadows on or off
ShadowBlur (number) – in pixels, controls the blurriness of drop shadows.
ShadowColor (color) - controls the color of drop shadows
127 of 178
Tinderbox v5 Manual
ShadowDistance (number) – in pixels, the offset distance between the note and its shadow.
Shape (string) – the name of the note's shape. The default shape is a rectangle; other shapes include
"oval", lozenge", "diamond", "left tag". "right tag", "bubble", "cloud", "banner" and "leaf".
Events
Attributes in this category are not presently used by Tinderbox, but are provided for convenience and
to facilitate exchange among Tinderbox users.
DueDate (date) - a date, provided for the user’s convenience
EndDate (date) - a date, provided for the user’s convenience
DateDate (date) - a date, provided for the user’s convenience
TimelineBand (number) - the band number of a timeline view to which an event belongs (numbers
from zero)
TimelineBandLabelColor (color) - color used for drawing band labels
TimelineBandLabelOpacity (number) - opacity value for drawing band labels
TimelineBandLabels (list) - text labels to use for bands in the Timeline view of that container.
TimelineColor (color) - the color used to color every other band of a Timeline view
TimelineEnd (date) -events after this date are listed as "out of range"
TimeLineGridColor (color) - the color used for guidelines in a Timeline view
TimelineMarker (boolean) - controls whether lines from events to the scale are drawn for the
selected event or all events
TimelineScaleColor (color) - the primary color for the Timeline's time scale bar
TimelineScaleColor2 (color) - the secondary color for the Timeline's time scale bar
TimelineStart (date) -events before this date are listed as "out of range"
General
128 of 178
Tinderbox v5 Manual
HTML
129 of 178
Tinderbox v5 Manual
document.
HTMLEntities (boolean) - if true, translates non-ASCII characters like '&' and '¢' into HTML entities.
HTMLExportAfter (string) - what's exported immediately after everything else in the note's text.
HTMLExportBefore (string) - what's exported immediately before a note's opening paragraph
markup.
HTMLExportChildren (boolean) - if true, exports this note's children to HTML when you export the
document.
HTMLExportCommand (string) - Allows you to apply a program or script to each exported HTML file.
The exported file is piped to the standard input of the command line in HTMLExportCommand, and
the file is replaced by command line's standard output.
HTMLExportExtension (string) - the suffix that should be added to the filename for exported HTML
files.
HTMLExportFileName (string) - sets a specific name for a note's HTML file upon export to HTML. If
empty, Tinderbox automatically generates a file name based on the note's title.
HTMLExportFileNameSpace (string) - sets optional replacement character for characters deleted
from $Name when creating $HTMLExportFileName
HTMLExportTemplate (file) - the template that should be used when exporting this note to HTML.
HTMLFileNameLowerCase (boolean) - if true, HTML file names must be in lowercase.
HTMLFileNameMaxLength (number) - maximum length for HTML file names.
HTMLFirstParagraphEnd (string) - the closing tag for a paragraph.
HTMLFirstParagraphStart (string) - the opening tag for a paragraph.
HTMLImageEnd (string) - the end of an image tag.
HTMLImageStart (string) - the start of an image tag.
HTMLIndentedParagraphEnd (string): the closing tag for a paragraph that begins, in Tinderbox, with
a tab character.
HTMLIndentedParagraphStart (string): the opening tag for a paragraph that begins, in Tinderbox,
with a tab character.
HTMLItalicEnd (string) - the closing tag for an italic passage.
HTMLItalicStart (string) - the opening tag for an italic passage.
HTMLListEnd (string) - the closing tag of an unordered list.
HTMLListItemEnd (string) - the closing tag of a list item.
HTMLListItemStart (string) - the opening tag of a list item.
HTMLListStart (string) - the opening tag of an unordered list.
HTMLMarkupText (boolean) - if true, Tinderbox uses HTML markup when exporting text to HTML.
HTMLOrderedListEnd (string) - the closing tag of an ordered list.
HTMLOrderedListStart (string) - the opening tag of an ordered list.
HTMLOverwriteImages (boolean) - can instruct Tinderbox not to overwrite existing images when
exporting.
HTMLParagraphEnd (string) - the closing tag for a paragraph, other than the first paragraph.
HTMLParagraphStart (string) - the opening tag for a paragraph, other than the first paragraph.
HTMLQuoteHTML - (boolean) if true, Tinderbox includes examples of HTML in your text as HTML --
130 of 178
Tinderbox v5 Manual
i.e.,
will appear as
, not be translated into a paragraph break.
HTMLStrikeEnd (string) - the ending tag for an strike-through passage.
HTMLStrikeStart (string) - the opening tag for an strike-through passage.
HTMLUnderlineEnd (string) - the closing tag of underline formatting.
HTMLUnderlineStart (string) - the opening tag of underline formatting.
IsTemplate (boolean) - indicates that the note is intended for use as an HTML or Text Export
template.
Map
Fill (string) - a texture that is applied to the interior of the note. Values include wood, linen, steel, and
sandstone.
FillOpacity (number) - the percentage opacity of the object's Fill or Color/Color2 patterns or solid
color fills
Height (number) - with Width, relative size of notes in the Map view.
HoverExpression (action) - action code for the note's map icon Hover Expression
InteriorScale (number) - the factor by which notes inside a container are smaller than the notes
elsewhere in a map.
LeafBase (number) - the Leaf attributes control the geometry of the experimental Leaf note shape
LeafBend (number) - the Leaf attributes control the geometry of the experimental Leaf note shape
LeafDirection (boolean) - the Leaf attributes control the geometry of the experimental Leaf note
shape
LeafTip (number) - the Leaf attributes control the geometry of the experimental Leaf note shape
Lock (boolean) - if true, the item (adornment or note) can be selected but not repositioned.
MapBackgroundColor (color) - color of the background of the Map view.
MapBackgroundColor2 (color) - accent color of the background of the Map view.
MapBackgroundPattern (string) - pattern for the background of the Map view. Values include
"lines", "gradient", "radial", "diagonal", "cylinder".
MapBodyTextColor (color) - color of the note's body text when displayed in a map view's note icon.
MapBodyTextSize (number) –the font size of the text in which the body text is displayed in map view,
if the note is large enough for body text to be displayed. If MapBodyTextSize is zero, Tinderbox will
choose a suitable size.
MapScrollX, MapScrollY - the relative offset of the interior of the container, when viewed in the
parent’s map view
MapTextSize (number) - the relative size of names in the Map view. Mainly useful for adornments.
Expressed as an order of magnification, so changing this value from 100 to 200 would double the
size (make it 200% of the original).
NameAlignment (string) - whether the title of notes and adornments should be left-justified,
centered, or right-justified. Legal values include "left," "center," and "right".
NameBold (boolean) - if true, uses bold type for note names in maps, charts, and outlines.
131 of 178
Tinderbox v5 Manual
NameColor (color) - the color of the name of the note. If unchanged, a color will be chosen
automatically to contrast with the note color.
NameFont (string) - font of the name of a note in the Map view.
NameLeading (number) - amount of leading between the lines of a wrapped title.
NameStrike (boolean) - if true the object title is struck through.
Sticky (boolean) - if true, objects that overlap the adornment will move when the adornment is
moved.
SubtitleColor ( color ) - Sets the color of map subtitle text.
SubtitleOpacity ( number ) - Sets the opacity of map subtitle text.
SubtitleSize ( number ) - Sets the size of map subtitle text.
TableExpression (action) - an expression used to generate summary tables for containers and
agents. Columns are separated by the vertical bar character, "|".
TableHeading (string) – the column headings for the container or agent summary table. Columns are
separated by the vertical bar character, "|".
TitleHeight (number) - the height of the note’s title bar, if the note is an agent or container.
TitleHeight is expressed in map units, like Xpos and Height. If TitleHeight is zero, the height of the
title bar is calculated automatically.
TitleOpacity (number) - Sets the opacity of the $Name label.
Width (number) - with Height, relative size of notes in the Map and other views.
Xpos (number) - with Ypos, coordinates of the note in the Map view (in the same units as Width and
Height).
Ypos (number) - with Xpos, coordinates of the note in the Map view (in the same units as Width and
Height).
Net
AutoFetch (boolean) - if true, automatically fetches content from the web into this note.
AutoFetchCommand (string) - typically invokes an outside program, perhaps fetching some
information from the user's hard disk or network.
LastFetched (date, read-only) - when a note was last updated from the Web.
RawData (string) - contains a copy of AutoFetched information without ant further processing.
RSSChannelTemplate (file) - the template used for RSS channels when importing (AutoFetching) an
RSS feed.
RSSItemLimit (number) - how many items to import from other people's RSS feeds. The default
value, 0, means "import all items".
RSSItemTemplate (file) - the template used for RSS items when importing (AutoFetching) an RSS
feed.
URL (URL) - the URL used if this note fetches its content from the web.
ViewInBrowser (boolean) - if true, opening a text window indicated by the URL attribute on this note
will also open the Web page in your browser.
Outline
132 of 178
Tinderbox v5 Manual
People
The attributes for People are string attributes provided for convenience and consistency. Some of
these attributes are automatically populated when importing vCards and address book pages.
AIM (string)
Address (string)
Email (string)
FullName (string)
Latitude (number)
Longitude (number)
Organization (string)
Telephone (string)
Twitter (string)
Simplenote
Sorting
Sort (string) - the primary sort order for notes, such as alphabetically by title.
SortAlso (string) - if two notes have equal Sort values (like the same title), Tinderbox uses SortAlso as
a secondary sort key such as date of creation.
SortAlsoTransform (string) - sorts string attributes’ secondary sort order as “normal” (case-
sensitive), case-insensitive, or “last word” (sorts on the last word of the element).
SortBackward (boolean) if true, the notes will be sorted backwards, for example, Z before A.
SortBackwardAlso (boolean) if true, the notes' secondary sort order will also go in reverse, for
example, oldest notes first.
133 of 178
Tinderbox v5 Manual
TextFormat
AutomaticIndent (boolean) - if true, text lists beginning with *, •, and # are automatically indented.
KeyAttributes (set) - separated by semicolons, the names of especially significant attribute-value
pairs that are displayed at the top of the text window.
KeyAttributeFont (string) - if supplied this font is used instead of $NameFont (from the Map group) to
draw the titles and values of the key attributes table in note text windows.
LeftMargin (number) - the size, in multiples of nine pixels, of the left margin.
LineSpacing (number) - adjusts the space between lines within a paragraph. Expressed as a
percentage; 100 is "standard" line space while 200 would be "double-spaced".
NoSpelling (boolean) - if true the note is excluded from continuous spellcheck.
ParagraphSpacing (number) - the amount of space (4, 6, 10, 12, 14, or 16 pt, or none) before and
after paragraphs.
RightMargin (number) - the size, in multiples of nine pixels, of the left margin.
ShowTitle (boolean) - if true, the title of the note is drawn prominently at the top of the text window.
Tabs (string) - a semi-colon delimited list of intervals between tab stops, measured in inches.
TextAlign (string) - the alignment of rext within a text windwo or Map icon
TextBackgroundColor (color) - the color of the background of a note's main text section.
TextColor (color) - the normal color for body text.
TextFont (string) –the default or “plain” font for this note. The default value of TextFont is set in the
text pane of Document Preferences. It is often useful to allow a class of related notes to inherit a
specific TextFont from their prototype, in order to give a PhoneMessage or GroceryList a distinctive
appearance.
TextFontSize (number) –the default text size for this note. The default value of TextFontSize is set in
the text pane of Document Preferences.
TextSidebar (boolean) - true if a note’s sidebar should be visible, and false if it should be hidden.
TitleBackgroundColor (color) - controls the background color of the title pane in text spaces;
defaults to Text settings in the Preferences dialog.
TitleFont (string) - the font for the title displayed if the ShowTitle attribute is set to true.
TitleForegroundColor (color) - controls the foreground color of the title pane in text spaces; defaults
to Text settings in the Preferences dialog.
Textual
ReadOnly (boolean) - if true, you can't modify the text in this note. It makes sense to set this to true
for notes that fetch their contents from the web.
Text (string) - the body text of the note.
TextExportTemplate (file) - which text export template the note uses.
TextLength (number) - the character length of the note's text WordCount (number, read-only) - the
number of words in the note's text.
134 of 178
Tinderbox v5 Manual
Weblog
135 of 178
Tinderbox v5 Manual
Wildcard Characters
Character Ranges
136 of 178
Tinderbox v5 Manual
will match any digit. Ranges of consecutive characters can be written more concisely:
[0-9]
will match any digit, and
[A-Z][a-z]*
will match any capitalized word. Beginning a set with the character “^” matches everything except
the set;
[A-Z][^0-9]
will match any capital letter provided it’s not followed by a digit.
Several special sequences represent common sets of characters:
\w - any word character (including underscore)
\W - any non-word character
\< - the start of a word
\> - the end of a word
\s - any white space character
\d - any digit
\l - any lowercase letter
\u - any uppercase letter
Anchors
The special character "^" matches the beginning of the text or attribute being searched. When
searching the text of a note, ^ matches the beginning of any paragraph in the note.
The special character “$” matches the end of the text or attribute being searched. When searching
the text of a note, $ matches the end of the paragraph in the note.
The backslash character "\" removes the special meaning from the character that follows it. Use "\\"
to search for the backslash character itself.
Parentheses
137 of 178
Tinderbox v5 Manual
If it finds any matching notes, the agent extracts the word that follows the string “Color: ” and
changes the note’s color to match. Here, $1 stands for “whatever matched the first set of
parenthesis”, $2 for the second set, and so forth. $0 stands for the entire matched string.
138 of 178
Tinderbox v5 Manual
OnAdd
Rule
DisplayExperession
HoverExpression
TableExpression - containers and agents only
AgentAction - agents only
AgentQuery - agents only
Text - for more complex use (for more expert users!), it is possible to store larger sections of
action code in the Text to then be applied in the context of one of the above.
Action code is case-sensitive; “Red” and “red” are distinct, 'Descendendfrom()' can not be
substituted for the correctly cased 'descendedFrom()'. Action code functions are generally lowercase
and inter-capitalized.
Action code functions are normally followed by parentheses. There must be no whitespace between
the end of the function and the parentheses:
RIGHT any(children,$overdue)
WRONG any (children,$overdue)
If so noted, some action code functions allow the parentheses to be omitted. If in doubt, simply
include a pair of empty parentheses on the end of the function.
Strings in actions and rules may be enclosed in either single or double quotes. By general convention
- i.e. as seen in most examples - double quotes are used as first preference, but that is not a
requirement.
Attribute Types
Each attribute has a type, which determines what kind of information it contains.
boolean
color
date
file
number
list
set
string
url
139 of 178
Tinderbox v5 Manual
Lists and sets are collections of string values, such as tags or topics. Each item in a set is unique,
while a list might contain the same element several times.
When Tinderbox assigns a value to an attribute, that value is coerced to the appropriate type. If you
assign a string to a color attribute, for example, Tinderbox will try to interpret the string as a color.
$BorderColor="rgb(200,150,120)"
Some operators hav different meanings when acting on different types of data. For example, "+"
adds numbers but concatenates strings:
$Total=$BasePrice+$Tax; (result: 17.95)
$Name=$Topic(parent)+":"+$Topic; (result: Waterfowl:Loons)
In an assignment, the governing type is the type of the left-hand side.
In an expression or a query, the governing type is the type of the left-hand operand (for binary
operators like +) or the sole operand (for unary operators).
Attribute References
Attribute references retrieve the value of an attribute. The attribute name is preceded by a '$', and
followed by an optional argument to designate which note is to be referred to.
$Height
$Color(parent)
Attribute references normally refer to this note, but may refer to another note by its unique name
$Price(My Wonderful Red Widget)
or a path to the note
$Text(/catalog/widgets/red/wonderful/price)
Note Designators
Attribute references usually refer to this note, but you may instead specify a different note. For
example, $Width is the width of this note, but $Width(parent) is the width of this note's
container, and $Width(/data/example) is the width of the note named "example" inside the
top-level container named "data."
A number of keywords, called designators, let you designate a note by its relationship to this.
140 of 178
Tinderbox v5 Manual
In aliases, refers to the original note associated with the alias and
useful for addressing properties of the original such as $Xpos
original
and $Ypos that are not inherent to the alias. Otherwise
synonymous with this.
Group Designators
Some operators accept a group designator that designates multiple notes. For example,
any(child,$Checked) is true if the $Checked attribute of any of this note's children is set to true.
Group designators include:
141 of 178
Tinderbox v5 Manual
find()
The special designator find() searches through the entire Tinderbox document to locate notes that
satisfy an expression. For example:
$Color( find($Status="Urgent"))="red"
will locate every note whose $Status is "Urgent" and turn is red.
The find() designator acts in many ways like an agent. In general, prefer agents to using find(),
because the agent’s results can be reused by other agents.
Queries
Agents use a query expression to locate notes they should list, and smart adornments use a query
expression to identify notes they should gather. The conditional expression
if(expression){...} uses an expression to conditionally execute an action.
The following values are treated as "false":
the empty string ""
the number 0
the date "never"
the constant "false"
the color black (rgb(0,0,0) or #000000)
All other values are considered "true".
An attribute reference may stand alone as a query. For example, if Urgent is a boolean user attribute,
the query
$Urgent
finds all urgent notes.
If the attribute is a string, the query is true if the string is not empty and not the string "false".
If the attribute is a number, the query is true if the value is not zero.
If the attribute is a date, the query is true if the value is not "never".
If the attribute is a list or a set, the query is true if the attribute is empty
Comparisons
142 of 178
Tinderbox v5 Manual
$Color=="red"; OK
$Color(this)=="red"; OK
$Color(parent)=="red"; OK
The right-hand side of a comparison may be a number, a string (which should normally be enclosed
in quotation marks), or an attribute reference.
An attribute reference is an attribute name, optionally followed by an argument that designates a
specific note. If the argument is absent, this is assumed.
$Color=="red"
$Color==$BorderColor
$Color==$Color(parent)
Parenthesis may be used to group multiple queries together, using logical operators &(and), | (or), and
! (not).
Text Patterns
Regular expressions can be used to search for text patterns in any attribute. Regular expressions are
most frequently used to search for strings or patterns in the note’s $Text and $Name. A regular
expression query begins with the name of an attribute, followed by a parenthesis containing the
pattern:
Text(pattern)
Note that the '$' prefix is not used in regular expressions. $Text(parent) is the text of the note's parent,
whilst Text(parent) is a regular expression.
Regular expression queries may also be written using the .contains() operator:
$Text.contains(pattern)
The query is true if the attribute contains the text pattern. A variety of wildcards and other special
characters let you search for complex textual patterns; see Appendix 2 (Regular Expressions) for
details.
Other Queries
143 of 178
Tinderbox v5 Manual
Actions
An action changes the value of an attribute. For example,
$Color="red"
sets the color of this note to "red".
Actions may be combined, setting them apart with semicolons.
$Color="red";$BorderColor="bright red"
If the right-hand side of the action is empty, the attribute will be restored to the value it inherits from
its prototype, or to the default value.
$Width=;
The assignment operator |= assigns a new value to an attribute only if the attribute does not currently
have a value. For example, the action
$Project |= $Project(parent)
will set a note's project to be the same as its parent's project, provided the note doesn't already have
a project.
For boolean attributes, |= performs the assignment if the current value is false. For string attributes
and set attributes, |= performs the assignment if the current value is empty. For numbers, |= performs
the assignment if the current value is zero. For dates, |= performs the assignment if the current value
is "never".
The assignment operator &= assigns a new value to an attribute only if the attribute already has a
value.
Conditional actions can perform any query before proceeding, and make their action contingent
upon that query.
if(query){ action }
if(query) { action } else { action }
Normally, actions save results in the note’s attributes. On occasion, it might be useful to save an
intermediate result temporarily. The var statement
144 of 178
Tinderbox v5 Manual
var x;
var area($Width*$Height)
declares a local variable which may be used for the duration of the current action.
For example:
var area($Width*$Height);if(area>25){$Color="red"}
would make the note red if its area exceeded 25.
When agents search for regular expressions, the agent saves substrings that match parenthesized
sub-expressions. These substrings or back references can be used in actions, and are especially
useful for automatically extracting information from notes.
For example, an agent might search for notes that contain fields like this:
From: Henry Higgins
by searching for the pattern
From: (.+)$
An action can then refer to the name extracted following "From: " as $1
$Author=$1;
The author will now be set to Henry Higgins. Subsequent subexpressions may be referred to as $2,
$3, and so on.
String Functions
String Operators
145 of 178
Tinderbox v5 Manual
String.lowercase() - returns a copy of the string, transforming all capital letters to lower case.
String.paragraphs(N) - returns first N paragraphs of the string.
String.replace("pattern","replace"[,"replace"]) - If the regular expression "pattern" is found in the
string, the matching portion of the string is replaced by the replacement string. Additional arguments
allow replacement of multiple sub-expressions assuming extra back-references are created by
"pattern".
String.reverse() - reverses the order of the values in the string.
string.size() - the number of characters in the the string.
String.split("pattern") -splits a string into a list, dividing the string at designated "pattern"; the
matched "pattern" characters are discarded.
String.substr(start,length) - extracts substrings form the string, starting at character number start
(zero-based) and including up to length characters.
"Hello, world".substr(0,5): Hello
If the second argument is absent, the result runs from start through the end of the string.
"Hello, world".substr(7): world
If start is negative, the substring begins -start characters from the end of the string.
"Hello, world".substr(-5): world
String.toNumber() – converts a string of digits to the corresponding number. If the string is empty,
toNumber() returns zero. If the string cannot be parsed as a number, the result is undefined.
String.tr("character","replacement") - replaces every occurrence of a "character" with a
"replacement" character.
"Hello, world".tr(w,W) : Hello, World
Multiple characters may be replaced at once:
"Hello, world".tr("aeiou","AEIOU"): HEllO, wOrld
If no corresponding character appears in the replacement string, the matched character is deleted.
"Hello, world".tr(aeiou): Hll, wrld
String.uppercase() - returns a copy of the string, transforming all lowercase letters to upper case.
String Operations
format()
format(value,format_string) converts attributes to strings and lets you choose exactly how you
prefer the data to appear. format() is useful for export and for preparing data for other programs and
Web services through runCommand.
The argument value is usually an attribute reference or expression. For example:
format($Created,"L")
gets the note's creation date and formats it as a "long local date" such as "Sunday, March 23, 2007
1:26pm".
The meaning of format_string depends on the type of object represented by value.
If value is a date, the format string is the same as the format used by Tinderbox's date export codes.
146 of 178
Tinderbox v5 Manual
If value is a list or set, the format string is the delimiter used to separate discrete list elements
format($KeyAttributes,",")
converts key attributes to a comma-separated list. Optionally, you may supply four quoted string
arguments besides value to format the set as an HTML list:
format(value,list-prefix,item-prefix,item-suffix,list-suffix)
For example
format($MyList,"<ul>","<li>","</li>","</ul>")
If value is a number, then the arguments are numeric and interpreted as follows:
format(value,precision, width)
For example, if $MyNum is 3.1415927, then
format($MyNum,2,7) is " 3.14"
format($MyNum,2) is 3.14
format($MyNum,0) is 3
In quoted string arguments here (as elsewhere), \" is converted to a quotation mark, \n to a carriage
return, and \t to a tab.
string encoding
147 of 178
Tinderbox v5 Manual
Templates chapter of this manual and Appendix 4.
Numeric Functions
The familiar mathematical operators + - * / operate on numeric expressions in the expected way.
Note that + and - have different meanings when applied to sets, and that + has yet another meaning
(concatenation) when applied to strings.
Mathematical Operators
In the following operators, the expression parameter may be an attribute reference, a literal number
value or a code expression.
sum(group,expression) computes the sum of a series of expressions. For example,
sum(child,$WordCount)
computes the total word count of all the children of a note. 'group' may be any group designator
{children,descendants,sibling,ancestor,all}. In addition, 'group' may take a single argument that
designates a particular note other than this; for example
sum(children(/agents/books),$TextLength)
sum_if(group,condition,expression) computes the sum of the values for expression for each item in
the group, ignoring any notes for which if condition is not true. For example:
sum_if(children, $Checked, $Price)
totals the prices of all the note's children which have been checked.
avg(group,expression) computes the mean of a value computed separately for each note in the
specified a group.
avg_if(group,condition,expression)
computes the sum or the mean of a value computed in each note for a group that meets the
designated condition. For example:
148 of 178
Tinderbox v5 Manual
sum_if(child,$Checked,$Qty*$Price)
avg_if(child,$Checked,$Qty*$Price)
compute the total price and the average price of checked items that are children of this note.
Color functions
Color Operators
Color.red
Color.green
Color.blue
Three read/write properties allow the individual RGB color channel values to be read or set. The read
value is always a number (0-255). Values may set using a number 0-255 or a hex number string "#00"
- "#ff".
$MyNumber=$Color.red
$Color.red = 255
Color.brightness - Read/write property allows a color's brightness level to be read or set using a
value in the 0-100 range representing a percentage. Replaces brightness() action.
Color.saturation - Read/write property allows a color's saturation level to be read or set using a
value in the 0-100 range representing a percentage. Replaces saturation() action.
Color.hue - Read/write property allow a color's hue to be read or set using a value in the 0-360 range
representing a a circular degree. Replaces hue() action.
149 of 178
Tinderbox v5 Manual
RGB colors of the form RGB(red,green,blue) use decimal colors from 0 to 255 to describe the
proportion of red, green, and blue in the color.
HSV colors of the form HSV(hue,saturation,value) describe the hue, saturation, and value of the color.
Hue is a color wheel angle, in degrees, running from 0 to 360. 0 corresponds to red, 120 to blue, and
240 to green. Saturation and value run from 0 to 100. THe value is the equivalent to brightness in
HSB(hue, saturation, brightness)
Manipulating Colors
rgb(red,green,blue) -creates a color. Its arguments are integers ranging from 0 to 255. Arguments
may also be expressions or attribute references.
$Color=rgb($MyRed,255,255)
brightness(color,value) - returns a modified color that has the same hue and saturation as the
original color, but that has reduced brightness. The range of value is 0 to 100.
brightness(color) - returns the brightness of a color, as a numeric value from 0 to 100.
saturation(color,saturation) - returns a modified color that has the same high and brightness as the
original color, but has a reduced saturation as a numeric value from 0 to 100.
saturation(color) - returns the saturation of a color, as a numeric value from 0 to 100.
hue(color,value) - returns a modified color that has the same brightness and saturation as the
original color, but has a different hue. The range of value is 0 to 360.
hue(color) - returns the hue of a color, as a numeric value from 0 to 360.
Date Functions
Date Properties
Seven read/write properties are provided allowing various aspects of data/time data to be read or set.
Date.day (1-31)
Date.month (1-12)
Date.year (value of year)
Date.hour (0-23)
Date.minute (0-59)
Date.weekday (1-7) Monday = 1, Sunday = 7. Read-only
If the Date is never, all functions return 0 (zero).
Date Operators
Date.format("format-string") converts a date to a string, using the quoted date format string
described in Appendix 5: Date Formats. For example, $DueDate.format("l") will format the
value of $DueDate using the system’s short date format.
date(year,month,day,hour,min) constructs a date from individual numeric elements — useful, for
example, if you need to assemble a date from separate attributes. year is the 4-digit year, month is a
number from 1-12. The time arguments are optional, and are specified in a 24-hour clock.
150 of 178
Tinderbox v5 Manual
days(date1,date2) returns the number of days that elapsed between date1 and date2, as a number.
If date2 is the earlier date, the result is negative. The internal comparison includes the time portion
of the date. thus if 2 dates are 1 day apart but the times are less than 24 hours aport, the result is 0
and not 1 as might be expected.
minutes(date1,date2) returns the number of minutes that elapsed between date1 and date2, as a
number. If date2 is the earlier date, the result is negative.
A List is a list of strings or tags separated by semicolons. A Set is a special type of List where
duplicate values are not allowed. A given tag can appear in a set at most once; duplicates are
automatically removed, whereas a List allows duplicates. The order of elements in a set is not
significant. A List can be sorted, a set cannot.
Two Lists or Sets are equal if they contain the same tags (unique values) - regardless of the presence
151 of 178
Tinderbox v5 Manual
152 of 178
Tinderbox v5 Manual
entries are not copied. Note that all items in a Set are, by definition, unique.
List Operations
Several functions are useful for extracting notable elements from sets and lists. In the following, the
list argument implies set or list data.
count(list) returns the number of tags in list
max(list) returns the largest tag in list
min(list) returns the smallest tag in list
If max(list) or min(list) is evaluated in a numerical context, numerical comparison is used. Otherwise,
Tinderbox uses lexical comparison.
The mathematical functions sum(), sum_if() and avg_if() take a group scope (i.e a list of $Paths) so
can be used with lists - see Numeric Functions further above.
Several functions construct lists from a group of notes.
collect(group,expression) builds a list by visiting each note described by group and adding the
value of the designated attribute to the list. For example,
collect(children,$Name)
constructs a list with the name of each child of the note.
group may be any of {children,descendants,sibling,ancestor,all}. In addition, group may take a path
modifier; for example
collect(children(/agents/books),$Name)
expression can be any expression, but is typically an attribute.For example,
collect(children,$Name)
collect(children,$Width*$Height)
collect_if(group,condition,expression) constructs a list by collecting all the notes corresponding to
group, testing each note to see if it meets condition, and adding the expression to the set for each
such note. For example
collect_if(children,$Status="Important",$Name)
will construct a set of the names of all of this note's important children.
Should a unique list of values be required, pass the output to a Set-type as this will de-dupe the
results.
find(query) is equivalent to
collect_if( all, query, $Path)
Note that collect_if is related to agents; many tasks you might perform with collect_if can be done as
well, or better, with an agent. The results of an agent can be reused by other agents, while find() and
collect_if() need to start from scratch each time they are run.
values("attribute_name") returns a set of unique values stored in that attribute throughout the
document. If the attribute is a set or a list, values() returns a set of unique elements used throughout
the document; if the attribute is a any other type, values() returns each of the distinct values in use.
Logic functions
153 of 178
Tinderbox v5 Manual
Logical Operators
Boolean operators & (and), | (or), and ! (not) operate as expected. Boolean assignment (and queries)
coerce non-boolean attributes to either to or false.
string "" and "false" are false, other values are true
color "black" (or RGB(0,0,0) or "#000" or "‹000000") is false, others are true
Use == to equality and != to test inequality. The older form of using a single equals sign (=) for an
equality test is now deprecated (and may cease to function as expected).
A direct reference to an attribute of any data type can be be used as Boolean test for a (non-zero
value):
$MyString is the same as testing $MyString!=""
!$MyString is the same as testing $MyString==""
$MyNumber is the same as testing $MyNumber!=0
!$MyNumber is the same as testing $MyNumber==0
$MyDate is the same as testing $MyDate!=never
!$MyDate is the same as testing $MyDate==never
Action, File, List, Set and URL data types conform to the String type test above as their data is just a
particular form of string.
Logical group operators examine a group of notes and determine whether every note in the group
meets a criterion, or if any note does.
every(group,expression)
any(group,expression)
The designator group describes the notes to be examined. group may be any of
{child,descendant,sibling,ancestor,all}. In addition, group may take a single argument that
designates a particular group other than this; for example
collect(children(/agents/books),$Name)
The expression may be any valid expression, but is most often a reference to an attribute.
any(children,$overdue)
every(children,$status="important")
154 of 178
Tinderbox v5 Manual
Link Functions
Link Operators
Making Links
155 of 178
Tinderbox v5 Manual
Macros
Macro Operator
Rules and actions may use macros through the do() function:
do(macro[,arg1,arg2,arg3])
macro is the name of the macro. Subsequent arguments are optional and are passed to the macro,
which can refer to them as $1, $2, $3, and so forth.
After the macro is evaluated, its result is returned and is parsed again as a rule, action, or expression.
For example:
$Name=do(computeName,$Name,$Name(parent))
sets name to the result of a macro.
do(Instructions);
simply executes whatever actions are returned by Instructions.
The eval() function evaluates an string and returns the result. For example,
eval("$Price*1.05")
returns the value of price augmented by 5%. Similarly, action() performs an action stored in a string.
action("$Total=$Price*1.05")
changes the value of $Total. action() and eval() are occasionally useful when a note must assemble a
rule on the fly.
Shell Expressions
Shell Operator
The runCommand() function asks the operating system to start a new process and results the result
of that process.
$Text = runCommand(command_line, input)
runCommand() executes the specified command line in your default, passing it the the value input as
its standard input. The standard output of the command, if any, is the value of the completed action.
For example:
$Text = runCommand(ls ~/Documents)
replaces the note’s text with a list of the files and folders in the user’s Documents folder, and
$Text |= runCommand("curl "+$URL)
will – if the note has no text – ask curl to fetch whatever text is found at the url stored in the note’s
$URL.
It is not necessary to use an attribute to hold the output from runCommand, allowing the operator to
be used 'bare' in action code. If $CommandValue holds a valid command line string, this can be
used in a rule or action:
156 of 178
Tinderbox v5 Manual
used in a rule or action:
runCommand($CommandValue)
Backtick. If the right-hand side of an action begins with the character `, the rest of the action is
treated as a command that is passed to the Mac OS X command line.
This Tinderbox feature is deprecated, and we believe there are now
better ways to accomplish its purpose. It is discussed here to
assist those working with older document. If your Tinderbox work
uses this feature, we recommend updating it.
For example,
$Text=`perl -v
would replace the note's text with the a string describing the version of perl installed on this
computer. More usefully,
$Text=`curl http://example.com
would set the text to whatever information is available at the stated URL.
Template actions
Template expressions in actions are now deprecated. If you wish to use a template expression to
construct a complex string, exportedString() would be a better approach.
If the right hand side of an action begins with the character ^, the rest of the action is interpreted as a
template expression. For example,
$Msg=^ See ^value($Name(parent))^’s son ^value($Name)^;
The use of template expressions in actions was formerly common but is now seldom if ever
necessary.
Export template markup is primarily used for exporting Tinderbox information to HTML or XML, but it
may also be used in actions. This feature was formerly popular, but is now seldom useful. Use of
export codes in actions is now deprecated.
Export codes are introduced by a caret (^) following the = sign. The remainder of the expression, up
to the next semicolon or the end of the action, is interpreted as an export template. The following
example works but is deprecated:
$MyString=^ Note ^get(Name)^: ^linkTo(/someNote)^;
If you wish to use the template mechanism to construct a complex string, a cleaner approach is the
exportedString function.
exportedString(note,templateFile)
exportedString(note,templateString)
The first form of exportedString takes a reference to a note and the name of a template note or
template file, and returns the result of applying the template to the note. The second form requires no
template; instead, its second argument is itself the template's code string.
exportedString(this,"^value($Name(parent))^")
157 of 178
Tinderbox v5 Manual
or
exportedString(this,$MyTemplate)
In the second example, the $MyTemplate attribute would hold export code.
For more information about HTML Export and markup Tinderbox uses for this process, see the HTML
Templates chapter of this manual and Appendix 4.
If the right-hand side of the action is empty, the attribute will be restored to the value it inherits from
its prototype, or to the default value.
$Width=;
Conditional Assignment
The assignment operator |= assigns a new value to an attribute only if the attribute does not currently
have a value. For example, the action
$Project |= $Project(parent)
will set a note's project to be the same as its parent's project, provided the note doesn't already have
a project.
For boolean attributes, |= performs the assignment if the current value is false. For string attributes
and set attributes, |= performs the assignment if the current value is empty. For numbers, |= performs
the assignment if the current value is zero. For dates, |= performs the assignment if the current value
is "never".
The assignment operator &= assigns a new value to an attribute only if the attribute already has a
value.
If()
Conditional actions can perform any query before proceeding, and make their action contingent
upon that query.
if(query){ action }
if(query) { action } else { action }
Local variables
Normally, actions save results in the note’s attributes. On occasion, it might be useful to save an
intermediate result temporarily. The var statement
var x;
var area($Width*$Height)
declares a local variable which may be used for the duration of the current action.
For example:
var area($Width*$Height);if(area>25){$Color="red"}
would make the note red if its area exceeded 25.
158 of 178
Tinderbox v5 Manual
Back References
When agents search for regular expressions, the agent saves substrings that match parenthesized
sub-expressions. These substrings or back references can be used in actions, and are especially
useful for automatically extracting information from notes.
For example, an agent might search for notes that contain fields like this:
From: Henry Higgins
by searching for the pattern
From: (.+)$
An action can then refer to the name extracted following "From: " as $1
$Author=$1;
The author will now be set to Henry Higgins. Subsequent subexpressions may be referred to as $2,
$3, and so on.
String Functions
String Functions
String Operators
159 of 178
Tinderbox v5 Manual
String Operations
format()
format(value,format_string) converts attributes to strings and lets you choose exactly how you
prefer the data to appear. format() is useful for export and for preparing data for other programs and
Web services through runCommand.
The argument value is usually an attribute reference or expression. For example:
format($Created,"L")
gets the note's creation date and formats it as a "long local date" such as "Sunday, March 23, 2007
1:26pm".
The meaning of format_string depends on the type of object represented by value.
If value is a date, the format string is the same as the format used by Tinderbox's date export codes.
If value is a list or set, the format string is the delimiter used to separate discrete list elements
format($KeyAttributes,",")
160 of 178
Tinderbox v5 Manual
converts key attributes to a comma-separated list. Optionally, you may supply four quoted string
arguments besides value to format the set as an HTML list:
format(value,list-prefix,item-prefix,item-suffix,list-suffix)
For example
format($MyList,"<ul>","<li>","</li>","</ul>")
If value is a number, then the arguments are numeric and interpreted as follows:
format(value,precision, width)
For example, if $MyNum is 3.1415927, then
format($MyNum,2,7) is " 3.14"
format($MyNum,2) is 3.14
format($MyNum,0) is 3
In quoted string arguments here (as elsewhere), \" is converted to a quotation mark, \n to a carriage
return, and \t to a tab.
string encoding
Numeric Functions
161 of 178
Tinderbox v5 Manual
Numeric Functions
The familiar mathematical operators + - * / operate on numeric expressions in the expected way.
Note that + and - have different meanings when applied to sets, and that + has yet another meaning
(concatenation) when applied to strings.
Mathematical Operators
In the following operators, the expression parameter may be an attribute reference, a literal number
value or a code expression.
sum(group,expression) computes the sum of a series of expressions. For example,
sum(child,$WordCount)
computes the total word count of all the children of a note. 'group' may be any group designator
{children,descendants,sibling,ancestor,all}. In addition, 'group' may take a single argument that
designates a particular note other than this; for example
sum(children(/agents/books),$TextLength)
sum_if(group,condition,expression) computes the sum of the values for expression for each item in
the group, ignoring any notes for which if condition is not true. For example:
sum_if(children, $Checked, $Price)
totals the prices of all the note's children which have been checked.
avg(group,expression) computes the mean of a value computed separately for each note in the
specified a group.
avg_if(group,condition,expression)
computes the sum or the mean of a value computed in each note for a group that meets the
designated condition. For example:
sum_if(child,$Checked,$Qty*$Price)
162 of 178
Tinderbox v5 Manual
avg_if(child,$Checked,$Qty*$Price)
compute the total price and the average price of checked items that are children of this note.
Color Functions
Color functions
Color Operators
Color.red
Color.green
Color.blue
Three read/write properties allow the individual RGB color channel values to be read or set. The read
value is always a number (0-255). Values may set using a number 0-255 or a hex number string "#00"
- "#ff".
$MyNumber=$Color.red
$Color.red = 255
Color.brightness - Read/write property allows a color's brightness level to be read or set using a
value in the 0-100 range representing a percentage. Replaces brightness() action.
Color.saturation - Read/write property allows a color's saturation level to be read or set using a
value in the 0-100 range representing a percentage. Replaces saturation() action.
Color.hue - Read/write property allow a color's hue to be read or set using a value in the 0-360 range
representing a a circular degree. Replaces hue() action.
163 of 178
Tinderbox v5 Manual
Manipulating Colors
rgb(red,green,blue) -creates a color. Its arguments are integers ranging from 0 to 255. Arguments
may also be expressions or attribute references.
$Color=rgb($MyRed,255,255)
brightness(color,value) - returns a modified color that has the same hue and saturation as the
original color, but that has reduced brightness. The range of value is 0 to 100.
brightness(color) - returns the brightness of a color, as a numeric value from 0 to 100.
saturation(color,saturation) - returns a modified color that has the same high and brightness as the
original color, but has a reduced saturation as a numeric value from 0 to 100.
saturation(color) - returns the saturation of a color, as a numeric value from 0 to 100.
hue(color,value) - returns a modified color that has the same brightness and saturation as the
original color, but has a different hue. The range of value is 0 to 360.
hue(color) - returns the hue of a color, as a numeric value from 0 to 360.
Date Functions
Date Functions
Date Properties
Seven read/write properties are provided allowing various aspects of data/time data to be read or set.
Date.day (1-31)
Date.month (1-12)
Date.year (value of year)
Date.hour (0-23)
Date.minute (0-59)
Date.weekday (1-7) Monday = 1, Sunday = 7. Read-only
If the Date is never, all functions return 0 (zero).
Date Operators
Date.format("format-string") converts a date to a string, using the quoted date format string
described in Appendix 5: Date Formats. For example, $DueDate.format("l") will format the
value of $DueDate using the system’s short date format.
164 of 178
Tinderbox v5 Manual
days(date1,date2) returns the number of days that elapsed between date1 and date2, as a number.
If date2 is the earlier date, the result is negative. The internal comparison includes the time portion
of the date. thus if 2 dates are 1 day apart but the times are less than 24 hours aport, the result is 0
and not 1 as might be expected.
minutes(date1,date2) returns the number of minutes that elapsed between date1 and date2, as a
number. If date2 is the earlier date, the result is negative.
165 of 178
Tinderbox v5 Manual
A List is a list of strings or tags separated by semicolons. A Set is a special type of List where
duplicate values are not allowed. A given tag can appear in a set at most once; duplicates are
automatically removed, whereas a List allows duplicates. The order of elements in a set is not
significant. A List can be sorted, a set cannot.
Two Lists or Sets are equal if they contain the same tags (unique values) - regardless of the presence
of differing numbers of duplicates.
List/Set.contains("item") - true if any element of the List or Set matches the quoted string "item"
exactly. Regular expressions are not supported (unlike with pure string operations). Matches are
case-sensitive. Match values must be enclosed in quotes.
List/Set.each(n){...actions... } – performs an action for each element of the list or set. The local
variable "n" is bound to each element in turn. For example:
$Result=0; $MyList.each(x){ $Result=$Result+x;}
adds each element to $Result
List/Set.empty - true if the List or Set has no data
List/Set.format("delimiter") - converts a List or Set to String-type data, concatenating each value
with the specified "delimiter" characters. thus if "delimiter" is ", " the source data becomes as
comma+space delimited list as a single String.
List/Set.format("list-prefix", "item-prefix", "item-suffix", "list-suffix") - converts a List or Set to a
String. The list begins with the "list-prefix" and ends with "list-suffix"; each item is preceded by
"item-prefix" and followed by"item-suffix".
List/Set.icontains("item") - true if any element of the List or Set matches the quoted string "item"
exactly; differences between upper and lower-case letters are ignored. Regular expressions are not
supported (unlike with pure string operations). Matches are case-insensitive. Match values must be
enclosed in quotes.
List/Set.replace("item","replace") - replaces the designated item with a replacement value.
Matches are only the whole list values; partial value matches are not supported. Match values must
be enclosed in quotes.
List/Set.size - the number of values in the the list. Read-only property.
Lists (but not sets) may be sorted. The following sort operations apply only to lists:
List.sort - case-sensitive sort
List.isort - case-insensitive version of sort().
List.nsort([expression]) - an nsort() behaves exactly like sort(), but assumes that the list elements,
are numbers. Thus an nsort() always sorts numerically.
List.sort([expression]) - if List is a list of note names or $Paths, returns a list sorted by the
corresponding expression (or attribute value). If expression is a Number-type, a numeric sort is
used; if Date-type, a date sort is used. Otherwise, the list is sorted lexically.
List.isort([expression]) - as above but case-insensitive.
List.nsort([expression]) - numeric sort. An nsort() behaves exactly like sort(), but assumes that the
list elements, or the result of the optional expression, are numbers. Thus an nsort() always sorts
numerically.
List.reverse - reverses the sequence of items in the list.
For example, suppose $Favorites is a list of favorite notes.
166 of 178
Tinderbox v5 Manual
$Favorites.sort($Price)
returns a list of notes sorted by price with the lowest price first, and
$Favorites.sort($Price).reverse
is sorted by price with the highest price first.
List.unique() - returns a new list that contains each unique item found in the source list. Duplicate
entries are not copied. Note that all items in a Set are, by definition, unique.
List Operations
Several functions are useful for extracting notable elements from sets and lists. In the following, the
list argument implies set or list data.
count(list) returns the number of tags in list
max(list) returns the largest tag in list
min(list) returns the smallest tag in list
If max(list) or min(list) is evaluated in a numerical context, numerical comparison is used. Otherwise,
Tinderbox uses lexical comparison.
The mathematical functions sum(), sum_if() and avg_if() take a group scope (i.e a list of $Paths) so
can be used with lists - see Numeric Functions further above.
Several functions construct lists from a group of notes.
collect(group,expression) builds a list by visiting each note described by group and adding the
value of the designated attribute to the list. For example,
collect(children,$Name)
constructs a list with the name of each child of the note.
group may be any of {children,descendants,sibling,ancestor,all}. In addition, group may take a path
modifier; for example
collect(children(/agents/books),$Name)
expression can be any expression, but is typically an attribute.For example,
collect(children,$Name)
collect(children,$Width*$Height)
collect_if(group,condition,expression) constructs a list by collecting all the notes corresponding to
group, testing each note to see if it meets condition, and adding the expression to the set for each
such note. For example
collect_if(children,$Status="Important",$Name)
will construct a set of the names of all of this note's important children.
Should a unique list of values be required, pass the output to a Set-type as this will de-dupe the
results.
find(query) is equivalent to
collect_if( all, query, $Path)
Note that collect_if is related to agents; many tasks you might perform with collect_if can be done as
well, or better, with an agent. The results of an agent can be reused by other agents, while find() and
collect_if() need to start from scratch each time they are run.
167 of 178
Tinderbox v5 Manual
values("attribute_name") returns a set of unique values stored in that attribute throughout the
document. If the attribute is a set or a list, values() returns a set of unique elements used throughout
the document; if the attribute is a any other type, values() returns each of the distinct values in use.
Logical Operators
Logic functions
Logical Operators
Boolean operators & (and), | (or), and ! (not) operate as expected. Boolean assignment (and queries)
coerce non-boolean attributes to either to or false.
string "" and "false" are false, other values are true
color "black" (or RGB(0,0,0) or "#000" or "‹000000") is false, others are true
Use == to equality and != to test inequality. The older form of using a single equals sign (=) for an
equality test is now deprecated (and may cease to function as expected).
A direct reference to an attribute of any data type can be be used as Boolean test for a (non-zero
value):
$MyString is the same as testing $MyString!=""
!$MyString is the same as testing $MyString==""
$MyNumber is the same as testing $MyNumber!=0
!$MyNumber is the same as testing $MyNumber==0
$MyDate is the same as testing $MyDate!=never
!$MyDate is the same as testing $MyDate==never
Action, File, List, Set and URL data types conform to the String type test above as their data is just a
particular form of string.
Logical group operators examine a group of notes and determine whether every note in the group
meets a criterion, or if any note does.
every(group,expression)
any(group,expression)
The designator group describes the notes to be examined. group may be any of
168 of 178
Tinderbox v5 Manual
Link Operators
Link Functions
Link Operators
Making Links
169 of 178
Tinderbox v5 Manual
The first argument to each of these actions, is the name or path of a note, or a list of paths. The
optional second argument is the link’s type; if no argument is supplied, untitled links are used. Unlike
links(), above, the linkType argument is not a regex and is a string literal.
linkTo and linkFrom will not create a new link if the link already exists. unlinkTo and unlinkFrom will do
nothing if the described link does not exist. Thus, these actions may be used in agents:
Query: Status(urgent) Action: linkFrom(/agenda/today/tasks,"urgent!")
This action will insure that an "urgent!" link runs from the note "tasks" in today's agenda; if the link
already exists, the action has no effect.
If linkType is not supplied, unlink actions will remove links of all link types.
Macros
Macros
Macro Operator
Rules and actions may use macros through the do() function:
do(macro[,arg1,arg2,arg3])
macro is the name of the macro. Subsequent arguments are optional and are passed to the macro,
which can refer to them as $1, $2, $3, and so forth.
After the macro is evaluated, its result is returned and is parsed again as a rule, action, or expression.
For example:
$Name=do(computeName,$Name,$Name(parent))
sets name to the result of a macro.
do(Instructions);
simply executes whatever actions are returned by Instructions.
The eval() function evaluates an string and returns the result. For example,
eval("$Price*1.05")
returns the value of price augmented by 5%. Similarly, action() performs an action stored in a string.
action("$Total=$Price*1.05")
changes the value of $Total. action() and eval() are occasionally useful when a note must assemble a
rule on the fly.
Shell Expressions
Shell Expressions
Shell Operator
170 of 178
Tinderbox v5 Manual
The runCommand() function asks the operating system to start a new process and results the result
of that process.
$Text = runCommand(command_line, input)
runCommand() executes the specified command line in your default, passing it the the value input as
its standard input. The standard output of the command, if any, is the value of the completed action.
For example:
$Text = runCommand(ls ~/Documents)
replaces the note’s text with a list of the files and folders in the user’s Documents folder, and
$Text |= runCommand("curl "+$URL)
will – if the note has no text – ask curl to fetch whatever text is found at the url stored in the note’s
$URL.
It is not necessary to use an attribute to hold the output from runCommand, allowing the operator to
be used 'bare' in action code. If $CommandValue holds a valid command line string, this can be
used in a rule or action:
runCommand($CommandValue)
Backtick. If the right-hand side of an action begins with the character `, the rest of the action is
treated as a command that is passed to the Mac OS X command line.
This Tinderbox feature is deprecated, and we believe there are now
better ways to accomplish its purpose. It is discussed here to
assist those working with older document. If your Tinderbox work
uses this feature, we recommend updating it.
For example,
$Text=`perl -v
would replace the note's text with the a string describing the version of perl installed on this
computer. More usefully,
$Text=`curl http://example.com
would set the text to whatever information is available at the stated URL.
Export codes
Template expressions
Template actions
Template expressions in actions are now deprecated. If you wish to use a template expression to
construct a complex string, exportedString() would be a better approach.
If the right hand side of an action begins with the character ^, the rest of the action is interpreted as a
template expression. For example,
171 of 178
Tinderbox v5 Manual
172 of 178
Tinderbox v5 Manual
Older Forms
Two additional export elements were formerly very common. Though both have been replaced by
^value(), they continue to operate and might be encountered in older documents.
^get( attribute_name )^ the value of that attribute for the note
^getFor( object,attribute_name )^ gets the value of an attribute for the note
^value( expression )^ evaluates an expression and exports the resulting string value. For example,
^value($Name)^ exports the note’s name, and ^value(log($TextLength(parent))^
exports the logarithm of the text length of the note’s parent.
^action( action )^ performs an action, with immediate effect. For example,
^action($Color="red")^ will change the color of the note as soon as it is exported. ^action()^
173 of 178
Tinderbox v5 Manual
does not export anything, but merely performs the stated action. Its effect is permanent.
Links
Generating Links
^url( object)^ the URL of the Web page for the note
^linkTo( object)^ a link to the Web page for that note.
^basicLinks^ or ^basicLinks( "start", "item-prefix", "item-suffix", "end"[, "linkType"] )^
^childLinks^ or ^childLinks( "start", "item-prefix", "item-suffix", "end"[, "linkType"] )^
^ancestors^ or ^ancestors( "start", "item-prefix", "item-suffix", "end"[, "linkType"] )^
^siblings^ or ^siblings( "start", "item-prefix", "item-suffix", "end"[, "linkType"] )^
^inboundBasicLinks^ or ^inboundBasicLinks( "start", "item-prefix", "item-suffix", "end"[,
"linkType"] )^
^inboundTextLinks^ or ^inboundTextLinks( "start", "item-prefix", "item-suffix", "end"[,
"linkType"] )^
^inboundLinks^ or ^inboundLinks( "start", "item-prefix", "item-suffix", "end" )^
^outboundBasicLinks^ or ^outboundBasicLinks( "start", "item-prefix", "item-suffix", "end"[,
"linkType"] )^
^outboundTextLinks^ or ^outboundTextLinks( "start", "item-prefix", "item-suffix", "end"[,
"linkType"] )^
^outboundWebLinks^ or ^ outboundWebLinks(item, count[, "start", "item-prefix", "item-suffix",
"end"] )^
The Similar Notes view listing can be exported by ^simliarTo^ or ^similarTo(item, count[, "start",
"item-prefix", "item-suffix", "end"] )^
^root^ the relative path from the current file to the directory that contains the cover page. This is
valuable for creating relative URLs from templates that may appear anywhere in the document. For
example, ^root^stylesheets/screen.css will always refer to the file “screen.css” in the stylesheets
directory at the top level of the site.
Conditional Export
^if( condition )^ if the condition is true, then include everything from the ^if()^ statement to the
^else^ or the ^endif^
^else^
^endif^
^exists( object )^ is true if the designated object (for example: parent, nextSibling) exists
^contains( object, pattern )^ is true if the regular expression pattern is found within the object's
text.
174 of 178
Tinderbox v5 Manual
^children^ place the children of this note, exported using their own export template, at this point in
the current Web page. (Replaces previous ^justChildren^).
^children( template-file)^ place the children of this note, exported with the HTML template named
template-file, at this point in the current web page. (Replaces previous ^justChildren^).
^children( template-file, N )^ place the first N children of this note (where N is a number) into the
current Web page using the template template-file specified.
^descendants^ place all descendants of this note, exported using their own export template, at this
point in the current Web page. (Replaces previous ^children^).
^descendants( template-file )^ place all descendants of this note, exported with the HTML
template named template-file, at this point in the current web page. (Replaces previous ^children^).
^descendants( template-file, N )^ (deprecated) place the first N descendants of this note (where N
is a number) into the current Web page using the template template-file specified. (Replaces
previous ^children^).
^include( note_name )^ place the note named note_name, exported with its default HTML template,
at this point in the current Web page
^include( note_name, template_file )^ place the note named note_name, exported with the HTML
template named template-file, at this point in the current Web page
^randomChildOf( note_name)^ places the whole text of a randomly selected child of the note
named note_name, exported with its default HTML template, at this point in the current Web page
^randomLine( note_name, template_file)^ place a randomly selected line of the note named
note_name, exported with the HTML template named template-file, at this point in the current Web
page
^paragraphs( note_name, N)^ place N paragraphs of the text from note named note_name at this
point in the current Web page
Miscellaneous Codes
175 of 178
Tinderbox v5 Manual
^indent^ emits a tab character for each ancestor the currently exported node has.
^indent( object)^ emits an object character/string for each ancestor the currently exported node
has. (if object is omitted, 'this' is assumed)
^encode ( what )^ translates special characters such as "<" and "> in what into HTML entities
before exporting them
^urlencode(what)^ translates characters in what that may not appear in URLs into encoded
equivalents. For example, the space character becomes "%20"
^opmlencode(what)^ translates paragraph breaks in what to the entity , as required for some
OPML importers that use the _note attribute."
^uppercase ( what )^ transforms what into all UPPERCASE LETTERS
^lowercase ( what )^ transforms what into all lowercase letters
^capitalize ( what )^ transforms what into Initial Capitals
^firstWord ( what )^ returns the first word of what
^lastWord ( what )^ returns the last word of what
^cloud^ provides an HTML interface to the information displayed in the Common Words view (the
100 most common words in a note)
^sectionCloud^ builds a cloud based on a note and its descendants
^documentCloud^ builds a cloud based on the number of different notes that contain a word in the
entire document.
^cloud (note_name, number)^ for all ^cloud codes, optional arguments allow you to specify a note
note_name and the number of common words displayed
^similarTo (note_name)^ exports a list of notes that are similar to a note note_name
^sectionNumber( object )^ the hierarchical number of the note object (if object is omitted, 'this' is
assumed)
^today( object )^ the date the note object was exported to HTML (if object is omitted, 'this' is
assumed)
^created( object )^ the date the note object was created in Tinderbox (if object is omitted, 'this' is
assumed)
^lastModified( object )^ the date the note object was last modified in Tinderbox (if object is
omitted, 'this' is assumed)
^creator( object )^ the creator of the note object (if object is omitted, 'this' is assumed)
176 of 178
Tinderbox v5 Manual
Tinderbox date attributes also accept expressions using date designators such as:
now
today
yesterday
tomorrow
day / days
week / weeks
month / months
year / years
Date designators should always be quoted strings, e.g. "today", "week - 2", "week + 1", "tomorrow +
1 year" and "never". 'never' is the 'no date' value and is always later than any other date.
177 of 178
Tinderbox v5 Manual
Help notes on the above features also have annotations linking back to this notes to help clarify that
the features are not currently available.
Users with existing TBXs with images should continue to use v4.7.x. It is possible, though not
generally advised practice to run -from different folders - different copies of Tinderbox, so it may be
possible to have a copy of v4.7.x for image bearing files and v5.x for all other TBXs.
Update:
v5.6.0+. Picture Adornments. Copy the contents of am image (e.g in open in Preview, Select All,
Copy) and past to a Map view/
v5.9.0+. Picture Adornments. Map, Cmd+drag/drop a suitable image from Finder.
v5.9.0+. Image in notes. Drag/drop a suitable image from Finder into a major view contains a
note containing the image. Either add $Text and use the note or copy/paste the image data to
another note's $Text.
178 of 178