;;
;; display command line usage in full technicolor
;;

(define-module (pathgro help)
  #:export (display-help))

(use-modules (pathgro util ansi-color) (pathgro util stdio))

(define (display-help)
  (newline)
  (display "üî∞")
  (display (colorize-string "usage" 'YELLOW 'ON-BLUE 'BOLD 'UNDERLINE))
  (display (colorize-string ": " 'BOLD))
  (display (colorize-string "pathgro" 'WHITE 'ON-GREEN 'BOLD))
  (display " ")
  (display (colorize-string "[" 'WHITE 'ON-BLACK 'BOLD))
  (display (colorize-string "<OPTIONS>" 'BLACK 'ON-GREEN 'UNDERLINE))
  (display (colorize-string "]" 'WHITE 'ON-BLACK 'BOLD))
  (display " ")
  (display (colorize-string "[" 'WHITE 'ON-BLACK 'BOLD))
  (display (colorize-string "<FILES>" 'BLACK 'ON-GREEN 'UNDERLINE))
  (display (colorize-string "]" 'WHITE 'ON-BLACK 'BOLD))
  (display "üî∞")
  (newline)
  (newline)
  (display "  ")
  (display (colorize-string "-b, --basename" 'BLACK 'ON-GREEN 'BOLD 'UNDERLINE))
  (display "     ")
  (display (colorize-string "show base filenames without directories or extensions" 'MAGENTA))
  (newline)
  (display "  ")
  (display (colorize-string "-d, --dirname" 'BLACK 'ON-GREEN 'BOLD 'UNDERLINE))
  (display "      ")
  (display (colorize-string "display directory names separate from filenames" 'MAGENTA))
  (newline)
  (display "  ")
  (display (colorize-string "-e, --extname" 'BLACK 'ON-GREEN 'BOLD 'UNDERLINE))
  (display "      ")
  (display (colorize-string "output file extensions without base and directory names" 'MAGENTA))
  (newline)
  (display "  ")
  (display (colorize-string "-n, --noslash" 'BLACK 'ON-GREEN 'BOLD 'UNDERLINE))
  (display "      ")
  (display (colorize-string "delete slash character(s) from start of each path name" 'MAGENTA))
  (newline)
  (display "  ")
  (display (colorize-string "-r, --rmtrail" 'BLACK 'ON-GREEN 'BOLD 'UNDERLINE))
  (display "      ")
  (display (colorize-string "remove forward slash(es) from end of each path string" 'MAGENTA))
  (newline)
  (display "  ")
  (display (colorize-string "-g, --generate" 'BLACK 'ON-GREEN 'BOLD 'UNDERLINE))
  (display "     ")
  (display (colorize-string "generate and test a.k.a. brute-force search" 'MAGENTA))
  (display "    ")
  (display (colorize-string "{" 'WHITE 'ON-BLACK 'BOLD))
  (display (colorize-string "basename" 'BLACK 'ON-CYAN 'UNDERLINE))
  (display (colorize-string "." 'BLACK 'ON-CYAN 'BOLD))
  (display (colorize-string "[" 'BLACK 'ON-WHITE 'BOLD))
  (display (colorize-string "extname" 'BLACK 'ON-CYAN 'UNDERLINE))
  (display (colorize-string "[" 'BLACK 'ON-WHITE 'BOLD))
  (display (colorize-string "." 'BLACK 'ON-CYAN 'BOLD))
  (display (colorize-string "]" 'BLACK 'ON-WHITE 'BOLD))
  (display (colorize-string "]" 'BLACK 'ON-WHITE 'BOLD))
  (display (colorize-string "%" 'BLACK 'ON-CYAN 'BOLD))
  (display (colorize-string "["  'BLACK 'ON-WHITE 'BOLD))
  (display (colorize-string "00" 'BLACK 'ON-CYAN 'UNDERLINE))
  (display (colorize-string "-" 'BLACK 'ON-CYAN 'BOLD))
  (display (colorize-string "FF" 'BLACK 'ON-CYAN 'UNDERLINE))
  (display (colorize-string "]" 'BLACK 'ON-WHITE 'BOLD))
  (display (colorize-string "}" 'WHITE 'ON-BLACK 'BOLD))
  (newline)
  (display "  ")
  (display (colorize-string "-m, --macos" 'BLACK 'ON-GREEN 'BOLD 'UNDERLINE))
  (display "        ")                                                 ;
  (display (colorize-string "MacOS dot-underscore and similar backup naming" 'MAGENTA))
  (display " ")
  (display (colorize-string "{" 'WHITE 'ON-BLACK 'BOLD))
  (display (colorize-string "._" 'BLACK 'ON-CYAN 'BOLD))
  (display (colorize-string "basename" 'BLACK 'ON-CYAN 'UNDERLINE))
  (display (colorize-string "." 'BLACK 'ON-CYAN 'BOLD))
  (display (colorize-string "extname" 'BLACK 'ON-CYAN 'UNDERLINE))
  (display ", ")
  (display (colorize-string "_" 'BLACK 'ON-CYAN 'BOLD))
  (display (colorize-string "basename" 'BLACK 'ON-CYAN 'UNDERLINE))
  (display (colorize-string "." 'BLACK 'ON-CYAN 'BOLD))
  (display (colorize-string "extname" 'BLACK 'ON-CYAN 'UNDERLINE))
  (display (colorize-string ", ..." 'WHITE 'ON-BLACK))
  (display (colorize-string "}" 'WHITE 'ON-BLACK 'BOLD))
  (newline)
  (display "  ")
  (display (colorize-string "-s, --saves" 'BLACK 'ON-GREEN 'BOLD 'UNDERLINE))
  (display "        ")
  (display (colorize-string "format filenames as Emacs auto-save files" 'MAGENTA))
  (display "      ")
  (display (colorize-string "{" 'WHITE 'ON-BLACK 'BOLD))
  (display (colorize-string "#" 'BLACK 'ON-CYAN 'BOLD 'UNDERLINE))
  (display (colorize-string "basename" 'BLACK 'ON-CYAN 'UNDERLINE))
  (display (colorize-string "." 'BLACK 'ON-CYAN 'BOLD))
  (display (colorize-string "extname" 'BLACK 'ON-CYAN 'UNDERLINE))
  (display (colorize-string "#" 'BLACK 'ON-CYAN 'BOLD 'UNDERLINE))
  (display ", ")
  (display (colorize-string "basename" 'BLACK 'ON-CYAN 'UNDERLINE))
  (display (colorize-string "." 'BLACK 'ON-CYAN 'BOLD))
  (display (colorize-string "extname" 'BLACK 'ON-CYAN 'UNDERLINE))
  (display (colorize-string "~" 'BLACK 'ON-CYAN 'BOLD))
  (display (colorize-string "}" 'WHITE 'ON-BLACK 'BOLD))
  (newline)
  (display "  ")
  (display (colorize-string "-f, --filename" 'BLACK 'ON-GREEN 'BOLD 'UNDERLINE))
  (display "     ")
  (display (colorize-string "print full filenames as base and extension" 'MAGENTA))
  (display "     ")
  (display (colorize-string "{" 'WHITE 'ON-BLACK 'BOLD))
  (display (colorize-string "basename" 'BLACK 'ON-CYAN 'UNDERLINE))
  (display (colorize-string "." 'BLACK 'ON-CYAN 'BOLD))
  (display (colorize-string "extname" 'BLACK 'ON-CYAN 'UNDERLINE))
  (display (colorize-string "}" 'WHITE 'ON-BLACK 'BOLD))
  (newline)
  (display "  ")
  (display (colorize-string "-x, --xtdirname" 'BLACK 'ON-GREEN 'BOLD 'UNDERLINE))
  (display "    ")
  (display (colorize-string "postfix file extensions to directory names" 'MAGENTA))
  (display "     ")
  (display (colorize-string "{" 'WHITE 'ON-BLACK 'BOLD))
  (display (colorize-string "dirname" 'BLACK 'ON-CYAN 'UNDERLINE))
  (display (colorize-string "." 'BLACK 'ON-CYAN 'BOLD))
  (display (colorize-string "extname" 'BLACK 'ON-CYAN 'UNDERLINE))
  (display (colorize-string "}" 'WHITE 'ON-BLACK 'BOLD))
  (newline)
  (display "  ")
  (display (colorize-string "-v, --vimswap" 'BLACK 'ON-GREEN 'BOLD 'UNDERLINE))
  (display "      ")
  (display (colorize-string "format path names as VIM swap files" 'MAGENTA))
  (display "            ")
  (display (colorize-string "{" 'WHITE 'ON-BLACK 'BOLD))
  (display (colorize-string "." 'BLACK 'ON-CYAN 'BOLD))
  (display (colorize-string "basename" 'BLACK 'ON-CYAN 'UNDERLINE))
  (display (colorize-string "." 'BLACK 'ON-CYAN 'BOLD))
  (display (colorize-string "extname" 'BLACK 'ON-CYAN 'UNDERLINE))
  (display (colorize-string "." 'BLACK 'ON-CYAN 'BOLD))
  (display (colorize-string "sw" 'BLACK 'ON-CYAN 'UNDERLINE))
  (display (colorize-string "["  'BLACK 'ON-WHITE 'BOLD))
  (display (colorize-string "p" 'BLACK 'ON-CYAN 'UNDERLINE))
  (display (colorize-string "-" 'BLACK 'ON-CYAN 'BOLD))
  (display (colorize-string "z" 'BLACK 'ON-CYAN 'UNDERLINE))
  (display (colorize-string "]" 'BLACK 'ON-WHITE 'BOLD))
  (display (colorize-string "}" 'WHITE 'ON-BLACK 'BOLD))
  (newline)
  (newline)
  (display "  ")
  (display (colorize-string "-" 'BLACK 'ON-GREEN 'BOLD 'UNDERLINE))
  (display (colorize-string "G" 'BLACK 'ON-GREEN 'BOLD 'UNDERLINE))
  (display (colorize-string "N" 'BLACK 'ON-CYAN 'BOLD 'UNDERLINE))
  (display " ")
  (display (colorize-string "--" 'BLACK 'ON-GREEN 'BOLD 'UNDERLINE))
  (display (colorize-string "Grow" 'BLACK 'ON-GREEN 'BOLD 'UNDERLINE))
  (display " ")
  (display (colorize-string "N" 'BLACK 'ON-CYAN 'BOLD 'UNDERLINE))
  (display "         ")
  (display (colorize-string "ü•Ä i.e. " 'REVERSE 'MAGENTA))
  (display (colorize-string "--Grow 0" 'MAGENTA 'UNDERLINE 'BOLD 'REVERSE))
  (display (colorize-string ", " 'MAGENTA 'REVERSE))
  (display (colorize-string "-G1" 'MAGENTA 'UNDERLINE 'BOLD 'REVERSE))
  (display (colorize-string ", " 'MAGENTA 'REVERSE))
  (display (colorize-string "--Grow 2" 'MAGENTA 'UNDERLINE 'BOLD 'REVERSE))
  (display (colorize-string ", etc. refer to " 'MAGENTA 'REVERSE))
  (display (colorize-string "README.md" 'MAGENTA 'UNDERLINE 'BOLD 'REVERSE))
  (display (colorize-string " for more info üåπ" 'MAGENTA 'REVERSE))
  (newline)
  (newline)
  (display "  ")
  (display (colorize-string "-L, --Length" 'BLACK 'ON-GREEN 'BOLD 'UNDERLINE))
  (display "   ")
  (display (colorize-string "LDEPTH" 'BLACK 'ON-YELLOW 'REVERSE 'UNDERLINE))
  (display "  ")
  (display (colorize-string "üçÄ remove directories of given depth from output listing" 'GREEN))
  (display "  ")
  (display (colorize-string "[" 'WHITE 'ON-BLACK 'BOLD))
  (display (colorize-string "cardinality" 'BLACK 'ON-RED 'UNDERLINE))
  (display (colorize-string "-" 'BLACK 'ON-RED 'BOLD))
  (display (colorize-string "intersection" 'BLACK 'ON-RED 'UNDERLINE))
  (display (colorize-string "]" 'WHITE 'ON-BLACK 'BOLD))
  (newline)
  (display "  ")
  (display (colorize-string "-T, --Traverse" 'BLACK 'ON-GREEN 'BOLD 'UNDERLINE))
  (display " ")
  (display (colorize-string "TDEPTH" 'BLACK 'ON-YELLOW 'REVERSE 'UNDERLINE))
  (display "  ")
  (display (colorize-string "üåø append path name traversal strings to directory paths" 'GREEN))
  (display "  ")
  (display (colorize-string "[" 'WHITE 'ON-BLACK 'BOLD))
  (display (colorize-string "cartesian" 'BLACK 'ON-RED 'UNDERLINE))
  (display (colorize-string "-" 'BLACK 'ON-RED 'BOLD))
  (display (colorize-string "product" 'BLACK 'ON-RED 'UNDERLINE))
  (display (colorize-string "]" 'WHITE 'ON-BLACK 'BOLD))
  (newline)
  (display "  ")
  (display (colorize-string "-C, --Combos" 'BLACK 'ON-GREEN 'BOLD 'UNDERLINE))
  (display "   ")
  (display (colorize-string "CDEPTH" 'BLACK 'ON-YELLOW 'REVERSE 'UNDERLINE))
  (display "  ")
  (display (colorize-string "üå¥ calculate path names at provided directory level only" 'GREEN))
  (display "  ")
  (display (colorize-string "[" 'WHITE 'ON-BLACK 'BOLD))
  (display (colorize-string "n" 'BLACK 'ON-RED 'UNDERLINE))
  (display (colorize-string "-" 'BLACK 'ON-RED 'BOLD))
  (display (colorize-string "choose" 'BLACK 'ON-RED 'UNDERLINE))
  (display (colorize-string "-" 'BLACK 'ON-RED 'BOLD))
  (display (colorize-string "r" 'BLACK 'ON-RED 'UNDERLINE))
  (display (colorize-string "]" 'WHITE 'ON-BLACK 'BOLD))
  (newline)
  (display "  ")
  (display (colorize-string "-P, --Powerset" 'BLACK 'ON-GREEN 'BOLD 'UNDERLINE))
  (display " ")
  (display (colorize-string "PDEPTH" 'BLACK 'ON-YELLOW 'REVERSE 'UNDERLINE))
  (display "  ")
  (display (colorize-string "üå≤ compute all directory combinations up to given height" 'GREEN))
  (display "  ")
  (display (colorize-string "[" 'WHITE 'ON-BLACK 'BOLD))
  (display (colorize-string "n" 'BLACK 'ON-RED 'UNDERLINE))
  (display (colorize-string "-" 'BLACK 'ON-RED 'BOLD))
  (display (colorize-string "subsets" 'BLACK 'ON-RED 'UNDERLINE))
  (display (colorize-string "]" 'WHITE 'ON-BLACK 'BOLD))
  (newline)
  (newline)
  (display "  ")
  (display (colorize-string "<OPTIONS>" 'BLACK 'ON-GREEN 'UNDERLINE))
  (display "              ")
  (display (colorize-string "‚õ≥ one or more of the command line flags shown here" 'YELLOW))
  (newline)
  (display "  ")
  (display (colorize-string "<FILES>" 'BLACK 'ON-GREEN 'UNDERLINE))
  (display "                ")
  (display (colorize-string "üìÇ locations of wordlist files to parse and expand upon" 'YELLOW))
  (newline)
  (newline)
  (display "  ")
  (display (colorize-string "LDEPTH" 'BLACK 'ON-YELLOW 'REVERSE 'UNDERLINE))
  (display "                 ")
  (display (colorize-string "üçÄ remove pathnames deeper than this many directories" 'GREEN))
  (display "     ")
  (display (colorize-string "(" 'WHITE 'ON-BLACK 'BOLD))
  (display (colorize-string "nano" 'BLACK 'ON-BLUE 'UNDERLINE))
  (display (colorize-string ")" 'WHITE 'ON-BLACK 'BOLD))
  (newline)
  (display "  ")
  (display (colorize-string "TDEPTH" 'BLACK 'ON-YELLOW 'REVERSE 'UNDERLINE))
  (display "                 ")
  (display (colorize-string "üåø number of folders to traverse starting from one" 'GREEN))
  (display "        ")
  (display (colorize-string "(" 'WHITE 'ON-BLACK 'BOLD))
  (display (colorize-string "Tiny" 'BLACK 'ON-BLUE 'UNDERLINE))
  (display (colorize-string ")" 'WHITE 'ON-BLACK 'BOLD))
  (newline)
  (display "  ")
  (display (colorize-string "CDEPTH" 'BLACK 'ON-YELLOW 'REVERSE 'UNDERLINE))
  (display "                 ")
  (display (colorize-string "üå¥ maximum number of slashes to allow in computed paths" 'GREEN))
  (display "   ")
  (display (colorize-string "(" 'WHITE 'ON-BLACK 'BOLD))
  (display (colorize-string "SMall" 'BLACK 'ON-BLUE 'UNDERLINE))
  (display (colorize-string ")" 'WHITE 'ON-BLACK 'BOLD))
  (newline)
  (display "  ")
  (display (colorize-string "PDEPTH" 'BLACK 'ON-YELLOW 'REVERSE 'UNDERLINE))
  (display "                 ")
  (display (colorize-string "üå≤ generate path subsets up to this level of directories" 'GREEN))
  (display "  ")
  (display (colorize-string "(" 'WHITE 'ON-BLACK 'BOLD))
  (display (colorize-string "MEDIum" 'BLACK 'ON-BLUE 'UNDERLINE))
  (display (colorize-string ")" 'WHITE 'ON-BLACK 'BOLD))
  (newline)
  (newline)
  (display "  ")
  (display (colorize-string "|" 'WHITE 'ON-BLACK 'BOLD))
  (display (colorize-string "Note" 'BLUE))
  (display (colorize-string "|" 'WHITE 'ON-BLACK 'BOLD))
  (display "                 ")
  (display "üìù size notations signify amount of output created by combinatoric depth modes above")
  (newline)
  (newline)
  (exit 0))
