<commit_before>
Laika
=====

Laika is a customizable and extensible toolkit for transforming lightweight text markup and template based site generation.

It has been designed for two primary usage scenarios:

* Embedded use (e.g. web applications that allow user input in one of the supported markup syntaxes)

* As a standalone tool (e.g. using Laika's sbt plugin to produce the project's documentation)

Laika does not require the installation of any external tools.

It is Open Source under the Apache 2.0 License.

If you wonder about the name of the project and have never heard about Laika, 
you can read about her [here][laika-wikipedia].


[laika-wikipedia]: http://en.wikipedia.org/wiki/Laika


Getting Started
---------------

The current version is published to Maven Central for Scala 2.10 and 2.11.

The sbt plugin is published to the sbt plugin repository for sbt 0.13.x.


### Using the sbt Plugin

Add the plugin to `project/plugins.sbt`:

    addSbtPlugin("org.planet42" % "laika-sbt" % "0.5.1")

Import its default settings in your project's `build.sbt`:

    LaikaPlugin.defaults
    
Add Markdown, reStructuredText or HTML template files to `src/docs` in your
project and run the `laika:site` task from within sbt to generate the site
in `target/docs/site`.    
    

### Using Laika Embedded

Adding the Laika dependency to your sbt build:

    libraryDependencies += "org.planet42" %% "laika-core" % "0.5.1"

Example for transforming from file to file:

    Transform from Markdown to HTML fromFile "hello.md" toFile "hello.html"

Example for transforming an entire directory of markup files:

    Transform from ReStructuredText to 
      HTML fromDirectory "source" toDirectory "target"
      
Example for transforming an entire directory of markup files to a single PDF file:

    Transform from Markdown to HTML fromDirectory "src" toFile "hello.pdf"
    

### Other Resources

* Read more about standard usage in the chapters  
  [Using the sbt Plugin][../using-laika/sbt.md:Using the sbt Plugin]
  or [Using Laika Embedded][../using-laika/embedded.md:Using Laika Embedded].

* Try out Laika with the [Web Tool].

* Browse the source on [GitHub].

* Browse the [API].

* Follow on [Twitter] for release announcements.

* Create [Issues] here on GitHub for bug reports or enhancement requests.

* Ask questions on [Stackoverflow], tagging with Laika and Scala.
 
There will also be a dedicated forum in case of growing interest in Laika.

This manual is written in Markdown and transformed by Laika. Its source
is included in the repository inside the `docs` folder.


[Web Tool]: http://www.planet42.org/laika/webtool
[GitHub]: https://github.com/planet42/Laika
[API]: ../api/
[Twitter]: https://twitter.com/_planet42
[Issues]: https://github.com/planet42/Laika/issues
[Stackoverflow]: http://stackoverflow.com/questions/ask?tags=scala%2claika


Features
--------

* Support for Markdown and reStructuredText as input

* Support for HTML, PDF, XSL-FO and PrettyPrint (for debugging) as output

* Template-based Site Generation

* Support for tables of contents, convenient cross-linking between 
  documents and auto-numbering of documents and sections for all 
  supported markup formats
  
* Support for styling PDF documents with CSS
  
* sbt plugin, exposing all Laika features and customization hooks
  as sbt settings and tasks

* Custom Directives (tags) for templates and text markup, with type-safe
  and concise DSL for their declaration

* Customization hooks for renderers (based on simple partial 
  functions that change the output for specific node types)

* Document Tree Rewriting (hooks for modifying the document AST, consisting
  of case classes, between parsing and rendering, based on simple partial 
  functions)

* Simple contracts and APIs for adding new parsers and renderers

* A set of generic and fast parser combinators for common tasks in
  markup parsing that are not based on the commonly used (and often slow)
  regex parsers 

* Various options for input and output (strings, files, java.io.Reader/Writer, java.io streams)

* Parallel processing of parsers and renderers

* More than 900 tests


Road Map
--------

* New renderer for PDF (0.6) 

* New renderer for epub (0.7)

* Integrated support for syntax highlighting in source code (0.8)

* Various Markdown extensions: GitHub Markdown, MultiMarkdown, CommonMark, YAML headers, etc. (0.9)


After these four releases priorities depend on user demand, therefore
no decision has been made yet for these other ideas:

* AsciiDoc support<commit_msg>manual: update roadmap<commit_after>
Laika
=====

Laika is a customizable and extensible toolkit for transforming lightweight text markup and template based site generation.

It has been designed for two primary usage scenarios:

* Embedded use (e.g. web applications that allow user input in one of the supported markup syntaxes)

* As a standalone tool (e.g. using Laika's sbt plugin to produce the project's documentation)

Laika does not require the installation of any external tools.

It is Open Source under the Apache 2.0 License.

If you wonder about the name of the project and have never heard about Laika, 
you can read about her [here][laika-wikipedia].


[laika-wikipedia]: http://en.wikipedia.org/wiki/Laika


Getting Started
---------------

The current version is published to Maven Central for Scala 2.10 and 2.11.

The sbt plugin is published to the sbt plugin repository for sbt 0.13.x.


### Using the sbt Plugin

Add the plugin to `project/plugins.sbt`:

    addSbtPlugin("org.planet42" % "laika-sbt" % "0.5.1")

Import its default settings in your project's `build.sbt`:

    LaikaPlugin.defaults
    
Add Markdown, reStructuredText or HTML template files to `src/docs` in your
project and run the `laika:site` task from within sbt to generate the site
in `target/docs/site`.    
    

### Using Laika Embedded

Adding the Laika dependency to your sbt build:

    libraryDependencies += "org.planet42" %% "laika-core" % "0.5.1"

Example for transforming from file to file:

    Transform from Markdown to HTML fromFile "hello.md" toFile "hello.html"

Example for transforming an entire directory of markup files:

    Transform from ReStructuredText to 
      HTML fromDirectory "source" toDirectory "target"
      
Example for transforming an entire directory of markup files to a single PDF file:

    Transform from Markdown to HTML fromDirectory "src" toFile "hello.pdf"
    

### Other Resources

* Read more about standard usage in the chapters  
  [Using the sbt Plugin][../using-laika/sbt.md:Using the sbt Plugin]
  or [Using Laika Embedded][../using-laika/embedded.md:Using Laika Embedded].

* Try out Laika with the [Web Tool].

* Browse the source on [GitHub].

* Browse the [API].

* Follow on [Twitter] for release announcements.

* Create [Issues] here on GitHub for bug reports or enhancement requests.

* Ask questions on [Stackoverflow], tagging with Laika and Scala.
 
There will also be a dedicated forum in case of growing interest in Laika.

This manual is written in Markdown and transformed by Laika. Its source
is included in the repository inside the `docs` folder.


[Web Tool]: http://www.planet42.org/laika/webtool
[GitHub]: https://github.com/planet42/Laika
[API]: ../api/
[Twitter]: https://twitter.com/_planet42
[Issues]: https://github.com/planet42/Laika/issues
[Stackoverflow]: http://stackoverflow.com/questions/ask?tags=scala%2claika


Features
--------

* Support for Markdown and reStructuredText as input

* Support for HTML, PDF, XSL-FO and PrettyPrint (for debugging) as output

* Template-based Site Generation

* Support for tables of contents, convenient cross-linking between 
  documents and auto-numbering of documents and sections for all 
  supported markup formats
  
* Support for styling PDF documents with CSS
  
* sbt plugin, exposing all Laika features and customization hooks
  as sbt settings and tasks

* Custom Directives (tags) for templates and text markup, with type-safe
  and concise DSL for their declaration

* Customization hooks for renderers (based on simple partial 
  functions that change the output for specific node types)

* Document Tree Rewriting (hooks for modifying the document AST, consisting
  of case classes, between parsing and rendering, based on simple partial 
  functions)

* Simple contracts and APIs for adding new parsers and renderers

* A set of generic and fast parser combinators for common tasks in
  markup parsing that are not based on the commonly used (and often slow)
  regex parsers 

* Various options for input and output (strings, files, java.io.Reader/Writer, java.io streams)

* Parallel processing of parsers and renderers

* More than 900 tests


Road Map
--------

* New renderer for epub (0.7)

* Integrated support for syntax highlighting in source code (0.8)

* Various Markdown extensions: GitHub Markdown, MultiMarkdown, CommonMark, YAML headers, etc. (0.9)

* API polishing (1.0)


After these four releases priorities depend on user demand, therefore
no decision has been made yet for these other ideas:

* Markup syntax as output format
{'fraction_non_alphanumeric': 0.0747346536820221, 'fraction_numerical': 0.008972535288324762, 'mean_word_length': 3.9378714208535928, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3712960', 'n_tokens_mistral': 2683, 'n_tokens_neox': 2493, 'n_words': 1180}