Markdown

From DocDataFlow
Revision as of 11:28, 5 June 2014 by Kris (Talk | contribs)

Jump to: navigation, search

Crawler.ID2MD is a Crawler-based software product which provides conversion from InDesign to Markdown syntax.

The Markdown syntax definitions can be found here:

http://daringfireball.net/projects/markdown/syntax

An early product preview is available as a .zip archive. To install, you need to first decompress the .zip archive and get to a folder 'Crawler.ID2MD' which contains a file called Export.jsxbin.

Export.jsxbin is the script you'll need to run to activate Crawler.ID2MD.

Installation

To install Crawler.ID2MD, you first need to launch InDesign, and find the Scripts panel. If it is not visible, you can make it appear by means of the Window - Utilities - Scripts menu item.

Once the Scripts panel is visible, right-click or <Control>-click the User entry and select 'Reveal in Finder' (on Mac) or 'Reveal in Explorer' (on Windows).

Install01.png

A window on a folder called Scripts should open.

Inside there should be a folder called Scripts Panel. Double-click its icon to enter it.

Install02.png

Once you're inside the Scripts Panel folder, you can drag the Crawler.ID2MD folder into it.

Install03.png

Now switch back to InDesign, and verify that the Crawler.ID2MD folder has appeared under the User folder on the Scripts panel:

Install04.png

Click the disclosure triangle - you should now see Export.jsxbin.

Install05.png

Running

Open an InDesign document, and double-click Export.jsxbin on the Scripts panel.

A new file with the same name as the original document should appear. The file name extension of the new file is .md by default. If your InDesign document is called MyDocument.indd you should see MyDocument.md appear next to it.

If the InDesign document has graphics in it, these will be exported into a separate folder called images by default.

Configuration

Crawler.ID2MD can be configured through a number of configuration files.

config.ini

There are two files named config.ini. One resides next to Export.jsxbin and configures the Crawler system; you will rarely, if ever need to change this file.

The second config.ini resides in the Personalities/Markdown subfolder and configures the Markdown features; this file will be where most configuration will be done.

These config.ini files can be opened with a standard text editor (e.g. TextWrangler on Macintosh: http://www.barebones.com/products/textwrangler/ or Notepad++ on Windows: http://notepad-plus-plus.org/download/ ).

One trick to quickly navigate to the config.ini file is to disclose it on the Scripts panel, right-click or <Control>-click it, and select 'Reveal in Finder' or 'Reveal in Explorer'.

Install06.png

Once you see the file, use a text editor to open it.

The most relevant configurations are described here:

asBitmapTextFrameLabel

This setting is a word you can assign to individual frames in the document via the Script Label panel. By entering this word onto the Script Label panel you can force selected text frames to be exported as bitmaps instead of as text.

boldFontStyles

This setting is a list of font style names that should be recognized as bold (which translates to prefixing and suffixing the text with two asterisks: **).

ignoreFrameLabel

This setting is a word you can assign to individual frames in the document via the Script Label panel. By entering this word onto the Script Label panel you can force selected to be omitted from the output file.

ignoreInvisibleLayers

This setting is either 0 or 1. Setting it to 1 will force Crawler to omit any frames that are on invisible layers.

ignoreLayers

This setting is a comma-separated list of layer names. It can be left empty.

Any items on a layer named here will be suppressed from the output.

imageExportDPI

The image resolution to use for exporting any graphic frames.

imageExportFormat

This is either PNG or JPEG. It tells Crawler what image format to use for the graphic frames. PNG is only supported in CS6 and above.

imagesFolder

This is the name of the subfolder to use for storing the exported graphic frames into.

italicFontStyles

This setting is a list of font style names that should be recognized as italic (which translates to prefixing and suffixing the text with an underscore _).

overrideAllMasterPageItems

This setting is either 0 or 1. Setting it to 1 will force Crawler to express master page items in the export.

textFrameSplitting

This setting is either 0 or 1. If it is 0, the export will be done on a story-by-story basis. Setting it to 1 forces Crawler to export on a textframe-by-textframe basis.

headingStylesLevel<n>

Where <n> is 1 up to 6. This setting is a comma-separated list of paragraph style names that must be converted to a header of level 1 to 6.

minPointSizeLevel1<n>

Where <n> is 1 up to 6. This is a number of points from which text will be considered to be of the corresponding heading level. For example, if minPointSizeLevel1 is 18, then any paragraph that starts with a glyph that is 18pt or larger will be considered to be a first-level heading.

These can be left empty, but if defining multiple levels, then minPointSizeLevel1 > minPointSizeLevel2 > ... > minPointSizeLevel6.

In other words, minPointSizeLevel6 has to be the smallest value, and minPointSizeLevel1 has to be the largest value.

blockquoteStyles

The names any paragraph styles that will be converted to blockquotes (i.e. prefixed with '> ').