Difference between revisions of "Markdown"
(→config.ini) |
(→config.ini) |
||
Line 63: | Line 63: | ||
The most relevant configurations are described here: | 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 '> '). |
Revision as of 11:28, 5 June 2014
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.
Contents
- 1 Installation
- 2 Running
- 3 Configuration
- 3.1 config.ini
- 3.2 asBitmapTextFrameLabel
- 3.3 boldFontStyles
- 3.4 ignoreFrameLabel
- 3.5 ignoreInvisibleLayers
- 3.6 ignoreLayers
- 3.7 imageExportDPI
- 3.8 imageExportFormat
- 3.9 imagesFolder
- 3.10 italicFontStyles
- 3.11 overrideAllMasterPageItems
- 3.12 textFrameSplitting
- 3.13 headingStylesLevel<n>
- 3.14 minPointSizeLevel1<n>
- 3.15 blockquoteStyles
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).
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.
Once you're inside the Scripts Panel folder, you can drag the Crawler.ID2MD folder into it.
Now switch back to InDesign, and verify that the Crawler.ID2MD folder has appeared under the User folder on the Scripts panel:
Click the disclosure triangle - you should now see Export.jsxbin.
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'.
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 '> ').