<commit_before>/* 
 * Script to obtain useful information from an Orange Your Account login in the UK.
 * 
 * @todo Add delay to loaded handler, so as to reduce load on the remote server
 * @todo Use special methods for console [ok], [debug], [error] etc
 * @todo Switch any system.stdOut/stdErr to console.log
 * @todo Can we reduce reliance on full URLs?
 * @todo Can we get Orange working without SSL security disabled?
 */

var system = require('system');

// Get the parameters from the launch script
var jsonString = system.args[1];
var params = JSON.parse(jsonString);

// Check we have the necessary parameters
if (!params.username)
{
	system.stderr.writeLine('[error] This script requires a username');
	phantom.exit();
}
if (!params.password)
{
	system.stderr.writeLine('[error] This script requires a password');
	phantom.exit();
}

function login(params)
{
	/**
	 * This function is a class to hold the load handler methods
	 */<commit_msg>Remove stderr output, use console.log instead<commit_after>/* 
 * Script to obtain useful information from an Orange Your Account login in the UK.
 * 
 * @todo Add delay to loaded handler, so as to reduce load on the remote server
 * @todo Use special methods for console [ok], [debug], [error] etc
 * @todo Can we reduce reliance on full URLs?
 * @todo Can we get Orange working without SSL security disabled?
 */

var system = require('system');

// Get the parameters from the launch script
var jsonString = system.args[1];
var params = JSON.parse(jsonString);

// Check we have the necessary parameters
if (!params.username)
{
	console.log('[error] This script requires a username');
	phantom.exit();
}
if (!params.password)
{
	console.log('[error] This script requires a password');
	phantom.exit();
}

function login(params)
{
	/**
	 * This function is a class to hold the load handler methods
	 */
{'fraction_non_alphanumeric': 0.10614224137931035, 'fraction_numerical': 0.0010775862068965517, 'mean_word_length': 4.187150837988827, 'pattern_counts': {'":': 0, '<': 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': '1836751', 'n_tokens_mistral': 528, 'n_tokens_neox': 511, 'n_words': 233}