<commit_before>ink
========

A shell script that serves as a crude CMS for Octopress blogs. 

v 0.0.4


### Installation (as of v 0.0.4)

**Recommend you read through the code first** 

To install ink v 0.0.4, 

1. Download or clone this Git repo. I’d recommend saving/cloning it somewhere in your “code” directory, but it doesn't really matter where you put it. Inside you’ll find a .sh file and a README. 
2. Open the ink.sh file in a text editor like Sublime. On line 5, for the variable BLOG_DIRECTORY, replace my path with the path to your Octopress directory (user.github.io). Then verify that line 37 is the correct path from your github.io directory to your posts (it probably is). 
3. Next, you’ll want to put a function in your bash profile so you can call ink from anywhere in your terminal. To open your bash profile, run the following in your command line: ```open ~/.bash_profile```. Paste in this function in the top level:
```
function ink { bash /Users/$USER/Documents/code/ink/ink.sh "$1" }
```
Close and reopen your terminal. You should now be able to call ```ink``` from anywhere in your terminal to run ink. On the first run, it should ask you for permission to create an "ink_drafts" Git branch. If you'd like ink to be able to save drafts, type "y". If you say yes you won't be asked again. 

### Warnings

It should be noted that version 0.0.4 includes a ```git rm *``` command. This command is only run on the “ink_drafts” Git branch that the script itself creates, and it is only run on the initial setup of the branch, after the script detects that the user has not already created an “ink_drafts” branch. If you have concerns, please read through the ink.sh file. 

### Use

From anywhere in the terminal, user can call ```$ ink ``` to access ink's main menu. As a shortcut, user's can create a new post by typing: ```$ ink “blog post title”``` in the terminal.

Once a user opens a new post, their default text/markdown editor launches. The user should then write his or her post, save it, and exit the editor. 

The user should then immediately return to the open terminal window, where the user will find a menu with the following choices: publish, save, delete, and quit. 

**Publish** adds, commits, and pushes the user’s Git up to GitHub, then deploys your Octopress blog. Here’s the Bash code:

``` bash
  git add .
  git commit -m  "Used ink to publish a new post called "$FILENAME"." 
  git push origin source
  rake generate
  rake deploy <commit_msg>added to the warning paragraph in the readme<commit_after>ink
========

A shell script that serves as a crude CMS for Octopress blogs. 

v 0.0.4


### Installation (as of v 0.0.4)

**Recommend you read through the code first** 

To install ink v 0.0.4, 

1. Clone this Git repo. I’d recommend saving/cloning it somewhere in your “code” directory, but it doesn't really matter where you put it. Inside you’ll find a .sh file and a README. 
2. Open the ink.sh file in a text editor like Sublime. On line 5, for the variable BLOG_DIRECTORY, replace my path with the path to your Octopress directory (user.github.io). Then verify that line 37 is the correct path from your github.io directory to your posts (it probably is). 
3. Next, you’ll want to put a function in your bash profile so you can call ink from anywhere in your terminal. To open your bash profile, run the following in your command line: ```open ~/.bash_profile```. Paste in this function in the top level:
```
function ink { bash /Users/$USER/Documents/code/ink/ink.sh "$1" }
```
Close and reopen your terminal. You should now be able to call ```ink``` from anywhere in your terminal to run ink. On the first run, it should ask you for permission to create an "ink_drafts" Git branch. If you'd like ink to be able to save drafts, type "y". If you say yes you won't be asked again. 

### Warnings

It should be noted that version 0.0.4 includes a ```git rm *``` command. This command is only run on the “ink_drafts” Git branch that the script itself creates, and it is only run on the initial setup of the branch, after the script detects that the user has not already created an “ink_drafts” branch. Use at your own risk. If you have concerns, please read through the ink.sh file. You may also want to create a back-up of your ```source/_posts``` directory somewhere outside your Octopress blog directory just to be on the safe side. 

### Use

From anywhere in the terminal, user can call ```$ ink ``` to access ink's main menu. As a shortcut, user's can create a new post by typing: ```$ ink “blog post title”``` in the terminal.

Once a user opens a new post, their default text/markdown editor launches. The user should then write his or her post, save it, and exit the editor. 

The user should then immediately return to the open terminal window, where the user will find a menu with the following choices: publish, save, delete, and quit. 

**Publish** adds, commits, and pushes the user’s Git up to GitHub, then deploys your Octopress blog. Here’s the Bash code:

``` bash
  git add .
  git commit -m  "Used ink to publish a new post called "$FILENAME"." 
  git push origin source
  rake generate
  rake deploy 
{'fraction_non_alphanumeric': 0.07617942768754833, 'fraction_numerical': 0.007347254447022429, 'mean_word_length': 3.7987012987012987, '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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '37675', 'n_tokens_mistral': 1488, 'n_tokens_neox': 1393, 'n_words': 865}