Gets text files in folder, copys the text, moves the files to 'combined/', transliterates unicode to ASCII, saves to clipboard, writes the last combine to text file.
Designed for OS X.
Requires stringex gem.
$ gem install stringex
$ git clone https://github.com/jessc/combine_files.git
This script is designed to work well with Platypus.
To install the gem dependency in Platypus, follow these steps:
-
Download the .gem from RubyGems.org.
-
Make a gems/ folder. Put the .gem inside.
-
Using a terminal, cd to just above the gems/ folder.
-
This should create a bunch of folders when you install the gem locally:
$ export GEM_HOME=$PWD/gems/ $ gem install --local gems/stringex-1.5.1.gem
-
Create your Platypus app, add the gems/ folder to the list of files to be bundled.
To get Platypus to work with gems, follow the above instructions, then at the top of your script add:
require 'rubygems'
Gem.use_paths(nil, Gem.path << 'gems/')
This will tell Platypus to look in the gems/ folder for the libraries you need.
You can edit the folder_loc variable at the bottom of the script. Then use:
CombineFiles.new(folder_loc).run
For instance:
CombineFiles.new("./").run
would combine the files in the current folder.
- if no combined/ folder, create it
- choose files to ignore
- port to other operating systems