-
-
Notifications
You must be signed in to change notification settings - Fork 4
API
Represents an asset that needs to be coppied to the output directory
Source path not containing the root source folder
Target path not containing the target root folder
Current build configuration
Image processing options for this build configuration
Config output directory
Additional style classes that will be aplied
List of required assets
Template file path
Additional template options
Provides acces the current configuration
Host name
Images directory
Index file
Links that do not target the HostName open in new tabs
Metadata information
Scripts folder
File containing list of stopwords to ignore, when generating chapter summary.
Build configuration for epubs
Build configuration for Printing
Build configuration for static website
Build configuration for Wordpress export
Table of contents file
Translations
Config file version
Image pipeline options
If set to true, then output images will be resized
If set to true, then SVG images will be converted to WebP format
WebP codec quality. Minimum 0 and maximum 100. Only used, when RecodeJpegToWebp enabled.
Inline images, that are smaller the given limit in bytes
Maximal output image height when resize enabled or image is SVG
Maximal output image width when resize enabled or image is SVG
If set to true, then JPEG images will be converted to WebP format
If set to true, then PNG images will be converted to WebP format
Metadata informations
Atuhtor name
Cover Image
Book title
Template options.
Tries to get an option from the config
- T - Option to cast to type
| Name | Description |
|---|---|
| setting |
System.String Setting name |
| value |
``0@ Casted setting value |
true, if setting found and casted succesfully to target type, otherwise false
a Dictionary of key - value paris that can be used for translating
Additional style classes that will be aplied to html elements during rendering
Style classed for Blockquote elements
Style classed for Figure elements
Style classed for FigureCaption elements
Style classed for H1 elements
Style classed for H2 elements
Style classed for H3 elements
Img
Style classed for A elements
Style classed for Li elements
Style classed for Ol elements
Style classed for Table elements
Style classed for Ul elements
Represents Arguments and values that are passed to the Script. Argument names are case insensitive.
Argument names -> all lowercase
Tries to get argument value and convert it to type. If argument not found fallback value will be returned
- T - Specifies conversion target type. Must implement IConvertible
| Name | Description |
|---|---|
| argument |
System.String Argument to get |
| fallback |
``0 Fallback value if argument not found |
Argument value converted to type if found, otherwise the fallback value
Get argument value and convert it to type. If argument not found an exception will be thrown
- T - Specifies conversion target type. Must implement IConvertible
| Name | Description |
|---|---|
| argument |
System.String Argument to get |
Argument value converted to type.
System.ArgumentException:
Checks if the specified argument name is in the collection or not.
| Name | Description |
|---|---|
| name |
System.String Argument name to search |
true, if argument name can be found, otherwise false
Get argument based on its index
| Name | Description |
|---|---|
| index |
Unknown type Index of argument to get |
The argument value at the specified index
Interface for logging. Provides methods that allow information logging to console.
Log a critical exception.
| Name | Description |
|---|---|
| ex |
System.Exception Exception to log |
Log a Critical error. Critcal error is an error that causes the program to stop working
| Name | Description |
|---|---|
| format |
System.String Message, a fomat string that can be handled by the String.Format method |
| args |
System.Object[] Arguments for formatting |
Log a detail. Details are usually not important, so Details are only displayed when verbose output is enabled.
| Name | Description |
|---|---|
| format |
System.String Message, a fomat string that can be handled by the String.Format method |
| args |
System.Object[] Arguments for formatting |
Log an iformational message. Informations give the user feedback about what is happening.
| Name | Description |
|---|---|
| format |
System.String Message, a fomat string that can be handled by the String.Format method |
| args |
System.Object[] Arguments for formatting |
Log a message
| Name | Description |
|---|---|
| logLevel |
BookGen.Api.LogLevel Log level |
| format |
System.String Message, a fomat string that can be handled by the String.Format method |
| args |
System.Object[] Arguments for formatting |
Current log level
Print an object
| Name | Description |
|---|---|
| obj |
System.Object object to print |
Print a string, without formatting
| Name | Description |
|---|---|
| str |
System.String string to print |
Log a warning exception.
| Name | Description |
|---|---|
| ex |
System.Exception Exception to log |
Log a warning message. Warning is an error that shouldn't happen idealy, but we are expecting it to occure.
| Name | Description |
|---|---|
| format |
System.String Message, a fomat string that can be handled by the String.Format method |
| args |
System.Object[] Arguments for formatting |
Interface for scripts. Every Script must implement this interface.
Script name. Later you can reference the script as a shorcode with this name.
The main entrypoint of the script. It gets executed when parsing the shortcode.
| Name | Description |
|---|---|
| host |
BookGen.Api.IScriptHost Current script host |
| arguments |
BookGen.Api.IArguments Arguments for the script |
Markdown string
Interface for accesing the current script runtime
Current configuration in read-only mode.
Currently active build configuration
Script host log
Source directory of input files
Currently processed book table of contents
Interface for accesing the table of contents
A flat list of chapters without hierarchy
All files referenced in the Table of Contents
Gets Links for a chapter
| Name | Description |
|---|---|
| chapter |
System.String chapter name. Can be null. If null, all links returned from the TOC |
Enumerable collection of HTMLLinks
Represents a link in the Markdown Table of Contents.
Creates a new link
| Name | Description |
|---|---|
| text |
System.String link text |
| url |
System.String link url |
Convert the link extension to .html file that can be referenced
| Name | Description |
|---|---|
| host |
System.String Host link |
A link on host
Link text, that will be displayed.
Link url
Logging level
Critical errors
Detailed info messages. Only visible when verbose
Info messages
Warnings