<commit_before>#!/usr/bin/env node

/**
 * Remove all traces of WebTorrent Desktop from the system (config and temp files).
 * Useful for developers.
 */

var fs = require('fs')
var os = require('os')
var path = require('path')
var rimraf = require('rimraf')

var config = require('../config')
var handlers = require('../main/handlers')

// First, remove generated files
rimraf.sync('build/')
rimraf.sync('dist/')

// Remove any saved configuration
rimraf.sync(config.CONFIG_PATH)

// Remove any temporary files
var tmpPath
try {
  tmpPath = path.join(fs.statSync('/tmp') && '/tmp', 'webtorrent')
} catch (err) {
  tmpPath = path.join(os.tmpDir(), 'webtorrent')
}
rimraf.sync(tmpPath)

// Uninstall .torrent file and magnet link handlers<commit_msg>fix paths in clean script<commit_after>#!/usr/bin/env node

/**
 * Remove all traces of WebTorrent Desktop from the system (config and temp files).
 * Useful for developers.
 */

var fs = require('fs')
var os = require('os')
var path = require('path')
var rimraf = require('rimraf')

var config = require('../src/config')
var handlers = require('../src/main/handlers')

// First, remove generated files
rimraf.sync('build/')
rimraf.sync('dist/')

// Remove any saved configuration
rimraf.sync(config.CONFIG_PATH)

// Remove any temporary files
var tmpPath
try {
  tmpPath = path.join(fs.statSync('/tmp') && '/tmp', 'webtorrent')
} catch (err) {
  tmpPath = path.join(os.tmpDir(), 'webtorrent')
}
rimraf.sync(tmpPath)

// Uninstall .torrent file and magnet link handlers
{'fraction_non_alphanumeric': 0.15810276679841898, 'fraction_numerical': 0.0, 'mean_word_length': 4.256055363321799, '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': '5121340', 'n_tokens_mistral': 497, 'n_tokens_neox': 488, 'n_words': 145}