Class: Rbnotes::Commands::Builtins::Usage

Inherits:
Command
  • Object
show all
Defined in:
lib/rbnotes/commands.rb

Instance Method Summary collapse

Instance Method Details

#descriptionObject



50
51
52
# File 'lib/rbnotes/commands.rb', line 50

def description
  "Print usage"
end

#execute(_, _) ⇒ Object



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/rbnotes/commands.rb', line 54

def execute(_, _)
  puts <<USAGE
Syntax:
  #{Rbnotes::NAME} [-c| --conf CONF_FILE] [command] [args]

Example usage:
  #{Rbnotes::NAME} add [-t STAMP_PATTERN]
  #{Rbnotes::NAME} commands [-d]
  #{Rbnotes::NAME} delete [TIMESTAMP]
  #{Rbnotes::NAME} export [TIMESTAMP [FILENAME]]
  #{Rbnotes::NAME} import [-m|--use-mtime] FILE
  #{Rbnotes::NAME} list [STAMP_PATTERN|KEYWORD]
  #{Rbnotes::NAME} search PATTERN [STAMP_PATTERN]
  #{Rbnotes::NAME} show [TIMESTAMP...]
  #{Rbnotes::NAME} statistics ([-y]|[-m])
  #{Rbnotes::NAME} update [-k] [TIMESTAMP]

Further help for each command:
  #{Rbnotes::NAME} help commands
  #{Rbnotes::NAME} help [COMMAND]

Further information:
  https://github.com/mnbi/rbnotes/wiki

USAGE
end

#helpObject



81
82
83
84
85
86
87
88
# File 'lib/rbnotes/commands.rb', line 81

def help
  puts <<HELP_USAGE
usage:
    #{Rbnotes::NAME} usage

Print a short example of usage.
HELP_USAGE
end