View Source GitHub.Issues.CLI (GitHub Issues v0.4.54)

Parses the command line and prints a table of the first or last n issues of a GitHub project.

Inspired by the book Programming Elixir by Dave Thomas.

Summary

Types

GitHub project

GitHub user

Functions

Parses the command line and prints a table of the first or last n issues of a GitHub project.

Types

@type project() :: String.t()

GitHub project

@type user() :: String.t()

GitHub user

Functions

@spec main(OptionParser.argv()) :: :ok

Parses the command line and prints a table of the first or last n issues of a GitHub project.

argv can be "-h" or "--help", which prints info on the command's usage and syntax. Otherwise it is a GitHub user, project, and optionally the number of issues to format (the first n ones). To format the last n issues, specify switch --last.

To ring the bell, specify switch --bell. To choose a table style, specify switch --table-style.

Parameters

  • argv - command line arguments (list)

Switches

  • -h or --help - for help
  • -b or --bell - to ring the bell
  • -l or --last - to format the last n issues
  • -t or --table-style - to choose a table style

Table styles

  • bare - no colors
  • barish - like bare but colored
  • cyan - cyan background
  • cyan-alt - cyan header, alternating row colors
  • cyan-border - light cyan border
  • cyan-mult - cyan header, 3 repeating row colors
  • dark - dark colors
  • dark-alt - dark colors, alternating row colors
  • dark-mult - dark colors, 3 repeating row colors
  • dashed - no colors
  • dotted - slightly colored
  • dotted-alt - slightly colored, alternating row colors
  • dotted-mult - slightly colored, 3 repeating row colors
  • game - game board
  • green - green background
  • green-alt - green header, alternating row colors
  • green-border - light green border
  • green-border-padded - light green border with extra padding
  • green-border-unpadded - light green border without padding
  • green-mult - green header, 3 repeating row colors
  • green-padded - like green but with extra padding
  • green-unpadded - like green but without padding
  • light - light colors
  • light-alt - light colors, alternating row colors
  • light-mult - light colors, 3 repeating row colors
  • medium - medium colors
  • medium-alt - medium colors, alternating row colors
  • medium-mult - medium colors, 3 repeating row colors
  • mixed - fillers revealed
  • plain - slightly colored
  • pretty - multicolored
  • pretty-alt - multicolored, alternating row colors
  • pretty-mult - multicolored, 3 repeating row colors
  • test - no colors
  • yellow - light yellow background
  • yellow-border - light yellow border