<commit_before># copyright-inserter
This is a sample toll for insertinc copyright notice to any kind of source code files.

## Requirements
The only requirement is to have JDK installed and set JAVA_HOME enviroment variable

## Build project
To build `copyright-inserter` project you may run terminal/console and navigate to the progects's root folder. Now you can execute:
* `./gradlew build` (Linux/macOS)
* `gradlew build` (Windows)

## Usage
### Arguments
* `-h` - help
* `-i` - path to input folder. If the path contains `\` character you must to replace with `\\`. Normally use `/` character.
* `-n` - path to input folder. If the path contains `\` character you must to replace with `\\`. Normally use `/` character.
* `-e` - file extension list. List of the file extension on witch you want isert to. Example: `.java .gradle`.

This is the standard **argument's** body: `-i "<pathToInputFolder>" -n "<pathToNoticeTextFile>" -e <extensionsList>`
### Run comand line with arguments
There are two ways:
* From `build/lib` folder run `java -jar copyright-inserter-<version>.jar <arguments>`(Linux/macOS/Windows)
* From `build/scripts` run:
  * `./copyright-inserter <arguments>` (Linux/macOS)
  * `copyright-inserter.bat <arguments>` (Windows)<commit_msg>Update README file<commit_after># copyright-inserter
This is a simple tool for inserting, removing and replacing a copyright notice to any kinds of source code files.

## Requirements
The only requirement is to have JDK installed.

## Build project
To build `copyright-inserter` project you may run terminal/console and navigate to the progects's root folder. Now you can execute:
* `./gradlew build` (Linux/macOS)
* `gradlew build` (Windows)

## Usage

### Arguments
* `-h` or `--help` - help
* `-r` or `--root` - path to the root directory. If the path contains `\` character you must to replace with `\\`. Normally use `/` character.
* `-n` or `--notice` - path to input folder. If the path contains `\` character you must to replace with `\\`. Normally use `/` character.
* `-e` or `--extensions` - list of the file extension on witch you want insert to. Example: `.java .gradle`.
* `-bl` or `blank` - with this option a blank line will be inserted after the notice. If you use with a `--bootom` option a blank line will be inserted before the notice.
* `-i` or `--info` - enable log info. Log file will be created in the root directory.
* `-nn` or `--new-notice` - if you want to replace an old notice with a new notice this will be the path to the new notice.
* `-b` or `--bottom` - use this option if you want to insert notice after the source.

This is the standard **argument's** body:
* `-r "<pathToInputFolder>" -n "<pathToNoticeTextFile>" -e <extensionsList>`
* `--root "<pathToInputFolder>" --notice "<pathToNoticeTextFile>" --extensions <extensionsList>`

### Run comand line with arguments
There are two ways:
* From `build/lib` folder run `java -jar copyright-inserter-<version>.jar <arguments>`(Linux/macOS/Windows)
* From `build/scripts` run:
  * `./copyright-inserter <arguments>` (Linux/macOS)
  * `copyright-inserter.bat <arguments>` (Windows)

### Examples
Suppose you want to insert notice with a blank line after before all `java` and `gradle` files from the project you can run this command:
`-r <pathToProjectRootDir> -n <pathToTheNotice> -e .java .gradle -bl 1`
{'fraction_non_alphanumeric': 0.1242904093217807, 'fraction_numerical': 0.00029877502240812666, 'mean_word_length': 4.004484304932736, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '3969969', 'n_tokens_mistral': 1026, 'n_tokens_neox': 980, 'n_words': 442}