Poepod is a Ruby gem that provides functionality to concatenate code files from a directory into one text file for analysis by Poe.
Add this line to your application’s Gemfile:
gem 'poepod'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install poepod
After installation, you can use the poepod
command line tool to concatenate
code files:
$ poepod help
Commands:
poepod concat DIRECTORY OUTPUT_FILE # Concatenate code from a directory into one text file
poepod help [COMMAND] # Describe available commands or one specific command
$ poepod help concat
Usage:
poepod concat DIRECTORY OUTPUT_FILE
Options:
[--exclude=one two three] # List of patterns to exclude
# Default: "node_modules/" ".git/" "build" "test" ".gitignore" ".DS_Store" "*.jpg" "*.jpeg" "*.png" "*.svg" "*.gif" "*.exe" "*.dll" "*.so" "*.bin" "*.o" "*.a"
[--config=CONFIG] # Path to configuration file
Concatenate code from a directory into one text file
For example:
$ poepod concat my_project
# => concatenated into my_project.txt
This will concatenate all code files from the specified directory into output.txt
.
You can also exclude certain directories or files by using the --exclude
option:
$ poepod concat my_project output.txt --exclude node_modules .git build test .gitignore .DS_Store .jpg .png .svg
After checking out the repo, run bin/setup
to install dependencies. Then, run
rake test
to run the tests. You can also run bin/console
for an interactive
prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To
release a new version, update the version number in version.rb
, and then run
bundle exec rake release
, which will create a git tag for the version, push
git commits and the created tag, and push the .gem
file to
https://rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/riboseinc/poepod.