<commit_before># NodeJS watchfolder
Watches directories for packages and publishes messages when complete.

A package consists of 2 or 3 files, depending on the configuration. This service will monitor a folder for files and match these based on their name.

####Example:
A complete package might be:
- Configured with only essence and sidecar
  - somefile.mxf
  - somefile.xml
- Configured with essence, sidecar and collateral
  - somefile.mxf
  - somefile.xml
  - somefile.srt

## How to use
This service can be started with the command line, passing all arguments:
```
node src/watchfolder.js \
        --CP=VRT \
        --FLOW_ID=VRT.VIDEO.1 \
        --ESSENCE_FILE_TYPE=.mxf,.txt \
        --SIDECAR_FILE_TYPE=.xml \
        --COLLATERAL_FILE_TYPE=.srt \
        --RABBIT_MQ_HOST=localhost \
        --RABBIT_MQ_PORT=5672 \
        --RABBIT_MQ_SUCCESS_EXCHANGE=borndigital.input \
        --RABBIT_MQ_SUCCESS_QUEUE=borndigital.input \
        --RABBIT_MQ_ERROR_EXCHANGE=born.digital.errors \
        --RABBIT_MQ_ERROR_QUEUE=incomplete_packages \
        --RABBIT_MQ_TOPIC_TYPE=direct \
        --RABBIT_MQ_USER=guest \
        --RABBIT_MQ_PASSWORD=<PASSWORD> \
        --FTP_SERVER=localhost \
        --FTP_USERNAME=admin \
        --FTP_PASSWORD=<PASSWORD> \
        --CHECK_PACKAGE_INTERVAL=2000 \
        --CHECK_PACKAGE_AMOUNT=3 \
        --PROCESSING_FOLDER_NAME=processing \
        --INCOMPLETE_FOLDER_NAME=incomplete \
        /folder/to/watch

```
<commit_msg>Fixed readme<commit_after># NodeJS watchfolder
Watches directories for packages and publishes messages when complete.

A package consists of 2 or 3 files, depending on the configuration. This service will monitor a folder for files and match these based on their name.

####Example:
A complete package might be:
- Configured with only essence and sidecar
  - somefile.mxf
  - somefile.xml
- Configured with essence, sidecar and collateral
  - somefile.mxf
  - somefile.xml
  - somefile.srt

## How to use
This service can be started with the command line, passing all arguments:
```
nodemon src/watchfolder.js \
	--CP=VRT \
	--FLOW_ID=VRT.VIDEO.1 \
	--ESSENCE_FILE_TYPE=.mxf,.txt \
	--SIDECAR_FILE_TYPE=.xml \
	--COLLATERAL_FILE_TYPE=.srt \
	--RABBIT_MQ_HOST=localhost \
	--RABBIT_MQ_PORT=5672 \
	--RABBIT_MQ_VHOST=/ \
	--RABBIT_MQ_SUCCESS_EXCHANGE=borndigital.input \
	--RABBIT_MQ_SUCCESS_QUEUE=borndigital.input \
	--RABBIT_MQ_ERROR_EXCHANGE=born.digital.errors \
	--RABBIT_MQ_ERROR_QUEUE=incomplete_packages \
	--RABBIT_MQ_TOPIC_TYPE=direct \
	--RABBIT_MQ_USER=guest \
	--RABBIT_MQ_PASSWORD=<PASSWORD> \
	--FTP_SERVER=localhost \
	--FTP_USERNAME=admin \
	--FTP_PASSWORD=<PASSWORD> \
	--CHECK_PACKAGE_INTERVAL=2000 \
	--CHECK_PACKAGE_AMOUNT=3 \
	--PROCESSING_FOLDER_NAME=processing \
	--INCOMPLETE_FOLDER_NAME=incomplete \
	--REFUSED_FOLDER_NAME=refused \
	/Users/dieter/watch_this_folder

```

{'fraction_non_alphanumeric': 0.10198398886181692, 'fraction_numerical': 0.008353637312913331, 'mean_word_length': 3.135251798561151, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '34947', 'n_tokens_mistral': 1072, 'n_tokens_neox': 1008, 'n_words': 205}