Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

palindromes

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

palindromes

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

palindromes

This tool takes in an text file as input and outputs palindromes and histogram

Requirements

  • ImageMagic OSX: brew install imagemagick
  • Ruby (tested on 2.1.2p95)

Installation

# Gem Installation
$ gem install palindromes

- OR -

# Bundle Installation
$ bundle install
$ alias palindromes="bundle exec ./bin/palindromes"

Usage


# Usage Help
palindromes --help

# default search (output to stdout and chart to ./histogram.png)
$ palindromes find <input_file>

# to redirect output(file and chart)
# palindromes find -o <output_file> -c <output_chart_file> <input_file>
$ palindromes find -o /tmp/output.txt -c /tmp/histogram.png /tmp/input.txt



# default run example/output
$ palindromes find sample/input.txt
-- palindromes --
b > 11
a > 10
aaa > 9
c > 4
radar > 4
101 > 3
i > 3
lol > 3
aaaa > 2
d > 2
mom > 2
s > 2
aa > 1
bbbb > 1
beeb > 1
ddd > 1
did > 1
e > 1
f > 1
g > 1
h > 1
j > 1
k > 1
l > 1
m > 1
n > 1
o > 1
p > 1
peep > 1
q > 1
r > 1
t > 1
u > 1
v > 1
w > 1
x > 1
y > 1
z > 1
-- histogram --
{"a"=>10, "radar"=>4, "did"=>1, "peep"=>1, "mom"=>2, "s"=>2, "i"=>3, "beeb"=>1, "101"=>3, "b"=>11, "c"=>4, "lol"=>3, "aaa"=>9, "v"=>1, "w"=>1, "x"=>1, "y"=>1, "z"=>1, "t"=>1, "u"=>1, "o"=>1, "p"=>1, "q"=>1, "r"=>1, "k"=>1, "l"=>1, "m"=>1, "n"=>1, "g"=>1, "h"=>1, "j"=>1, "d"=>2, "e"=>1, "f"=>1, "aa"=>1, "aaaa"=>2, "bbbb"=>1, "ddd"=>1}

-- histogram chart --
generating chart... histogram.png

FAQs

Package last updated on 10 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc