<commit_before>#SNCPOW!

SNCPOW! is a light-weight NodeJS (http://nodejs.org/) server designed to make the Service-Now admin's life much easier.

SNCPOW! cuts the copy-paste-update out of managing your business rules, script includes, ui macros etc.

SNCPOW! allows you to use your own script editor, and 

SNCPOW! will watch a folder of scripts for changes and send the changes to the Service-Now instance of your choice.

###Here's how it works:
#####This server requires the JSON webservices plugin to be turned on in your Service-Now instance.

Setup of the script is simple and uses the JSON syntax we all know:
```javascript
/*{
"instance":"demo05.service-now.com",
"table":"sys_script",
"content_field": "script",
"record":{
    "sys_id":"2bc2f9b1c0a801640199f9eb0067326e",
    "condition":"!gs.hasRole('itil') && gs.isInteractive()",
    "name":"incident query",
    "when":"before",
    "action_query":true,
    "action_delete":true,
    "description":"Restrict task visibility for ess users to only those incidents where: the ess user is the caller, the incident was opened by the ess user an the ess user is on the watch list. Updated from JSON"
    }
}*/
//script goes here
var user = gs.getUserID();

var incident_query = current.addQuery("caller_id", user);
incident_query.addOrCondition("opened_by", user);
incident_query.addOrCondition("watch_list", "CONTAINS", user);
```

Store this as a .js file in the folder you want to watch for example "scripts".
Every time you modify this file an event will be sent to Node, and the script will be send the specified instance using Service-Now's JSON web services plugin.


A quick overview of the properties header:
* instance: the URL of the Service-Now instance to upload the script to
* table: the table to upload the script to
* content_field: the field on the specified table where the body of the script should be put
* record: an object which contains other optional fields to update
	* sys_id: if set SNCPOW! will update existing record, if not SNCPOW! will insert a new record

###Future hopes
SNCPOW! is pretty simplistic at the moment, I would like to see it add a few features.
* Credentials configuration file for use with multiple instances
* More error handling and logging
* Ability to send off a sys_id and table and SNCPOW! will pull the script from Service-Now and setup a new file
* Ability to monitor a SVN or git repo and work in conjunction with these tools to make versioning with Service-Now more intergrated
<commit_msg>README updated<commit_after>#SNCPOW!

SNCPOW! is a light-weight NodeJS (http://nodejs.org/) server designed to make the Service-Now admin's life much easier.

SNCPOW! cuts the copy-paste-update out of managing your business rules, script includes, ui macros etc.

SNCPOW! allows you to use your own script editor, and 

SNCPOW! will watch a folder of scripts for changes and send the changes to the Service-Now instance of your choice.

###Here's how it works:
#####This server requires the JSON webservices plugin to be turned on in your Service-Now instance.

Setup of the script is simple and uses the JSON syntax we all know:
```javascript
/*{
"instance":"demo05.service-now.com",
"table":"sys_script",
"content_field": "script",
"record":{
    "sys_id":"2bc2f9b1c0a801640199f9eb0067326e",
    "condition":"!gs.hasRole('itil') && gs.isInteractive()",
    "name":"incident query",
    "when":"before",
    "action_query":true,
    "action_delete":true,
    "description":"Restrict task visibility for ess users to only those incidents where: the ess user is the caller, the incident was opened by the ess user an the ess user is on the watch list. Updated from JSON"
    }
}*/
//script goes here
var user = gs.getUserID();

var incident_query = current.addQuery("caller_id", user);
incident_query.addOrCondition("opened_by", user);
incident_query.addOrCondition("watch_list", "CONTAINS", user);
```

Store this as a .js file in the folder you want to watch for example "scripts".
Every time you modify this file an event will be sent to Node, and the script will be send the specified instance using Service-Now's JSON web services plugin.


A quick overview of the properties header:
* instance: the URL of the Service-Now instance to upload the script to
* table: the table to upload the script to
* content_field: the field on the specified table where the body of the script should be put
* record: an object which contains other optional fields to update
	* sys_id: if set SNCPOW! will update existing record, if not SNCPOW! will insert a new record

###Future hopes
SNCPOW! is pretty simplistic at the moment, I would like to see it add a few features.
* ~~Credentials configuration file for use with multiple instances~~
* More error handling and logging
* Ability to send off a sys_id and table and SNCPOW! will pull the script from Service-Now and setup a new file
* Ability to monitor a SVN or git repo and work in conjunction with these tools to make versioning with Service-Now more intergrated

{'fraction_non_alphanumeric': 0.07976071784646062, 'fraction_numerical': 0.009571286141575274, 'mean_word_length': 4.610738255033557, 'pattern_counts': {'":': 22, '<': 3, '<?xml version=': 0, '>': 3, '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': '6212041', 'n_tokens_mistral': 1439, 'n_tokens_neox': 1375, 'n_words': 699}