<commit_before>var _ = require('lodash');
var async = require('async-chainable');
var fs = require('fs');

module.exports = {
	name: 'acme',
	description: 'A description of what this plugin does',
	backup: function(finish, workspace) {
		async()
			.then(function(next) {
				// Sanity checks {{{
				if (!mindstate.config.acme.enabled) {
					if (mindstate.program.verbose) console.log(colors.grey('Acme backup is disabled'));
					return next('SKIP');
				}
				next();
				// }}}
			})
			.then(function(next) {
				// Do something here - like write a file to the workspace
				fs.writeFile('Hello World', workspace.dir + '/hello.txt', next);
			})
			.end(finish);
	},
	restore: function(finish, workspace) {
		async()
			.then(function(next) {
				// Sanity checks {{{
				if (!mindstate.config.acme.enabled) {
					if (mindstate.program.verbose) console.log(colors.grey('Acme restore is disabled'));<commit_msg>BUGFIX: Arguments wrong-way-around for example plugin<commit_after>var _ = require('lodash');
var async = require('async-chainable');
var fs = require('fs');

module.exports = {
	name: 'acme',
	description: 'A description of what this plugin does',
	backup: function(finish, workspace) {
		async()
			.then(function(next) {
				// Sanity checks {{{
				if (!mindstate.config.acme.enabled) {
					if (mindstate.program.verbose) console.log(colors.grey('Acme backup is disabled'));
					return next('SKIP');
				}
				next();
				// }}}
			})
			.then(function(next) {
				// Do something here - like write a file to the workspace
				fs.writeFile(workspace.dir + '/Hello World.txt', 'Hello World', next);
			})
			.end(finish);
	},
	restore: function(finish, workspace) {
		async()
			.then(function(next) {
				// Sanity checks {{{
				if (!mindstate.config.acme.enabled) {
					if (mindstate.program.verbose) console.log(colors.grey('Acme restore is disabled'));
{'fraction_non_alphanumeric': 0.16436170212765958, 'fraction_numerical': 0.0, 'mean_word_length': 3.467933491686461, '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': '1633287', 'n_tokens_mistral': 708, 'n_tokens_neox': 596, 'n_words': 143}