Control: retitle -1 lolcat: New version v100.0.0 available


Since this report there have been a few changes to the source on GitHub, and the current release is now v100.0.0.

Here is a display of the changes using github's compare function https://github.com/busyloop/lolcat/compare/v42.0.99...v100.0.0

Among these is an upstreaming of the manpage.

Attached is a diff generated by github.

diff --git a/LICENSE b/LICENSE
index e86b8a4..986d2ac 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,14 +1,25 @@
-           DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
-                   Version 2, December 2004 
+Copyright (c) 2016, m...@busyloop.net
+All rights reserved.
 
-Copyright (C) 2004 Sam Hocevar <s...@hocevar.net> 
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of the lolcat nor the
+      names of its contributors may be used to endorse or promote products
+      derived from this software without specific prior written permission.
 
-Everyone is permitted to copy and distribute verbatim or modified 
-copies of this license document, and changing it is allowed as long 
-as the name is changed. 
-
-           DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
-  TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 
-
- 0. You just DO WHAT THE FUCK YOU WANT TO.
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
diff --git a/README.md b/README.md
index 0d4efa2..f10cd50 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 # What?
 
-![](http://i3.photobucket.com/albums/y83/SpaceGirl3900/LOLCat-Rainbow.jpg)
+![](https://github.com/busyloop/lolcat/raw/master/ass/nom.jpg)
 
 ## Screenshot
 
@@ -8,5 +8,6 @@
 
 ## Installation
 
-`gem install lolcat`
-
+```bash
+$ gem install lolcat
+```
diff --git a/ass/nom.jpg b/ass/nom.jpg
new file mode 100644
index 0000000..38f1436
Binary files /dev/null and b/ass/nom.jpg differ
diff --git a/ass/screenshot.png b/ass/screenshot.png
index 5d42a56..e730e8b 100644
Binary files a/ass/screenshot.png and b/ass/screenshot.png differ
diff --git a/bin/lolcat b/bin/lolcat
index b1d9d15..f1b93ca 100755
--- a/bin/lolcat
+++ b/bin/lolcat
@@ -1,22 +1,29 @@
 #!/usr/bin/env ruby
 
+# Copyright (c) 2016, m...@busyloop.net
+# All rights reserved.
 #
-# lolcat (c)2011 m...@busyloop.net
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in the
+#       documentation and/or other materials provided with the distribution.
+#     * Neither the name of the lolcat nor the
+#       names of its contributors may be used to endorse or promote products
+#       derived from this software without specific prior written permission.
 #
-
-#            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
-#                    Version 2, December 2004 
-#
-# Copyright (C) 2004 Sam Hocevar <s...@hocevar.net> 
-#
-# Everyone is permitted to copy and distribute verbatim or modified 
-# copies of this license document, and changing it is allowed as long 
-# as the name is changed. 
-#
-#            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
-#   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 
-#
-#  0. You just DO WHAT THE FUCK YOU WANT TO.
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 require "rubygems"
 require "lolcat/version"
diff --git a/lib/lolcat.rb b/lib/lolcat.rb
index 3b5ddff..d9269bc 100644
--- a/lib/lolcat.rb
+++ b/lib/lolcat.rb
@@ -1,20 +1,27 @@
+# Copyright (c) 2016, m...@busyloop.net
+# All rights reserved.
 #
-# lolcat (c)2011 m...@busyloop.net
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in the
+#       documentation and/or other materials provided with the distribution.
+#     * Neither the name of the lolcat nor the
+#       names of its contributors may be used to endorse or promote products
+#       derived from this software without specific prior written permission.
 #
-
-#            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
-#                    Version 2, December 2004 
-#
-# Copyright (C) 2004 Sam Hocevar <s...@hocevar.net> 
-#
-# Everyone is permitted to copy and distribute verbatim or modified 
-# copies of this license document, and changing it is allowed as long 
-# as the name is changed. 
-#
-#            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
-#   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 
-#
-#  0. You just DO WHAT THE FUCK YOU WANT TO.
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 require "lolcat/version"
 require "lolcat/lol"
diff --git a/lib/lolcat/cat.rb b/lib/lolcat/cat.rb
index 110019f..18d6e3c 100644
--- a/lib/lolcat/cat.rb
+++ b/lib/lolcat/cat.rb
@@ -1,54 +1,37 @@
+# Copyright (c) 2016, m...@busyloop.net
+# All rights reserved.
 #
-# lolcat (c)2011 m...@busyloop.net
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in the
+#       documentation and/or other materials provided with the distribution.
+#     * Neither the name of the lolcat nor the
+#       names of its contributors may be used to endorse or promote products
+#       derived from this software without specific prior written permission.
 #
-
-#            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
-#                    Version 2, December 2004 
-#
-# Copyright (C) 2004 Sam Hocevar <s...@hocevar.net> 
-#
-# Everyone is permitted to copy and distribute verbatim or modified 
-# copies of this license document, and changing it is allowed as long 
-# as the name is changed. 
-#
-#            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
-#   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 
-#
-#  0. You just DO WHAT THE FUCK YOU WANT TO.
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 require "lolcat/version"
 require "lolcat/lol"
 
 require 'stringio'
-require 'trollop'
+require 'optimist'
 
 module Lol
-  def self.halp!(text, opts={})
-    opts = { 
-      :animate => false,
-      :duration => 12,
-      :os => 0,
-      :speed => 20,
-      :spread => 8.0,
-      :freq => 0.3
-    }.merge opts
-
-    begin
-      i = 20
-      o = rand(256)
-      text.split("\n").each do |line|
-        i -= 1
-        opts[:os] = o+i
-        Lol.println line, opts
-      end
-      puts "\n"
-    rescue Interrupt
-    end
-    exit 1
-  end
-
   def self.cat!
-    p = Trollop::Parser.new do
+    p = Optimist::Parser.new do
       version "lolcat #{Lolcat::VERSION} (c)2011 m...@busyloop.net"
       banner <<HEADER
 
@@ -65,6 +48,8 @@ def self.cat!
       opt :animate, "Enable psychedelics", :short => 'a', :default => false
       opt :duration, "Animation duration", :short => 'd', :default => 12
       opt :speed, "Animation speed", :short => 's', :default => 20.0
+      opt :invert, "Invert fg and bg", :short => 'i', :default => false
+      opt :truecolor, "24-bit (truecolor)", :short => 't', :default => false
       opt :force, "Force color even when stdout is not a tty", :short => 'f', :default => false
       opt :version,  "Print version and exit", :short => 'v'
       opt :help,  "Show this message", :short => 'h'
@@ -75,29 +60,39 @@ def self.cat!
   lolcat            Copy standard input to standard output.
   fortune | lolcat  Display a rainbow cookie.
 
-Report lolcat bugs to <http://www.github.org/busyloop/lolcat/issues>
-lolcat home page: <http://www.github.org/busyloop/lolcat/>
+Report lolcat bugs to <https://github.com/busyloop/lolcat/issues>
+lolcat home page: <https://github.com/busyloop/lolcat/>
 Report lolcat translation bugs to <http://speaklolcat.com/>
 
 FOOTER
     end
 
-    opts = Trollop::with_standard_exception_handling p do
+    opts = Optimist::with_standard_exception_handling p do
       begin
         o = p.parse ARGV
-      rescue Trollop::HelpNeeded
+      rescue Optimist::HelpNeeded
         buf = StringIO.new
         p.educate buf
         buf.rewind
-        halp! buf.read, {}
+        opts = {
+          :animate => false,
+          :duration => 12,
+          :os => rand * 8192,
+          :speed => 20,
+          :spread => 8.0,
+          :freq => 0.3
+        }
+        Lol.cat buf, opts
+        puts
         buf.close
+        exit 1
       end
       o
     end
 
-    p.die :spread, "must be > 0" if opts[:spread] < 0.1
-    p.die :duration, "must be > 0" if opts[:duration] < 0.1
-    p.die :speed, "must be > 0.1" if opts[:speed] < 0.1
+    p.die :spread, "must be >= 0.1" if opts[:spread] < 0.1
+    p.die :duration, "must be >= 0.1" if opts[:duration] < 0.1
+    p.die :speed, "must be >= 0.1" if opts[:speed] < 0.1
 
     opts[:os] = opts[:seed]
     opts[:os] = rand(256) if opts[:os] == 0
@@ -105,15 +100,19 @@ def self.cat!
     begin
       files = ARGV.empty? ? [:stdin] : ARGV[0..-1]
       files.each do |file|
-        fd = ARGF if file == '-' or file == :stdin
+        fd = $stdin if file == '-' or file == :stdin
         begin
-          fd = File.open file unless fd == ARGF
+          fd = File.open(file, "r") unless fd == $stdin
 
           if $stdout.tty? or opts[:force]
             Lol.cat fd, opts
           else
-            until fd.eof? do
-              $stdout.write(fd.read(8192))
+            if fd.tty?
+              fd.each do |line|
+                $stdout.write(line)
+              end
+            else
+              IO.copy_stream(fd, $stdout)
             end
           end
         rescue Errno::ENOENT
diff --git a/lib/lolcat/lol.rb b/lib/lolcat/lol.rb
index 161dbf8..a487b01 100644
--- a/lib/lolcat/lol.rb
+++ b/lib/lolcat/lol.rb
@@ -1,26 +1,37 @@
+# Copyright (c) 2016, m...@busyloop.net
+# All rights reserved.
 #
-# lolcat (c)2011 m...@busyloop.net
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in the
+#       documentation and/or other materials provided with the distribution.
+#     * Neither the name of the lolcat nor the
+#       names of its contributors may be used to endorse or promote products
+#       derived from this software without specific prior written permission.
 #
-
-#            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
-#                    Version 2, December 2004 
-#
-# Copyright (C) 2004 Sam Hocevar <s...@hocevar.net> 
-#
-# Everyone is permitted to copy and distribute verbatim or modified 
-# copies of this license document, and changing it is allowed as long 
-# as the name is changed. 
-#
-#            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
-#   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 
-#
-#  0. You just DO WHAT THE FUCK YOU WANT TO.
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 require "lolcat/version"
 require 'paint'
 
 module Lol
-  STRIP_ANSI = Regexp.compile '\e\[(\d+)(;\d+)?(;\d+)?[m|K]', nil
+  ANSI_ESCAPE = /((?:\e(?:[ -\/]+.|[\]PX^_][^\a\e]*|\[[0-?]*.|.))*)(.?)/m
+  INCOMPLETE_ESCAPE = /\e(?:[ -\/]*|[\]PX^_][^\a\e]*|\[[0-?]*)$/
+
+  @os = 0
+  @paint_init = false
 
   def self.rainbow(freq, i)
      red   = Math.sin(freq*i + 0) * 127 + 128
@@ -30,39 +41,82 @@ def self.rainbow(freq, i)
   end
 
   def self.cat(fd, opts={})
+    @os = opts[:os]
     print "\e[?25l" if opts[:animate]
-    fd.each do |line|
-      opts[:os] += 1
-      println(line, opts)
+    while true do
+      buf = ''
+      begin
+        begin
+          buf += fd.sysread(4096)
+          invalid_encoding = !buf.dup.force_encoding(fd.external_encoding).valid_encoding?
+        end while invalid_encoding or buf.match(INCOMPLETE_ESCAPE)
+      rescue EOFError
+        break
+      end
+      buf.force_encoding(fd.external_encoding)
+      buf.lines.each do |line|
+        @os += 1
+        println(line, opts)
+      end
     end
     ensure
-    print "\e[?25h" if opts[:animate]
+    if STDOUT.tty? then
+        print "\e[m\e[?25h\e[?1;5;2004l"
+        # system("stty sane -istrip <&1");
+    end
   end
 
   def self.println(str, defaults={}, opts={})
     opts.merge!(defaults)
-    str.chomp!
-    str.gsub! STRIP_ANSI, '' if !str.nil? and ($stdout.tty? or opts[:force])
-    opts[:animate] ? println_ani(str, opts) : println_plain(str, opts)
-    puts
+    chomped = str.sub!(/\n$/, "")
+    str.gsub! "\t", "        "
+    opts[:animate] ? println_ani(str, opts, chomped) : println_plain(str, opts, chomped)
+    puts if chomped
   end
 
   private
 
-  def self.println_plain(str, defaults={}, opts={})
+  def self.println_plain(str, defaults={}, opts={}, chomped)
     opts.merge!(defaults)
-    str.chomp.chars.each_with_index do |c,i|
-      print Paint[c, rainbow(opts[:freq], opts[:os]+i/opts[:spread])]
+    set_mode(opts[:truecolor]) unless @paint_init
+    filtered = str.scan(ANSI_ESCAPE)
+    filtered.each_with_index do |c, i|
+      color = rainbow(opts[:freq], @os+i/opts[:spread])
+      if opts[:invert] then
+        print c[0], Paint.color(nil, color), c[1], "\e[49m"
+      else
+        print c[0], Paint.color(color), c[1], "\e[39m"
+      end
+    end
+
+    if chomped == nil
+      @old_os = @os
+      @os = @os + filtered.length/opts[:spread]
+    elsif @old_os
+      @os = @old_os
+      @old_os = nil
     end
   end
 
-  def self.println_ani(str, opts={})
+  def self.println_ani(str, opts={}, chomped)
     return if str.empty?
+    print "\e7"
+    @real_os = @os
     (1..opts[:duration]).each do |i|
-      print "\e[#{str.length}D"
-      opts[:os] += opts[:spread]
-      println_plain(str, opts)
+      print "\e8"
+      @os += opts[:spread]
+      println_plain(str, opts, chomped)
+      str.gsub!(/\e\[[0-?]*[@JKPX]/, "")
       sleep 1.0/opts[:speed]
     end
+    @os = @real_os
+  end
+
+  def self.set_mode(truecolor)
+    # @paint_mode_detected = Paint.mode
+    @paint_mode_detected = %w[truecolor 24bit].include?(ENV['COLORTERM']) ? 0xffffff : 256
+    Paint.mode = truecolor ? 0xffffff : @paint_mode_detected
+    STDERR.puts "DEBUG: Paint.mode = #{Paint.mode} (detected: #{@paint_mode_detected})" if ENV['LOLCAT_DEBUG']
+    @paint_init = true
   end
 end
diff --git a/lib/lolcat/version.rb b/lib/lolcat/version.rb
index 0815e6b..34603f1 100644
--- a/lib/lolcat/version.rb
+++ b/lib/lolcat/version.rb
@@ -1,3 +1,3 @@
 module Lolcat
-  VERSION = "42.0.99"
+  VERSION = "100.0.0"
 end
diff --git a/lolcat.gemspec b/lolcat.gemspec
index f691c53..cc201de 100644
--- a/lolcat.gemspec
+++ b/lolcat.gemspec
@@ -11,9 +11,10 @@ Gem::Specification.new do |s|
   s.description = %q{Rainbows and unicorns!}
   s.summary     = %q{Okay, no unicorns. But rainbows!!}
 
-  #s.rubyforge_project = "lolcat"
-  s.add_dependency "paint", "~> 0.8.3"
-  s.add_dependency "trollop", "~> 1.16.2"
+  s.add_development_dependency "rake"
+  s.add_dependency "paint", "~> 2.1.0"
+  s.add_dependency "optimist", "~> 3.0.0"
+  s.add_dependency "manpages", "~> 0.6.1"
 
   s.files         = `git ls-files`.split("\n")
   s.test_files    = `git ls-files -- {test,spec,features}/*`.split("\n")
diff --git a/man/lolcat.6 b/man/lolcat.6
new file mode 100644
index 0000000..fb09334
--- /dev/null
+++ b/man/lolcat.6
@@ -0,0 +1,100 @@
+.TH LOLCAT 6 "April 4, 2019"
+.\" Please adjust this date whenever revising the manpage.
+.SH NAME
+lolcat \- rainbow coloring effect for text console display
+
+.SH SYNOPSIS
+.B lolcat
+.RI [ options ] " " [ files ] " " ...
+
+.SH DESCRIPTION
+This manual page documents briefly the
+.B lolcat
+command.
+.PP
+\fBlolcat\fP is a program that concatenates files, or standard input, to
+standard output (like the generic \fBcat\fP), and adds rainbow coloring to it.
+
+.SH OPTIONS
+
+.TP
+\fB\-p\fP \fIX\fP, \fB\-\-spread=\fIX\fP
+Inclination of the rainbow stripes
+.br
+(character widths per line hight; high values (>1000) give almost horizonal stripes, low values (0.1) almost vertical ones; default: 3.0).
+.TP
+\fB\-F\fP \fIX\fP, \fB\-\-freq=\fIX\fP
+Frequency of the rainbow effect.
+.br
+(low values around 0.0001 give almost monochromous screens; default: 0.1).
+.TP
+\fB\-S\fP \fIX\fP, \fB\-\-seed=\fIX\fP
+Initial value for the random number generator; 0 means automatic.
+.br
+(default: 0).
+.TP
+\fB\-a\fP, \fB\-\-animate\fP
+Fade every line through an animation before printing the next one.
+.TP
+\fB\-d\fP \fIX\fP, \fB\-\-duration=\fIX\fP
+Duration of the animation.
+.br
+(number of steps before showing next line; default: 12)
+.TP
+\fB\-s\fP \fIX\fP, \fB\-\-speed=\fIX\fP
+Speed of the animation.
+.br
+(frame rate, ie. number of steps per second; default: 20)
+.TP
+\fB\-i\fP, \fB\-\-invert\fP
+Inverts the background and foreground colors.
+.TP
+\fB\-t\fP, \fB\-\-truecolor\fP
+Enables 24-bit truecolor mode.
+.TP
+\fB\-f\fP, \fB\-\-force\fP
+Force color even when stdout is not a tty.
+.TP
+.B \-v, \-\-version
+Shows lolcat version.
+.TP
+.B \-h, \-\-help
+Shows options summary.
+
+.SH EXAMPLES
+
+Typical combinations of \fBlolcat\fP include other programs that generate text:
+.br
+.br
+Large colorful words can be written like this:
+
+.IP
+.EX
+echo "KTHXBAI" | toilet | lolcat
+.EE
+.
+.P
+
+Cows are popular, come in all colors, and tell random epigrams:
+
+.IP
+.EX
+fortune | cowsay | lolcat \-a
+.EE
+.
+.P
+
+.SH SEE ALSO
+.BR cat (1),
+.BR toilet (1),
+.BR fortune (6),
+.BR cowsay (6)
+.br
+.SH AUTHOR
+lolcat was written by Moe <m...@busyloop.net>.
+.PP
+This manual page was originally written by chrysn <chr...@fsfe.org>,
+for the Debian project.
+.br
+Very quickly revamped by Mathieu Aubin <math...@zeroserieux.com> to
+include as part of official code repository.

Reply via email to