<commit_before>var get = require('../blog/get');
var Entry = require('entry');

var entry;
var handle = process.argv[2];
var entryPath = process.argv[3];

if (!handle) throw 'Missing first argument: handle for an existing blog';
if (!entryPath) throw 'Missing second argument: path to an entry on this blog';

get(handle, function(user, blog){

  if (!user || !blog) throw new Error('NOBLOG');

  Entry.get(blog.id, [entryPath], function(entries){

    entry = entries[0];

    if (!entry) throw new Error('NOENTRY');

    Entry.drop(blog.id, entryPath, function(err){

      if (err) throw err;

      console.log(blog.handle, entry.path, 'was deleted!');
    });
  });
});<commit_msg>Updated remove script<commit_after>var get = require("../blog/get");
var Entry = require("entry");

if (require.main === module) {
  get(process.argv[2], function(user, blog) {
    main(blog, process.argv[3], function(err) {
      if (err) throw err;
      process.exit();
    });
  });
}

function main(blog, path, callback) {
  Entry.get(blog.id, [path], function(entries) {
    if (!entries[0]) throw new Error("NOENTRY " + path);

    Entry.drop(blog.id, entries[0], function(err) {
      if (err) throw err;

      console.log(blog.handle, entry.path, "was deleted!");
      callback();
    });
  });
}
{'fraction_non_alphanumeric': 0.1794276875483372, 'fraction_numerical': 0.005413766434648105, 'mean_word_length': 3.7226277372262775, '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': '4590628', 'n_tokens_mistral': 423, 'n_tokens_neox': 413, 'n_words': 115}