Tinderbox User's Manual : Exporting to HTML

Exporting to HTML

Tinderbox Icon

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.

HOW IT WORKS

Tinderbox uses HTML templates to understand how your notes should be formatted as Web pages. The template is simply a HTML or XML text file that looks like the information you want to export, marking with “placeholders: the location of information Tinderbox is to take from your document. The export template is thus a form the Tinderbox fills out, with placeholders to represent blanks and boxes that into which Tinderbox inserts information from your notes.

For each note that you export, Tinderbox looks at what you have in that note. This tells it, for instance, “The title goes here, formatted like this. Then the text goes here. Over in this column, put links to this note’s children, if it has any.”

Many different notes can use the same template. Exporting them will create many Web pages, with different content—different titles, text, links, and so on—but in the same format on each Web page. Other notes may use a different format, and so may require a different template.

HTML TEMPLATES

An HTML template is simply an HTML file, in which special codes, or "placeholders," indicate where Tinderbox should insert what portions of information from each note. These placeholders include codes indicating where to put the title of the note, where to put the body (text and graphics) of the note, and where to put various links from the note. For a full list of codes, see the HTML Export Code Reference Chart later in this documentation.

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.

TEMPLATE ASSISTANTS

Assistants let Tinderbox ask a series of questions and then create customized Tinderbox files and templates to meet a user's specific needs.

To use any assistant,

MANY NOTES IN ONE WEB PAGE

So far we have imagined creating one Web page out of the information in one Tinderbox note. Tinderbox also has very powerful facilities for building Web pages built out of many notes. For instance, you could have many notes containing news briefs, and Tinderbox could create a Web page showing all of the news briefs on one page, in the format you choose.

This feature, particularly when combined with the power of agents, is a very powerful way to create dynamic Web content. Blog-like journal entries, or project updates, gathered into categories, are two such possible uses.

This facility is described in depth in its own chapter.

HTML templates give instructions for how to turn a Tinderbox note into a Web page, but because of essential differences between Tinderbox and the Web, not everything can transfer identically.

DETAILS: TINDERBOX AND THE WEB

Text

The ^text^ placeholder is replaced by an HTML rendition of the note’s text.

Tinderbox converts text styles to stylistic markup tags, such as <b> and <i>. If you prefer to use different tags, such as <em> and <strong>, change attributes HTMLBoldStart/End and HTMLItalicStart/End.

Tinderbox converts many non-ASCII characters to their corresponding HTML entities. For example, the character "&" is converted to "&". If your Web site uses a non-Western character set, such as Japanese or Chinese, this process will have undesirable effects; turn off HTMLEntities.

Tinderbox recognizes paragraph boundaries and inserts paragraph markup, typically <p> and </p>. You may easily customize paragraph markup for individual notes or for the entire document by setting HTMLParagraphStart/End and HTMLFirstParagraphStart/End.

Tinderbox recognizes paragraphs that start with a tab character and emits special markup tags. To modify these tags, see HTMLIndentedParagraphStart/End.

You may insert HTML tags directly into your text, and Tinderbox will export them in place. If a paragraph begins and ends with tags, Tinderbox does not add additional paragraph markup.

You may insert export template elements directly into the text, and Tinderbox will evaluate these exactly as if they had appeared in the template. This is especially useful in conjunction with the Macro facility, and a simple macro can let you quickly and easily insert long or complex passages that you use frequently.

Headings

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 a <h2>.

If the font is at least six points larger, it is treated as <h1>.

Images

Images in text will be exported as highly compressed jpg files, and an <img> tag will be embedded in the HTML.

Tinderbox will not overwrite an image file, if the image is already present. As a result, you can replace Tinderbox’s highly compressed images with better-quality images for your Web audience. Just replace the images Tinderbox exports with better images, using the same file names. When you export revisions, Tinderbox will leave your images intact.

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 listsmay be created by beginning new paragraphs with the '#' symbol.

List markup may be customized through markup attributes:

HTMLOrderedListStart/End

HTMLListStart/End

HTMLListItemStart/End

THE HTML TEMPLATES FOLDER

Since you can assign different HTML templates to different notes, your Tinderbox document as a whole may use many different templates in the course of exporting the entire document into HTML files. 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.

Tinderbox also provides some built-in templates that are available to all 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.

To choose a default template

To choose a template for one note

From anywhere,

In the HTML view window,


Up: Tinderbox User's Manual
Previous: Email To Tinderbox  Next: HTML View 

[Last updated: 26 Jul 2009]

Google search TB Help for:  


Made with Tinderbox