<commit_before>What is LessCSS4j?
------------------

LessCSS4j is an implementation of the LESS language defined by the Ruby
Gem (http://lesscss.org).  It is designed to be a library for use in your
own applications or as a stand alone command line application.  In both
cases, the goal is to "compile" a LESS file into valid CSS.


LessCSS4j's "jlessc.sh" command is nearly 80% faster than the Ruby "lessc"
command.


Licensing
---------

LessCSS4j is licensed under ?????

See LICENSE.txt for more information


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

From the command line:

$ jlessc.sh myfile.less

This will produce the file "myfile.css" in the same directory as
"myfile.less".

In Java:

StyleSheetResource resource = new FileStyleSheetResource(filename);
LessCssCompiler compiler = new DefaultLessCssCompilerFactory().create();
compiler.compile(resource, System.out, null);<commit_msg>Added history section and basic servlet documentation to README.txt<commit_after>What is LessCSS4j?
------------------

LessCSS4j is a java implementation of the LESS language (http://lesscss.org).
This version has all of the features of the original plus a few additional
features:

* Support for Internet Explorer CSS oddities without the need for escaping
* Pluggable architecture to allow additional functions and transformations
  to be provided.
* Optional Spring integration
* Servlet API integration

History
-------
The original implementation of Less was written in Ruby.  This turned out to
to perform badly when run inside of JRuby. To solve this problem, LessCSS4j
was written.

While Less has since been reimplemented (less.js) in JavaScript and performs
much better, there still is a need for a Java version to ease the integration
with existing web frameworks.


Licensing
---------

LessCSS4j is licensed under ?????

See LICENSE.txt for more information


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

From the command line:

$ jlessc.sh myfile.less

This will produce the file "myfile.css" in the same directory as "myfile.less".

In Java:

StyleSheetResource resource = new FileStyleSheetResource(filename);
LessCssCompiler compiler = new DefaultLessCssCompilerFactory().create();
compiler.compile(resource, System.out, null);

LessCSS4j also provides a servlet to perform runtime compilation of LESS
files.  To use it, add the following servlet to your web.xml file (shown
with the default init parameter values):

<servlet>
    <servlet-name>LessCssServlet</servlet-name>
    <servlet-class>org.lesscss4j.servlet.LessCssServlet</servlet-class>
    <init-param>
        <!-- The amount of time to cache the compiled Less file
             -1 = cache forever -->
        <param-name>cacheMilliseconds</param-name>
        <param-value>-1</param-value>
    </init-param>
    <init-param>
        <!-- The amount of time the browser should cache the resulting
             CSS file -->
        <param-name>httpCacheMilliseconds</param-name>
        <param-value>900000</param-value>
    </init-param>
    <init-param>
        <!-- If set to 'true', the resulting CSS will be formatted. Otherwise
             the resulting CSS is minified -->
        <param-name>prettyPrint</param-name>
        <param-value>false</param-value>
    </init-param>
</servlet>

<servlet-mapping>
    <servlet-name>LessCssServlet</servlet-name>
    <url-pattern>/less/*</url-pattern>
</servlet-mapping>

With this configuration, a request for the url /less/path/to/file.less will
look for the file /path/to/file.less in the servlet context, compile it using
the LessCSS4j compiler and return the resulting CSS.  In addition, the result
is optionally cached to avoid recompilation.
{'fraction_non_alphanumeric': 0.101615995617639, 'fraction_numerical': 0.005751848808545604, 'mean_word_length': 3.4320388349514563, 'pattern_counts': {'":': 0, '<': 36, '<?xml version=': 0, '>': 36, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, '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': '3887891', 'n_tokens_mistral': 1011, 'n_tokens_neox': 980, 'n_words': 403}