<commit_before># EzGss

A tool for generating java CssResource files from .gss stylesheets, for 
[Google Web Toolkit](http://www.gwtproject.org).

Takes the following:

    .foo{}
    .foo-bar-1{}
    .foo_bar_2{}
    .switch{} /*Java reserved keyword*/
    
and produces:    

    package test;

    import com.google.gwt.resources.client.CssResource;

    public interface Test extends CssResource
    {
        @ClassName("foo")
        String foo();

        @ClassName("foo-bar-1")
        String fooBar1();

        @ClassName("foo_bar_2")
        String fooBar2();

        @ClassName("switch")
        String switch_();
    }

##Install

Just clone the repo, then run `mvn clean install` from command line.

To install as well as copy the resulting jar to the home directory (on Linux), run
`compile.sh`.

##Usage

`java -jar ezGss.jar <source> <dest> [package]`

`source` is the path to the `.gss` file, `dest` is the path where the resulting 
.java file will be generated, and `package` is an optional argument to supply the 
package of the `.java` file.

`dest` can be the directory where the file should be created, the file/class name 
can be inferred from the .gss file. E.g `foo-bar.gss` will be translated to `FooBar.java`.
However, the full name can also be specified if necessary.
 
The paths can either be absolute, or they can be relative to the working directory.
For example, if your .gss file is located at `~/project/src/main/resources/com/foo/foo-bar.gss`,
and you'd like `~/project/src/main/java/com/foo/FooBar.java` to be created, you can
run the following:

`cd ~/project/src/main #Switch to the project directory if necessary`

`java -jar ezGss.jar resources/com/foo/foo-bar.gss java/com/foo com.foo`

This will generate the file `FooBar.java` in `~/project/src/main/resources/com/foo`.
The name `FooBar` is inferred from `foo-bar.gss`, though an absolute name
can also be provided, e.g: 

`java -jar ezGss.jar resources/com/foo/foo-bar.gss java/com/foo/AnotherName.java com.foo`

If the file or directories specified in `dest` don't exist, they will be created. If
the file already exists, it will be overwritten. For example, if the directories `com/foo`
didn't exist when the above command was run, they would be created.


##Conversion of CSS class names to java methods

All css class names would be converted from hyphens or underscores to camelCase. E.g:
`foo-bar` will become `fooBar`, `foo_bar` will become `fooBar`, `FOOBAR`, `fooBar`, 
 and `FOO_BAR` will be unchanged, however **`camelCase_1` will become `camelcase1`** .
 (Notice that all letters were lower cased). 
 
 If a css class is a reserved java keyword, such as `switch`, an underscore
 will be appended to it in the method name, e.g `switch_`.
 
##Known Issues
 
If a css class contains either an underscore or a hyphen, it will be lower cased,
hyphens / underscores removed, and it will attempt to lower case it. Normally
this works without issue, but if you have a mix of camel case and underscores/hyphens,
your css style will be completely lower cased. E.g `camelCaseCase1` will become
`camelcasecase1`.

As long as you don't have a mix of camelCase and hyphens/underscores in the same 
class name, you shouldn't encounter this issue.<commit_msg>Fixed docs<commit_after># EzGss

A tool for generating java CssResource files from .gss stylesheets, for 
[Google Web Toolkit](http://www.gwtproject.org).

Takes the following:

    .foo{}
    .foo-bar-1{}
    .foo_bar_2{}
    .switch{} /*Java reserved keyword*/
    
and produces:    

    package test;

    import com.google.gwt.resources.client.CssResource;

    public interface Test extends CssResource
    {
        @ClassName("foo")
        String foo();

        @ClassName("foo-bar-1")
        String fooBar1();

        @ClassName("foo_bar_2")
        String fooBar2();

        @ClassName("switch")
        String switch_();
    }

##Install

Just clone the repo, then run `mvn clean install` from command line.

To install as well as copy the resulting jar to the home directory (on Linux), run
`compile.sh`.

##Usage

`java -jar ezGss.jar <source> <dest> [package]`

`source` is the path to the `.gss` file, `dest` is the path where the resulting 
.java file will be generated, and `package` is an optional argument to supply the 
package of the `.java` file.

`dest` can be the directory where the file should be created, the file/class name 
can be inferred from the .gss file. E.g `foo-bar.gss` will be translated to `FooBar.java`.
However, the full name can also be specified if necessary.
 
The paths can either be absolute, or they can be relative to the working directory.
For example, if your .gss file is located at `~/project/src/main/resources/com/foo/foo-bar.gss`,
and you'd like `~/project/src/main/java/com/foo/FooBar.java` to be created, you can
run the following:

`cd ~/project/src/main #Switch to the project directory if necessary`

`java -jar ezGss.jar resources/com/foo/foo-bar.gss java/com/foo com.foo`

This will generate the file `FooBar.java` in `~/project/src/main/resources/com/foo`.
The name `FooBar` is inferred from `foo-bar.gss`, though an absolute name
can also be provided, e.g: 

`java -jar ezGss.jar resources/com/foo/foo-bar.gss java/com/foo/AnotherName.java com.foo`

If the file or directories specified in `dest` don't exist, they will be created. If
the file already exists, it will be overwritten. For example, if the directories `java/com/foo`
didn't exist when the above command was run, they would be created.


##Conversion of CSS class names to java methods

All css class names would be converted from hyphens or underscores to camelCase. E.g:
`foo-bar` will become `fooBar`, `foo_bar` will become `fooBar`, `FOOBAR`, `fooBar`, 
 and `FOO_BAR` will be unchanged, however **`camelCase_1` will become `camelcase1`** .
 (Notice that all letters were lower cased). 
 
 If a css class is a reserved java keyword, such as `switch`, an underscore
 will be appended to it in the method name, e.g `switch_`.
 
##Known Issues
 
If a css class contains either an underscore or a hyphen, it will be lower cased,
hyphens / underscores removed, and it will attempt to lower case it. Normally
this works without issue, but if you have a mix of camel case and underscores/hyphens,
your css style will be completely lower cased. E.g `camelCaseCase1` will become
`camelcasecase1`.

As long as you don't have a mix of camelCase and hyphens/underscores in the same 
class name, you shouldn't encounter this issue.
{'fraction_non_alphanumeric': 0.09422071933599754, 'fraction_numerical': 0.003074085459575776, 'mean_word_length': 3.605095541401274, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, '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': '1475827', 'n_tokens_mistral': 2056, 'n_tokens_neox': 1956, 'n_words': 870}