<commit_before>var OMXPlayer = require('./lib/omxplayer');
var commander;
try {
	commander = require('commander');
	
} catch (x) {
	console.error("You must install the package 'commander' for this sample !  (npm install commander)");
	process.exit(1);
}

commander.command('node-omxplayer <filename> [filenames ...]');

commander.version(require("./package.json").version);

commander.option("-b, --blank", "Set background to black");
commander.option("-o, --adev <device>", "Audio out device");
commander.option("-p, --passthrough", "Audio passthrough");
commander.option("-d, --deinterlace", "Deinterlacing");
commander.option("-y, --hdmiclocksync", "Display refresh rate to match video");
commander.option("-z, --nohdmiclocksync", "Do not adjust display refresh rate to match video");
commander.option("--timeout <float>", "Timeout for stalled file/network operations (seconds)", parseFloat);
commander.option("--orientation <int>", "Set orientation of video (0, 90, 180 or 270)", parseInt);
// commander.option(" --loop", "Loop file. Ignored if file not seekable");
commander.option("--vol <volume>", "Set initial volume in millibels (default 0)", parseFloat);
commander.option("--path <omxPlayerPath>", "Path of omxplayer");

commander.action(function(fileName, filenames) {

	var omxplayer = new OMXPlayer(commander);

	var list = arguments.splice(0);

	function start() {
		var next = list.shift();

		console.log("Start movie", next);

		omxplayer.start(next, function(error) {
			if (error) {
				console.error("Start: ", error);
				return;
			}
		});
	}

	omxplayer.on("stopped", start);

	start();
});

commander.parse(process.argv);<commit_msg>First tests<commit_after>var OMXPlayer = require('./lib/omxplayer');
var commander;
try {
	commander = require('commander');

} catch (x) {
	console.error("You must install the package 'commander' for this sample !  (npm install commander)");
	process.exit(1);
}

commander.version(require("./package.json").version);

commander.option("-b, --blank", "Set background to black");
commander.option("-o, --adev <device>", "Audio out device");
commander.option("-p, --passthrough", "Audio passthrough");
commander.option("-d, --deinterlace", "Deinterlacing");
commander.option("-y, --hdmiclocksync", "Display refresh rate to match video");
commander.option("-z, --nohdmiclocksync", "Do not adjust display refresh rate to match video");
commander.option("--timeout <float>", "Timeout for stalled file/network operations (seconds)", parseFloat);
commander.option("--orientation <int>", "Set orientation of video (0, 90, 180 or 270)", parseInt);
// commander.option(" --loop", "Loop file. Ignored if file not seekable");
commander.option("--vol <volume>", "Set initial volume in millibels (default 0)", parseFloat);
commander.option("--path <omxPlayerPath>", "Path of omxplayer");

commander.command('*').description("node-omxplayer <filename> [filenames ...]").action(function(fileNames) {

	var omxplayer = new OMXPlayer(commander);

	var list = arguments.splice(0);

	function start() {
		var next = list.shift();

		console.log("Start movie", next);

		omxplayer.start(next, function(error) {
			if (error) {
				console.error("Start: ", error);
				return;
			}
		});
	}

	omxplayer.on("stopped", start);

	start();
});

commander.parse(process.argv);
{'fraction_non_alphanumeric': 0.17967332123411978, 'fraction_numerical': 0.007259528130671506, 'mean_word_length': 5.11275415896488, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '2285933', 'n_tokens_mistral': 1085, 'n_tokens_neox': 1034, 'n_words': 275}