doto 0.0.1.pre.alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. checksums.yaml +7 -0
  2. data/.env.test +1 -0
  3. data/.reek.yml +20 -0
  4. data/.rspec +3 -0
  5. data/.rubocop.yml +206 -0
  6. data/.ruby-version +1 -0
  7. data/CHANGELOG.md +7 -0
  8. data/CODE_OF_CONDUCT.md +84 -0
  9. data/Gemfile +30 -0
  10. data/Gemfile.lock +179 -0
  11. data/LICENSE.txt +21 -0
  12. data/README.md +38 -0
  13. data/Rakefile +16 -0
  14. data/bin/console +36 -0
  15. data/bin/doto +3 -0
  16. data/bin/setup +18 -0
  17. data/exe/doto +33 -0
  18. data/lib/core/ruby/color_theme_colors.rb +16 -0
  19. data/lib/core/ruby/color_theme_mode.rb +42 -0
  20. data/lib/core/ruby/wrap_and_join.rb +31 -0
  21. data/lib/doto/base_cli.rb +56 -0
  22. data/lib/doto/cli.rb +131 -0
  23. data/lib/doto/command_services/add_entry_service.rb +50 -0
  24. data/lib/doto/crud/json_file.rb +161 -0
  25. data/lib/doto/env.rb +44 -0
  26. data/lib/doto/migration/base_service.rb +118 -0
  27. data/lib/doto/migration/migrator.rb +24 -0
  28. data/lib/doto/migration/raw_helpers/color_theme_hash.rb +13 -0
  29. data/lib/doto/migration/raw_helpers/configuration_hash.rb +15 -0
  30. data/lib/doto/migration/raw_helpers/entry_group_hash.rb +13 -0
  31. data/lib/doto/migration/raw_json_file.rb +15 -0
  32. data/lib/doto/migration/raw_json_files.rb +56 -0
  33. data/lib/doto/migration/v20230613121411/service.rb +94 -0
  34. data/lib/doto/migration/v20240210161248/service.rb +148 -0
  35. data/lib/doto/migration/version.rb +7 -0
  36. data/lib/doto/models/color_theme.rb +224 -0
  37. data/lib/doto/models/configuration.rb +185 -0
  38. data/lib/doto/models/entry.rb +63 -0
  39. data/lib/doto/models/entry_group.rb +223 -0
  40. data/lib/doto/models/migration_version.rb +49 -0
  41. data/lib/doto/models/project.rb +295 -0
  42. data/lib/doto/presenters/base_presenter.rb +32 -0
  43. data/lib/doto/presenters/base_presenter_ex.rb +15 -0
  44. data/lib/doto/presenters/color_theme_presenter.rb +52 -0
  45. data/lib/doto/presenters/color_theme_show_presenter.rb +55 -0
  46. data/lib/doto/presenters/configuration_presenter.rb +50 -0
  47. data/lib/doto/presenters/entry_group/list/date_presenter.rb +77 -0
  48. data/lib/doto/presenters/entry_group/list/dates_presenter.rb +60 -0
  49. data/lib/doto/presenters/entry_group/list/messages.rb +15 -0
  50. data/lib/doto/presenters/entry_group/list/nothing_to_list.rb +15 -0
  51. data/lib/doto/presenters/entry_group_presenter.rb +35 -0
  52. data/lib/doto/presenters/entry_presenter.rb +25 -0
  53. data/lib/doto/presenters/export/all_presenter.rb +44 -0
  54. data/lib/doto/presenters/export/dates_presenter.rb +55 -0
  55. data/lib/doto/presenters/import/all_presenter.rb +57 -0
  56. data/lib/doto/presenters/import/dates_presenter.rb +70 -0
  57. data/lib/doto/presenters/import/import_entry.rb +22 -0
  58. data/lib/doto/presenters/import/import_file.rb +33 -0
  59. data/lib/doto/presenters/project/create_presenter.rb +44 -0
  60. data/lib/doto/presenters/project/defaultable.rb +15 -0
  61. data/lib/doto/presenters/project/delete_by_number_presenter.rb +54 -0
  62. data/lib/doto/presenters/project/delete_presenter.rb +53 -0
  63. data/lib/doto/presenters/project/list_presenter.rb +24 -0
  64. data/lib/doto/presenters/project/rename_by_number_presenter.rb +63 -0
  65. data/lib/doto/presenters/project/rename_presenter.rb +57 -0
  66. data/lib/doto/presenters/project/use_by_number_presenter.rb +57 -0
  67. data/lib/doto/presenters/project/use_presenter.rb +56 -0
  68. data/lib/doto/services/color_theme/hydrator_service.rb +42 -0
  69. data/lib/doto/services/configuration/hydrator_service.rb +42 -0
  70. data/lib/doto/services/entry/hydrator_service.rb +33 -0
  71. data/lib/doto/services/entry_group/browse_service.rb +100 -0
  72. data/lib/doto/services/entry_group/counter_service.rb +32 -0
  73. data/lib/doto/services/entry_group/deleter_service.rb +35 -0
  74. data/lib/doto/services/entry_group/editor_service.rb +103 -0
  75. data/lib/doto/services/entry_group/exporter_service.rb +98 -0
  76. data/lib/doto/services/entry_group/hydrator_service.rb +37 -0
  77. data/lib/doto/services/entry_group/importer_service.rb +117 -0
  78. data/lib/doto/services/migration_version/hydrator_service.rb +36 -0
  79. data/lib/doto/services/project/hydrator_service.rb +40 -0
  80. data/lib/doto/services/project/rename_service.rb +70 -0
  81. data/lib/doto/services/stderr_redirector_service.rb +27 -0
  82. data/lib/doto/services/stdout_redirector_service.rb +27 -0
  83. data/lib/doto/services/temp_file/reader_service.rb +33 -0
  84. data/lib/doto/services/temp_file/writer_service.rb +35 -0
  85. data/lib/doto/subcommands/base_subcommand.rb +12 -0
  86. data/lib/doto/subcommands/browse.rb +49 -0
  87. data/lib/doto/subcommands/config.rb +81 -0
  88. data/lib/doto/subcommands/delete.rb +108 -0
  89. data/lib/doto/subcommands/edit.rb +48 -0
  90. data/lib/doto/subcommands/export.rb +62 -0
  91. data/lib/doto/subcommands/import.rb +72 -0
  92. data/lib/doto/subcommands/list.rb +95 -0
  93. data/lib/doto/subcommands/project.rb +146 -0
  94. data/lib/doto/subcommands/theme.rb +131 -0
  95. data/lib/doto/support/ask.rb +44 -0
  96. data/lib/doto/support/color_themable.rb +36 -0
  97. data/lib/doto/support/command_help_colorizeable.rb +34 -0
  98. data/lib/doto/support/command_hookable.rb +71 -0
  99. data/lib/doto/support/command_options/doto_times.rb +48 -0
  100. data/lib/doto/support/command_options/time.rb +84 -0
  101. data/lib/doto/support/command_options/time_mnemonic.rb +108 -0
  102. data/lib/doto/support/command_options/time_mnemonics.rb +16 -0
  103. data/lib/doto/support/descriptable.rb +29 -0
  104. data/lib/doto/support/entry_group_browsable.rb +104 -0
  105. data/lib/doto/support/field_errors.rb +11 -0
  106. data/lib/doto/support/fileable.rb +136 -0
  107. data/lib/doto/support/presentable.rb +11 -0
  108. data/lib/doto/support/project_file_system.rb +118 -0
  109. data/lib/doto/support/short_string.rb +24 -0
  110. data/lib/doto/support/time_comparable.rb +21 -0
  111. data/lib/doto/support/time_formatable.rb +65 -0
  112. data/lib/doto/support/times_sortable.rb +71 -0
  113. data/lib/doto/support/transform_project_name.rb +24 -0
  114. data/lib/doto/support/utils.rb +11 -0
  115. data/lib/doto/validators/color_theme_validator.rb +74 -0
  116. data/lib/doto/validators/description_validator.rb +51 -0
  117. data/lib/doto/validators/entries_validator.rb +77 -0
  118. data/lib/doto/validators/project_name_validator.rb +58 -0
  119. data/lib/doto/validators/time_validator.rb +25 -0
  120. data/lib/doto/validators/version_validator.rb +29 -0
  121. data/lib/doto/version.rb +6 -0
  122. data/lib/doto/views/base_list_view.rb +41 -0
  123. data/lib/doto/views/color_theme/index.rb +62 -0
  124. data/lib/doto/views/color_theme/show.rb +107 -0
  125. data/lib/doto/views/configuration/show.rb +41 -0
  126. data/lib/doto/views/entry_group/edit.rb +121 -0
  127. data/lib/doto/views/entry_group/list.rb +23 -0
  128. data/lib/doto/views/entry_group/shared/no_entries_to_display.rb +53 -0
  129. data/lib/doto/views/entry_group/shared/no_entries_to_display_for_month_of.rb +32 -0
  130. data/lib/doto/views/entry_group/shared/no_entries_to_display_for_week_of.rb +33 -0
  131. data/lib/doto/views/entry_group/shared/no_entries_to_display_for_year_of.rb +33 -0
  132. data/lib/doto/views/entry_group/show.rb +63 -0
  133. data/lib/doto/views/export.rb +82 -0
  134. data/lib/doto/views/import.rb +105 -0
  135. data/lib/doto/views/import_dates.rb +17 -0
  136. data/lib/doto/views/project/create.rb +87 -0
  137. data/lib/doto/views/project/delete.rb +96 -0
  138. data/lib/doto/views/project/delete_by_number.rb +19 -0
  139. data/lib/doto/views/project/list.rb +115 -0
  140. data/lib/doto/views/project/rename.rb +98 -0
  141. data/lib/doto/views/project/rename_by_number.rb +21 -0
  142. data/lib/doto/views/project/use.rb +97 -0
  143. data/lib/doto/views/project/use_by_number.rb +19 -0
  144. data/lib/doto/views/shared/error.rb +17 -0
  145. data/lib/doto/views/shared/info.rb +17 -0
  146. data/lib/doto/views/shared/message.rb +85 -0
  147. data/lib/doto/views/shared/model_errors.rb +32 -0
  148. data/lib/doto/views/shared/success.rb +17 -0
  149. data/lib/doto/views/shared/warning.rb +17 -0
  150. data/lib/doto.rb +33 -0
  151. data/lib/locales/en/active_record.yml +17 -0
  152. data/lib/locales/en/commands.yml +165 -0
  153. data/lib/locales/en/miscellaneous.yml +29 -0
  154. data/lib/locales/en/presenters.yml +19 -0
  155. data/lib/locales/en/services.yml +14 -0
  156. data/lib/locales/en/subcommands.yml +786 -0
  157. data/lib/seed_data/0/.todo +5 -0
  158. data/lib/seed_data/20230613121411/.doto +8 -0
  159. data/lib/seed_data/20230613121411/doto/migration_version.json +3 -0
  160. data/lib/seed_data/20230613121411/doto/themes/cherry.json +79 -0
  161. data/lib/seed_data/20230613121411/doto/themes/christmas.json +79 -0
  162. data/lib/seed_data/20230613121411/doto/themes/default.json +79 -0
  163. data/lib/seed_data/20230613121411/doto/themes/lemon.json +79 -0
  164. data/lib/seed_data/20230613121411/doto/themes/light.json +79 -0
  165. data/lib/seed_data/20230613121411/doto/themes/matrix.json +79 -0
  166. data/lib/seed_data/20230613121411/doto/themes/whiteout.json +79 -0
  167. data/lib/seed_data/20240210161248/.doto +9 -0
  168. data/lib/seed_data/20240210161248/doto/current_project.json +4 -0
  169. data/lib/seed_data/20240210161248/doto/migration_version.json +3 -0
  170. data/lib/seed_data/20240210161248/doto/projects/default/project.json +5 -0
  171. data/lib/seed_data/20240210161248/doto/themes/cherry.json +79 -0
  172. data/lib/seed_data/20240210161248/doto/themes/christmas.json +79 -0
  173. data/lib/seed_data/20240210161248/doto/themes/default.json +79 -0
  174. data/lib/seed_data/20240210161248/doto/themes/lemon.json +79 -0
  175. data/lib/seed_data/20240210161248/doto/themes/light.json +79 -0
  176. data/lib/seed_data/20240210161248/doto/themes/matrix.json +79 -0
  177. data/lib/seed_data/20240210161248/doto/themes/whiteout.json +79 -0
  178. data/sig/dsu.rbs +4 -0
  179. metadata +406 -0
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'message'
4
+
5
+ module Doto
6
+ module Views
7
+ module Shared
8
+ class Error < Message
9
+ def initialize(messages:, header: nil, options: {})
10
+ options = { header: header, output_stream: $stderr }.merge(options)
11
+
12
+ super(messages: messages, message_type: :error, options: options)
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'message'
4
+
5
+ module Doto
6
+ module Views
7
+ module Shared
8
+ class Info < Message
9
+ def initialize(messages:, header: nil, options: {})
10
+ options = { header: header, output_stream: $stdout }.merge(options)
11
+
12
+ super(messages: messages, message_type: :info, options: options)
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,85 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../../models/color_theme'
4
+
5
+ module Doto
6
+ module Views
7
+ module Shared
8
+ class Message
9
+ include Support::ColorThemable
10
+
11
+ MESSAGE_TYPES = %i[error info success warning].freeze
12
+
13
+ def initialize(messages:, message_type:, options: {})
14
+ messages = [messages] unless messages.is_a?(Array)
15
+ messages = messages.select(&:present?)
16
+
17
+ validate_arguments!(messages, message_type, options)
18
+
19
+ @messages = messages
20
+ @message_type = message_type
21
+ @options = options || {}
22
+ @message_color = color_theme.public_send(message_type)
23
+ @header = options[:header]
24
+ @ordered_list = options.fetch(:ordered_list, true)
25
+ end
26
+
27
+ def render
28
+ output_stream.puts to_s
29
+ end
30
+
31
+ def to_s
32
+ return if messages.empty?
33
+
34
+ strings = []
35
+
36
+ strings << apply_theme(header, theme_color: color_theme.header) if header.present?
37
+
38
+ strings << if messages.one?
39
+ apply_theme(messages[0], theme_color: message_color)
40
+ else
41
+ messages.each_with_index.map do |message, index|
42
+ message = "#{index + 1}. #{message}" if ordered_list?
43
+ apply_theme(message, theme_color: message_color)
44
+ end
45
+ end
46
+
47
+ strings.flatten.join("\n")
48
+ end
49
+
50
+ private
51
+
52
+ attr_reader :messages, :message_color, :message_type, :header, :options
53
+
54
+ def color_theme
55
+ @color_theme ||= begin
56
+ theme_name = options.fetch(:theme_name, Models::Configuration.new.theme_name)
57
+ Models::ColorTheme.find(theme_name: theme_name)
58
+ end
59
+ end
60
+
61
+ def ordered_list?
62
+ @ordered_list
63
+ end
64
+
65
+ def output_stream
66
+ @output_stream ||= options.fetch(:output_stream, $stdout)
67
+ end
68
+
69
+ def validate_arguments!(messages, message_type, options)
70
+ raise ArgumentError, 'messages is empty' if messages.empty?
71
+ unless Models::ColorTheme::DEFAULT_THEME_COLORS.key?(message_type)
72
+ raise ArgumentError, 'message_type is not a valid message type'
73
+ end
74
+ raise ArgumentError, 'options is nil' if options.nil?
75
+
76
+ %i[\[\] fetch].each do |method|
77
+ next if options.respond_to?(method)
78
+
79
+ raise ArgumentError, "options does not respond to :#{method}"
80
+ end
81
+ end
82
+ end
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'error'
4
+
5
+ module Doto
6
+ module Views
7
+ module Shared
8
+ class ModelErrors < Error
9
+ def initialize(model:, options: {})
10
+ raise ArgumentError, 'model is nil' if model.nil?
11
+ raise ArgumentError, "model is the wrong object type: \"#{model}\"" unless model.is_a?(ActiveModel::Model)
12
+
13
+ # TODO: I18n.
14
+ header = options[:header] || 'The following ERRORS were encountered; changes could not be saved:'
15
+ super(messages: model.errors.full_messages, header: header, options: options)
16
+
17
+ @model = model
18
+ end
19
+
20
+ def render
21
+ return if model.valid?
22
+
23
+ super
24
+ end
25
+
26
+ private
27
+
28
+ attr_reader :model
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'message'
4
+
5
+ module Doto
6
+ module Views
7
+ module Shared
8
+ class Success < Message
9
+ def initialize(messages:, header: nil, options: {})
10
+ options = { header: header, output_stream: $stdout }.merge(options)
11
+
12
+ super(messages: messages, message_type: :success, options: options)
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'message'
4
+
5
+ module Doto
6
+ module Views
7
+ module Shared
8
+ class Warning < Message
9
+ def initialize(messages:, header: nil, options: {})
10
+ options = { header: header, output_stream: $stdout }.merge(options)
11
+
12
+ super(messages: messages, message_type: :warning, options: options)
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
data/lib/doto.rb ADDED
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support/core_ext/hash/indifferent_access'
4
+ require 'active_support/core_ext/object/blank'
5
+ require 'i18n'
6
+ require 'thor'
7
+ require 'time'
8
+
9
+ I18n.load_path += Dir[File.join(__dir__, 'locales/**/*', '*.yml')]
10
+ # I18n.default_locale = :en # (note that `en` is already the default!)
11
+
12
+ Dir.glob("#{__dir__}/core/**/*.rb").each do |file|
13
+ require file
14
+ end
15
+
16
+ Array.include(WrapAndJoin)
17
+ Hash.include(ColorThemeColors)
18
+ Hash.include(ColorThemeMode)
19
+
20
+ require_relative 'doto/env'
21
+ require 'pry-byebug' if Doto.env.development?
22
+
23
+ Dir.glob("#{__dir__}/doto/**/*.rb").each { |file| require file }
24
+
25
+ unless Doto.env.test? || Doto.env.development?
26
+ # NOTE: Add a new migration service to the array whenever a new migration is created.
27
+ options = { pretend: false }
28
+ migration_services = [
29
+ Doto::Migration::V20230613121411::Service.new(options: options),
30
+ Doto::Migration::V20240210161248::Service.new(options: options)
31
+ ]
32
+ Doto::Migration::Migrator.migrate_if!(migration_services: migration_services)
33
+ end
@@ -0,0 +1,17 @@
1
+ en:
2
+ models:
3
+ project:
4
+ errors:
5
+ already_exists: "Project '%{project_name}' already exists."
6
+ delete_default_project: "Project '%{project_name}' is the default project. Change to a different default project before deleting this project."
7
+ delete_only_project: "Project '%{project_name}' is the only project and cannot be deleted."
8
+ does_not_exist: "Project '%{project_name}' does not exist."
9
+ new_project_already_exists: "Project cannot be renamed to '%{project_name}' because the project already exists."
10
+ project_file_not_exist: "Project file '%{project_file}' does not exist."
11
+ activerecord:
12
+ errors:
13
+ models:
14
+ some_model:
15
+ attributes:
16
+ some_attribute:
17
+ some_error: Some error
@@ -0,0 +1,165 @@
1
+ # lib/doto/cli.rb
2
+ #
3
+ # NOTE:
4
+ #
5
+ # Commands should have the following layout:
6
+ #
7
+ # en:
8
+ # commands:
9
+ # my_command:
10
+ # key_mappings: thor key mappings
11
+ # desc: thor command description
12
+ # usage: thor command usage
13
+ # long_desc: thor long description
14
+ #
15
+ # Place key_mappings: at the top of the command entries:
16
+ #
17
+ # en:
18
+ # commands:
19
+ # my_command:
20
+ # key_mappings: m # Single mapping
21
+ # key_mappings: # Array of mappings
22
+ # - 'm'
23
+ # - '-m'
24
+ en:
25
+ commands:
26
+ add:
27
+ key_mappings: a
28
+ desc: add|a [OPTIONS] DESCRIPTION
29
+ usage: Adds a TODO entry having DESCRIPTION to the date associated with the given OPTION
30
+ long_desc: |
31
+ Will add a TODO entry having DESCRIPTION to the date associated with the given OPTION.
32
+
33
+ $ doto add [-d DATE|MNEMONIC|-n|-t|-y] DESCRIPTION
34
+
35
+ $ doto a [-d DATE|MNEMONIC|-n|-t|-y] DESCRIPTION
36
+
37
+ OPTIONS:
38
+
39
+ -d DATE|MNEMONIC: Adds a TODO entry having DESCRIPTION to the DATE or date referenced by the MNEMONIC.
40
+
41
+ %{date_option_description}
42
+
43
+ %{mnemonic_option_description}
44
+
45
+ -n: Adds a TODO entry having DESCRIPTION to today's date (`Time.now`).
46
+
47
+ -t: Adds a TODO entry having DESCRIPTION to tomorrow's date (`Time.new.tomorrow`).
48
+
49
+ -y: Adds a TODO entry having DESCRIPTION to yesterday's date (`Time.new.yesterday`).
50
+
51
+ DESCRIPTION
52
+
53
+ Must be be between 2 and 256 characters (inclusive) in length.
54
+ browse:
55
+ key_mappings: b
56
+ desc: browse|b SUBCOMMAND
57
+ usage: Browse TODO entries by the given SUBCOMMAND
58
+ config:
59
+ key_mappings: c
60
+ desc: config|c SUBCOMMAND
61
+ usage: Manage configuration file for this gem
62
+ delete:
63
+ key_mappings: d
64
+ desc: delete|d SUBCOMMAND
65
+ usage: Delete TODO entries for the given SUBCOMMAND
66
+ edit:
67
+ desc: edit|e SUBCOMMAND
68
+ usage: Edit TODO entries for the given SUBCOMMAND
69
+ key_mappings: e
70
+ export:
71
+ key_mappings: x
72
+ desc: export|x SUBCOMMAND
73
+ usage: Export TODO entries for the given SUBCOMMAND
74
+ import:
75
+ key_mappings: m
76
+ desc: import|m SUBCOMMAND
77
+ usage: Imports TODO entries for the given SUBCOMMAND
78
+ info:
79
+ key_mappings: i
80
+ desc: info|i
81
+ usage: Displays information about this TODO release
82
+ info: |
83
+ Doto Info
84
+ --------------------------------------------------
85
+ Doto version: %{doto_version}
86
+ Configuration version: %{configuration_version}
87
+ Entry group version: %{entry_group_version}
88
+ Color theme version: %{color_theme_version}
89
+
90
+ Config folder: %{config_folder}
91
+ Root folder: %{root_folder}
92
+ Entries folder: %{entries_folder}
93
+ Themes folder: %{themes_folder}
94
+ Gem folder: %{gem_folder}
95
+ Temp folder: %{temp_folder}
96
+
97
+ Migration version folder: %{migration_version_folder}
98
+ Migration file folder: %{migration_file_folder}
99
+ list:
100
+ key_mappings: l
101
+ desc: list|l SUBCOMMAND
102
+ usage: Displays TODO entries for the given SUBCOMMAND
103
+ project:
104
+ key_mappings: p
105
+ desc: project|p SUBCOMMAND
106
+ usage: Manage TODO projects for the given SUBCOMMAND
107
+ theme:
108
+ key_mappings: t
109
+ desc: theme|t SUBCOMMAND
110
+ usage: Manage TODO themes
111
+ version:
112
+ key_mappings:
113
+ - v
114
+ - '-v'
115
+ desc: version|v|-v
116
+ usage: Displays the TODO version for this gem
117
+ # Should these options go under their respective commands
118
+ # (e.g. commands.options.date.name, commands.options.today.aliases, etc.)?
119
+ options:
120
+ date:
121
+ aliases: -d
122
+ name: 'date'
123
+ date_or_mnemonic:
124
+ aliases: -d
125
+ name: 'date'
126
+ banner: 'DATE|MNEMONIC'
127
+ today:
128
+ aliases: -n
129
+ name: 'today'
130
+ tomorrow:
131
+ aliases: -t
132
+ name: 'tomorrow'
133
+ yesterday:
134
+ aliases: -y
135
+ name: 'yesterday'
136
+ include_all: Include dates that have no TODO entries
137
+ date_option_description: |
138
+ DATE
139
+
140
+ In the format of: [d]d-|/[m]m-|/[-|/yyyy].
141
+
142
+ This may be any date string that can be parsed using ruby's `Time.parse`.
143
+ Consequently, you may use use '-' or '/' as date separators,
144
+ as well as omit the year if the date you want to display is the
145
+ current year (e.g. <month>/<day>, or 1/31). Leading zeroes are optional.
146
+ For example: `require 'time'; Time.parse('1/2') # etc.`
147
+
148
+ IMPORTANT: If you include the year as part of your date string, the format of
149
+ the date must be <day>/<month>/<year>, where <day> and <month> may include optional
150
+ leading zeroes, and <year> must be in the format of yyyy. For example
151
+ `require 'time'; Time.parse('31/1/2023') # etc.`
152
+ mnemonic_option_description: |
153
+ MNEMONIC
154
+
155
+ This may be any of the following: n|today|t|tomorrow|y|yesterday|+n|-n.
156
+
157
+ Where n, t, y are aliases for today, tomorrow, and yesterday, respectively.
158
+
159
+ Where +n, -n are relative date mnemonics (RDMs). Generally speaking,
160
+ RDMs are relative to the current date. For example, a RDM of +1 would be
161
+ equal to `Time.now + 1.day` (tomorrow), and a RDM of -1 would be equal to
162
+ `Time.now - 1.day` (yesterday).
163
+
164
+ In some cases the behavior RDMs have on some commands are context dependent;
165
+ in such cases the behavior will be noted.
@@ -0,0 +1,29 @@
1
+ en:
2
+ configuration:
3
+ errors:
4
+ theme_file_missing: Theme file "%{theme_path}" does not exist.
5
+ project_path_missing: Default project "%{project_folder}" does not exist.
6
+ errors:
7
+ error: "Error: %{message}"
8
+ from_option_invalid: Option -f, [--from=DATE|MNEMONIC] value is invalid ["%{from_option}"]
9
+ to_option_invalid: Option -t, [--to=DATE|MNEMONIC] value is invalid ["%{to_option}"]
10
+ project_name_invalid: Project name "%{project_name}" is invalid.
11
+ headers:
12
+ entry:
13
+ could_not_be_added: "An error was encountered; the entry could not be added:"
14
+ messages:
15
+ configuration_file:
16
+ already_exists: Configuration file (%{configuration_file}) already exists.
17
+ created: Configuration file (%{configuration_file}) created.
18
+ deleted: Configuration file (%{configuration_file}) deleted.
19
+ destination_folder_does_not_exist: "Destination folder for configuration file (%{configuration_folder}) does not exist."
20
+ does_not_exist: "Configuration file (%{configuration_file}) does not exist."
21
+ information:
22
+ dates:
23
+ through: "%{from} thru %{to}"
24
+ input:
25
+ try_again: "Please try again. Valid options are [%{options}]."
26
+ migrations:
27
+ error:
28
+ missing_current_migration_service: "No migration service handles the current migration: %{migration_version}."
29
+ failed: "Error running migrations: %{message}"
@@ -0,0 +1,19 @@
1
+ en:
2
+ presenters:
3
+ color_theme_presenter:
4
+ headers:
5
+ color_themes: Color Themes
6
+ current_theme: "* current theme"
7
+ color_theme_show_presenter:
8
+ headers:
9
+ number: No.
10
+ color: Color
11
+ values: Values
12
+ viewing_color_theme: "Viewing color theme: %{theme_name}"
13
+ footer_example: Footer example
14
+ configuration_presenter:
15
+ headers:
16
+ file_contents: "Configuration file contents (%{config_path})"
17
+ entry_group_presenter:
18
+ headers:
19
+ no_entries_available: (no entries available for this day)
@@ -0,0 +1,14 @@
1
+ en:
2
+ services:
3
+ editor_service:
4
+ errors:
5
+ temp_file_error: |
6
+ Failed to open temporary file in editor '%{editor}'; the system error returned was: '%{status}'.
7
+ Check your EDITOR environment variable and the doto editor configuration option (run `doto config info`).
8
+ Run `doto help config` for more information.
9
+ messages:
10
+ editing: "Editing entry group %{formatted_time}..."
11
+ entry_group:
12
+ importer_service:
13
+ errors:
14
+ project_mismatch: The current project "%{current_project_name}" does not match the project "%{import_project_name}" being imported.