<commit_before>---
title: Test New Scipt
date: 2016-05-01 15:42:03 -0700
author: Caleb
tags: 
---
```ruby
require 'thor'

class Edit < Thor
  include Thor::Actions
  desc 'post', 'edits a post'
  def post
  ¦ #_posts = Dir['source/posts/*']
  ¦ #for post in _posts
  ¦ posts = []
  ¦ Dir.entries('source/posts').select {|f| !File.directory? f}.each do |file|
  ¦ ¦ posts.push file.sub('.html.markdown', '').gsub('-', ' ')
  ¦ end
  ¦ puts posts
  ¦ name = ask 'What is the name of the post you would like to edit?', limited_to: posts
  ¦ system "vim #{'source/posts/' + name.gsub(' ', '-') + '.html.markdown'}"
  ¦ if yes? 'Would you like to publish your post?'
  ¦ ¦ invoke :publish
  ¦ end
  end
end
```<commit_msg>fix code<commit_after>---
title: Test New Script
date: 2016-05-01 15:42:03 -0700
author: Caleb
tags: 
---
```ruby
require 'thor'

class Edit < Thor
  include Thor::Actions
  desc 'post', 'edits a post'
  def post
    #_posts = Dir['source/posts/*']
    #for post in _posts
    posts = []
    Dir.entries('source/posts').select {|f| !File.directory? f}.each do |file|
      posts.push file.sub('.html.markdown', '').gsub('-', ' ')
    end
    puts posts
    name = ask 'What is the name of the post you would like to edit?', limited_to: posts
    system "vim #{'source/posts/' + name.gsub(' ', '-') + '.html.markdown'}"
    if yes? 'Would you like to publish your post?'
      invoke :publish
    end
  end
end
```
{'fraction_non_alphanumeric': 0.17622377622377622, 'fraction_numerical': 0.025174825174825177, 'mean_word_length': 3.042372881355932, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6803496', 'n_tokens_mistral': 541, 'n_tokens_neox': 501, 'n_words': 177}