<commit_before>REMOTE JAVASCRIPT CONSOLE
===========

What it does: This script saves console output to file remotely.


USAGE:
===========
- make sure if you /logs/ directory is writable.


Basic usage:
-----------
In html:
```
	<script src="http://localhost/console/console.php?key=XYZ"></script>
```
Your logs will be saved in `logs/XYZ.log`
You can not use `async` or `defer`.

Advanced usage:
-----------
In javascript:
```
(function(filename, args) {
	var fileref = document.createElement('script');
	var params = Object.keys(args).map(function(key) {
		return key + '=' + encodeURIComponent(args[key]);
	}).join('&');
	args.consoleUrl || (params += '&consoleUrl=' + encodeURIComponent(filename + '?' + params) );

	fileref.async=1;
	fileref.src=filename + '?' + params;
	document.head.appendChild(fileref);
	return fileref;
})('http://localhost/console/console.php', {
	key: 'XYZ',
	async: true
});
```

PARAMS:
===========
`key`	default: default

	Which log file will be used.
	If not exist, /log/{$key} will be generated automaticly.
	Select any key, you want.
	Dont use special characters like /, \, &, | in your key,
	because it is filename.

`async`	default: true
	when it's "false", console.log triggers async request to console.

`consoleUrl`	default: null
	when it's not passed, the only way you can insert
	console.php to your code is: (Basic usage)
	When it contains console.php url, you can get the script
	any way, you want (Advanced usage).
<commit_msg>readme change<commit_after>REMOTE JAVASCRIPT CONSOLE
===========

What it does: This script saves console output to file remotely.


USAGE:
===========
- make sure if you /logs/ directory is writable.


Basic usage:
-----------
In html:
```
	<script src="http://localhost/console/console.php?key=XYZ"></script>
```
Your logs will be saved in `logs/XYZ.log`
You can not use `async` or `defer`.

Advanced usage:
-----------
In javascript:
```
(function(filename, args) {
	var fileref = document.createElement('script');
	var params = Object.keys(args).map(function(key) {
		return key + '=' + encodeURIComponent(args[key]);
	}).join('&');
	args.consoleUrl || (params += '&consoleUrl=' + encodeURIComponent(filename + '?' + params) );

	fileref.async=1;
	fileref.src=filename + '?' + params;
	document.head.appendChild(fileref);
	return fileref;
})('http://localhost/console/console.php', {
	key: 'XYZ',
	async: true
});
```

PARAMS:
===========
`key`	default: default
---
Which log file will be used.
If not exist, /log/{$key} will be generated automaticly.
Select any key, you want.
Dont use special characters like /, \, &, | in your key,
because it is filename.

`async`	default: true
---
when it's "false", console.log triggers async request to console.

`consoleUrl`	default: null
---
when it's not passed, the only way you can insert
console.php to your code is: (Basic usage)
When it contains console.php url, you can get the script
any way, you want (Advanced usage).

{'fraction_non_alphanumeric': 0.17339667458432304, 'fraction_numerical': 0.0006786562606040041, 'mean_word_length': 4.09153713298791, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6900584', 'n_tokens_mistral': 978, 'n_tokens_neox': 928, 'n_words': 317}