# lib/dsu/cli.rb # # NOTE: # # Commands should have the following layout: # # en: # commands: # my_command: # key_mappings: thor key mappings # desc: thor command description # usage: thor command usage # long_desc: thor long description # # Place key_mappings: at the top of the command entries: # # en: # commands: # my_command: # key_mappings: m # Single mapping # key_mappings: # Array of mappings # - 'm' # - '-m' en: commands: add: key_mappings: a desc: add|a [OPTIONS] DESCRIPTION usage: Adds a DSU entry having DESCRIPTION to the date associated with the given OPTION long_desc: | Will add a DSU entry having DESCRIPTION to the date associated with the given OPTION. $ dsu add [-d DATE|MNEMONIC|-n|-t|-y] DESCRIPTION $ dsu a [-d DATE|MNEMONIC|-n|-t|-y] DESCRIPTION OPTIONS: -d DATE|MNEMONIC: Adds a DSU entry having DESCRIPTION to the DATE or date referenced by the MNEMONIC. %{date_option_description} %{mnemonic_option_description} -n: Adds a DSU entry having DESCRIPTION to today's date (`Time.now`). -t: Adds a DSU entry having DESCRIPTION to tomorrow's date (`Time.new.tomorrow`). -y: Adds a DSU entry having DESCRIPTION to yesterday's date (`Time.new.yesterday`). DESCRIPTION Must be be between 2 and 256 characters (inclusive) in length. browse: key_mappings: b desc: browse|b SUBCOMMAND usage: Browse DSU entries by the given SUBCOMMAND config: key_mappings: c desc: config|c SUBCOMMAND usage: Manage configuration file for this gem delete: key_mappings: d desc: delete|d SUBCOMMAND usage: Delete DSU entries for the given SUBCOMMAND edit: desc: edit|e SUBCOMMAND usage: Edit DSU entries for the given SUBCOMMAND key_mappings: e export: key_mappings: x desc: export|x SUBCOMMAND usage: Export DSU entries for the given SUBCOMMAND import: key_mappings: m desc: import|m SUBCOMMAND usage: Imports DSU entries for the given SUBCOMMAND info: key_mappings: i desc: info|i usage: Displays information about this DSU release info: | Dsu Info -------------------------------------------------- Dsu version: %{dsu_version} Configuration version: %{configuration_version} Entry group version: %{entry_group_version} Color theme version: %{color_theme_version} Config folder: %{config_folder} Root folder: %{root_folder} Entries folder: %{entries_folder} Themes folder: %{themes_folder} Gem folder: %{gem_folder} Temp folder: %{temp_folder} Migration version folder: %{migration_version_folder} Migration file folder: %{migration_file_folder} list: key_mappings: l desc: list|l SUBCOMMAND usage: Displays DSU entries for the given SUBCOMMAND project: key_mappings: p desc: project|p SUBCOMMAND usage: Manage DSU projects for the given SUBCOMMAND theme: key_mappings: t desc: theme|t SUBCOMMAND usage: Manage DSU themes version: key_mappings: - v - '-v' desc: version|v|-v usage: Displays the DSU version for this gem # Should these options go under their respective commands # (e.g. commands.options.date.name, commands.options.today.aliases, etc.)? options: date: aliases: -d name: 'date' today: aliases: -n name: 'today' tomorrow: aliases: -t name: 'tomorrow' yesterday: aliases: -y name: 'yesterday' include_all: Include dates that have no DSU entries date_option_description: | DATE In the format of: [d]d-|/[m]m-|/[-|/yyyy]. This may be any date string that can be parsed using ruby's `Time.parse`. Consequently, you may use use '-' or '/' as date separators, as well as omit the year if the date you want to display is the current year (e.g. /, or 1/31). Leading zeroes are optional. For example: `require 'time'; Time.parse('1/2') # etc.` IMPORTANT: If you include the year as part of your date string, the format of the date must be //, where and may include optional leading zeroes, and must be in the format of yyyy. For example `require 'time'; Time.parse('31/1/2023') # etc.` mnemonic_option_description: | MNEMONIC This may be any of the following: n|today|t|tomorrow|y|yesterday|+n|-n. Where n, t, y are aliases for today, tomorrow, and yesterday, respectively. Where +n, -n are relative date mnemonics (RDMs). Generally speaking, RDMs are relative to the current date. For example, a RDM of +1 would be equal to `Time.now + 1.day` (tomorrow), and a RDM of -1 would be equal to `Time.now - 1.day` (yesterday). In some cases the behavior RDMs have on some commands are context dependent; in such cases the behavior will be noted.