ruby_todo 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.rubocop.yml +106 -0
- data/CHANGELOG.md +76 -0
- data/CODE_OF_CONDUCT.md +132 -0
- data/LICENSE.txt +21 -0
- data/README.md +219 -0
- data/Rakefile +12 -0
- data/lib/ruby_todo/version.rb +5 -0
- data/lib/ruby_todo.rb +16 -0
- data/ruby_todo.gemspec +52 -0
- data/sig/ruby_todo.rbs +4 -0
- metadata +211 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: df4bd82cdf26b1fe789c179bb3a9a5539acf1b2a415fb940f11bb61b1301cc95
|
4
|
+
data.tar.gz: 1bc307c35e73e65869096f3999c6a3497060fbaedbeba7f0efd1d0205c2c0d10
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c41c8c4c9eb99d158a575ed241f916afbc3305a3efe62f76eac39c3a10b685c22e15e6cb5f599c6531f242894a0e4b8349642dd1e1116bd92465dd003b8d6901
|
7
|
+
data.tar.gz: 17102824db5bdbae8d64815d8808797504712e64e85de681efdb93788fc3be605d6cdcda91a413aff960b3219d558c0eab0044b39100ab3f9aa228c726fc3d71
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,106 @@
|
|
1
|
+
AllCops:
|
2
|
+
NewCops: enable
|
3
|
+
TargetRubyVersion: 3.0
|
4
|
+
SuggestExtensions: false
|
5
|
+
Exclude:
|
6
|
+
- 'vendor/**/*'
|
7
|
+
- 'bin/**/*'
|
8
|
+
|
9
|
+
plugins:
|
10
|
+
- rubocop-minitest
|
11
|
+
- rubocop-rake
|
12
|
+
|
13
|
+
# Increase line length limit
|
14
|
+
Layout/LineLength:
|
15
|
+
Max: 120
|
16
|
+
|
17
|
+
# Relaxed metrics for all files
|
18
|
+
Metrics/AbcSize:
|
19
|
+
Max: 35
|
20
|
+
Exclude:
|
21
|
+
- 'test/**/*'
|
22
|
+
- 'lib/ruby_todo/cli.rb'
|
23
|
+
- 'lib/ruby_todo/database.rb'
|
24
|
+
- 'lib/ruby_todo/models/template.rb'
|
25
|
+
|
26
|
+
Metrics/ClassLength:
|
27
|
+
Max: 600
|
28
|
+
Exclude:
|
29
|
+
- 'test/**/*'
|
30
|
+
|
31
|
+
Metrics/MethodLength:
|
32
|
+
Max: 35
|
33
|
+
Exclude:
|
34
|
+
- 'test/**/*'
|
35
|
+
- 'lib/ruby_todo/cli.rb'
|
36
|
+
- 'lib/ruby_todo/database.rb'
|
37
|
+
|
38
|
+
Metrics/CyclomaticComplexity:
|
39
|
+
Max: 15
|
40
|
+
|
41
|
+
Metrics/PerceivedComplexity:
|
42
|
+
Max: 20
|
43
|
+
|
44
|
+
# Allow longer blocks in test files and CLI
|
45
|
+
Metrics/BlockLength:
|
46
|
+
Max: 50
|
47
|
+
Exclude:
|
48
|
+
- 'test/**/*'
|
49
|
+
- 'ruby_todo.gemspec'
|
50
|
+
|
51
|
+
# Relaxed rules for test descriptions
|
52
|
+
Naming/VariableNumber:
|
53
|
+
Exclude:
|
54
|
+
- 'test/**/*'
|
55
|
+
- 'lib/ruby_todo/database.rb'
|
56
|
+
|
57
|
+
Naming/PredicateName:
|
58
|
+
Enabled: false
|
59
|
+
|
60
|
+
# Disable documentation requirement for now
|
61
|
+
Style/Documentation:
|
62
|
+
Enabled: false
|
63
|
+
|
64
|
+
# Disabled Minitest-specific rules
|
65
|
+
Minitest/MultipleAssertions:
|
66
|
+
Enabled: false
|
67
|
+
|
68
|
+
Minitest/EmptyLineBeforeAssertionMethods:
|
69
|
+
Enabled: false
|
70
|
+
|
71
|
+
Minitest/UselessAssertion:
|
72
|
+
Enabled: false
|
73
|
+
|
74
|
+
# String literals configuration
|
75
|
+
Style/StringLiterals:
|
76
|
+
Enabled: true
|
77
|
+
EnforcedStyle: double_quotes
|
78
|
+
|
79
|
+
Style/StringLiteralsInInterpolation:
|
80
|
+
EnforcedStyle: double_quotes
|
81
|
+
|
82
|
+
# Gemspec configurations
|
83
|
+
Gemspec/DevelopmentDependencies:
|
84
|
+
Enabled: false
|
85
|
+
|
86
|
+
Gemspec/RequireMFA:
|
87
|
+
Enabled: false
|
88
|
+
|
89
|
+
# Allow some flexibility in style
|
90
|
+
Style/GuardClause:
|
91
|
+
Enabled: false
|
92
|
+
|
93
|
+
Style/IfUnlessModifier:
|
94
|
+
Enabled: false
|
95
|
+
|
96
|
+
Style/NumericPredicate:
|
97
|
+
Enabled: false
|
98
|
+
|
99
|
+
Style/SafeNavigation:
|
100
|
+
Enabled: false
|
101
|
+
|
102
|
+
Style/SafeNavigationChainLength:
|
103
|
+
Enabled: false
|
104
|
+
|
105
|
+
Lint/AmbiguousOperatorPrecedence:
|
106
|
+
Enabled: false
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
|
+
|
8
|
+
## [0.3.0] - 2024-03-27
|
9
|
+
|
10
|
+
### Added
|
11
|
+
- Task export and import capabilities
|
12
|
+
- JSON format for full data fidelity
|
13
|
+
- CSV format for spreadsheet compatibility
|
14
|
+
- Export single notebooks or all notebooks
|
15
|
+
- Import with notebook creation
|
16
|
+
- Task templates system
|
17
|
+
- Reusable task patterns with placeholders
|
18
|
+
- Dynamic due date calculations
|
19
|
+
- Template management commands
|
20
|
+
- Support for date and custom placeholders
|
21
|
+
- Database schema versioning improvements
|
22
|
+
- Added version 2 schema with templates table
|
23
|
+
- Automatic database migrations
|
24
|
+
- Enhanced CLI experience
|
25
|
+
- Improved error handling
|
26
|
+
- Better file path resolution
|
27
|
+
|
28
|
+
### Changed
|
29
|
+
- Extended database schema with templates table
|
30
|
+
- Improved exports directory organization
|
31
|
+
- Enhanced documentation with template usage examples
|
32
|
+
|
33
|
+
## [0.2.0] - 2024-03-27
|
34
|
+
|
35
|
+
### Added
|
36
|
+
- Advanced task features
|
37
|
+
- Task descriptions
|
38
|
+
- Due dates with validation
|
39
|
+
- Priority levels (high, medium, low)
|
40
|
+
- Tags support with filtering
|
41
|
+
- Enhanced task listing with filters
|
42
|
+
- Filter by status
|
43
|
+
- Filter by priority
|
44
|
+
- Filter by due date
|
45
|
+
- Filter by tags
|
46
|
+
- New commands
|
47
|
+
- `task show [NOTEBOOK] [TASK_ID]`: Show detailed task information
|
48
|
+
- `task edit [NOTEBOOK] [TASK_ID]`: Edit task details
|
49
|
+
- `task search [QUERY]`: Search for tasks across notebooks
|
50
|
+
- `stats [NOTEBOOK]`: Show statistics for tasks
|
51
|
+
- Task statistics and analytics
|
52
|
+
- Database schema versioning and migration support
|
53
|
+
|
54
|
+
### Changed
|
55
|
+
- Improved task display with color-coded status and priority
|
56
|
+
- Enhanced notebook listing with task counts
|
57
|
+
- Better error handling and user feedback
|
58
|
+
- Extended task model with additional validations
|
59
|
+
|
60
|
+
## [0.1.0] - 2024-03-27
|
61
|
+
|
62
|
+
### Added
|
63
|
+
- Initial release
|
64
|
+
- Multi-notebook support
|
65
|
+
- Task management with categories (todo, in progress, done, archived)
|
66
|
+
- Automated task archiving
|
67
|
+
- SQLite database for persistent storage
|
68
|
+
- Beautiful CLI interface with colored output
|
69
|
+
- Command-line interface with the following commands:
|
70
|
+
- `init`: Initialize a new todo list
|
71
|
+
- `notebook create [NAME]`: Create a new notebook
|
72
|
+
- `notebook list`: List all notebooks
|
73
|
+
- `task add [NOTEBOOK] [TITLE]`: Add a new task to a notebook
|
74
|
+
- `task list [NOTEBOOK]`: List all tasks in a notebook
|
75
|
+
- `task move [NOTEBOOK] [TASK_ID] [STATUS]`: Move a task to a different status
|
76
|
+
- `task delete [NOTEBOOK] [TASK_ID]`: Delete a task
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,132 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
10
|
+
identity and orientation.
|
11
|
+
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
13
|
+
diverse, inclusive, and healthy community.
|
14
|
+
|
15
|
+
## Our Standards
|
16
|
+
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
18
|
+
community include:
|
19
|
+
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
24
|
+
and learning from the experience
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the overall
|
26
|
+
community
|
27
|
+
|
28
|
+
Examples of unacceptable behavior include:
|
29
|
+
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or advances of
|
31
|
+
any kind
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
33
|
+
* Public or private harassment
|
34
|
+
* Publishing others' private information, such as a physical or email address,
|
35
|
+
without their explicit permission
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
37
|
+
professional setting
|
38
|
+
|
39
|
+
## Enforcement Responsibilities
|
40
|
+
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
44
|
+
or harmful.
|
45
|
+
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
49
|
+
decisions when appropriate.
|
50
|
+
|
51
|
+
## Scope
|
52
|
+
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
54
|
+
an individual is officially representing the community in public spaces.
|
55
|
+
Examples of representing our community include using an official email address,
|
56
|
+
posting via an official social media account, or acting as an appointed
|
57
|
+
representative at an online or offline event.
|
58
|
+
|
59
|
+
## Enforcement
|
60
|
+
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
62
|
+
reported to the community leaders responsible for enforcement at
|
63
|
+
[INSERT CONTACT METHOD].
|
64
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
65
|
+
|
66
|
+
All community leaders are obligated to respect the privacy and security of the
|
67
|
+
reporter of any incident.
|
68
|
+
|
69
|
+
## Enforcement Guidelines
|
70
|
+
|
71
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
72
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
73
|
+
|
74
|
+
### 1. Correction
|
75
|
+
|
76
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
77
|
+
unprofessional or unwelcome in the community.
|
78
|
+
|
79
|
+
**Consequence**: A private, written warning from community leaders, providing
|
80
|
+
clarity around the nature of the violation and an explanation of why the
|
81
|
+
behavior was inappropriate. A public apology may be requested.
|
82
|
+
|
83
|
+
### 2. Warning
|
84
|
+
|
85
|
+
**Community Impact**: A violation through a single incident or series of
|
86
|
+
actions.
|
87
|
+
|
88
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
89
|
+
interaction with the people involved, including unsolicited interaction with
|
90
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
91
|
+
includes avoiding interactions in community spaces as well as external channels
|
92
|
+
like social media. Violating these terms may lead to a temporary or permanent
|
93
|
+
ban.
|
94
|
+
|
95
|
+
### 3. Temporary Ban
|
96
|
+
|
97
|
+
**Community Impact**: A serious violation of community standards, including
|
98
|
+
sustained inappropriate behavior.
|
99
|
+
|
100
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
101
|
+
communication with the community for a specified period of time. No public or
|
102
|
+
private interaction with the people involved, including unsolicited interaction
|
103
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
104
|
+
Violating these terms may lead to a permanent ban.
|
105
|
+
|
106
|
+
### 4. Permanent Ban
|
107
|
+
|
108
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
109
|
+
standards, including sustained inappropriate behavior, harassment of an
|
110
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
111
|
+
|
112
|
+
**Consequence**: A permanent ban from any sort of public interaction within the
|
113
|
+
community.
|
114
|
+
|
115
|
+
## Attribution
|
116
|
+
|
117
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
118
|
+
version 2.1, available at
|
119
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
120
|
+
|
121
|
+
Community Impact Guidelines were inspired by
|
122
|
+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
123
|
+
|
124
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
125
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
126
|
+
[https://www.contributor-covenant.org/translations][translations].
|
127
|
+
|
128
|
+
[homepage]: https://www.contributor-covenant.org
|
129
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
130
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
131
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
132
|
+
[translations]: https://www.contributor-covenant.org/translations
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2025 Jeremiah Parrack
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,219 @@
|
|
1
|
+
# Ruby Todo
|
2
|
+
|
3
|
+
A powerful CLI todo list manager with multi-notebook support and automated task management.
|
4
|
+
|
5
|
+
## Features
|
6
|
+
|
7
|
+
- Multiple notebook support
|
8
|
+
- Task categorization (todo, in progress, done, archived)
|
9
|
+
- Advanced task features (descriptions, due dates, priorities, tags)
|
10
|
+
- Automated task archiving
|
11
|
+
- Task search and filtering
|
12
|
+
- Task statistics and analytics
|
13
|
+
- Task export and import (JSON, CSV)
|
14
|
+
- Task templates with placeholders
|
15
|
+
- Beautiful CLI interface with colored output
|
16
|
+
- SQLite database for persistent storage
|
17
|
+
|
18
|
+
## Installation
|
19
|
+
|
20
|
+
Add this line to your application's Gemfile:
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
gem "ruby_todo"
|
24
|
+
```
|
25
|
+
|
26
|
+
And then execute:
|
27
|
+
|
28
|
+
```bash
|
29
|
+
$ bundle install
|
30
|
+
```
|
31
|
+
|
32
|
+
Or install it yourself as:
|
33
|
+
|
34
|
+
```bash
|
35
|
+
$ gem install ruby_todo
|
36
|
+
```
|
37
|
+
|
38
|
+
## Usage
|
39
|
+
|
40
|
+
### Initialization
|
41
|
+
|
42
|
+
Initialize Ruby Todo:
|
43
|
+
```bash
|
44
|
+
$ ruby_todo init
|
45
|
+
```
|
46
|
+
|
47
|
+
### Notebook Management
|
48
|
+
|
49
|
+
Create a new notebook:
|
50
|
+
```bash
|
51
|
+
$ ruby_todo notebook create "Work"
|
52
|
+
```
|
53
|
+
|
54
|
+
List all notebooks:
|
55
|
+
```bash
|
56
|
+
$ ruby_todo notebook list
|
57
|
+
```
|
58
|
+
|
59
|
+
### Task Management
|
60
|
+
|
61
|
+
Add a task to a notebook:
|
62
|
+
```bash
|
63
|
+
$ ruby_todo task add "Work" "Complete project documentation"
|
64
|
+
```
|
65
|
+
|
66
|
+
Add a task with additional details:
|
67
|
+
```bash
|
68
|
+
$ ruby_todo task add "Work" "Complete project documentation" --description "Write the API documentation for the new features" --due_date "2024-04-10 14:00" --priority "high" --tags "project,documentation,urgent"
|
69
|
+
```
|
70
|
+
|
71
|
+
List tasks in a notebook:
|
72
|
+
```bash
|
73
|
+
$ ruby_todo task list "Work"
|
74
|
+
```
|
75
|
+
|
76
|
+
Filter tasks by status:
|
77
|
+
```bash
|
78
|
+
$ ruby_todo task list "Work" --status "in_progress"
|
79
|
+
```
|
80
|
+
|
81
|
+
Show only overdue tasks:
|
82
|
+
```bash
|
83
|
+
$ ruby_todo task list "Work" --overdue
|
84
|
+
```
|
85
|
+
|
86
|
+
Show only high priority tasks:
|
87
|
+
```bash
|
88
|
+
$ ruby_todo task list "Work" --priority "high"
|
89
|
+
```
|
90
|
+
|
91
|
+
Filter by tags:
|
92
|
+
```bash
|
93
|
+
$ ruby_todo task list "Work" --tags "urgent,important"
|
94
|
+
```
|
95
|
+
|
96
|
+
View detailed information about a task:
|
97
|
+
```bash
|
98
|
+
$ ruby_todo task show "Work" 1
|
99
|
+
```
|
100
|
+
|
101
|
+
Edit a task:
|
102
|
+
```bash
|
103
|
+
$ ruby_todo task edit "Work" 1 --title "New title" --priority "medium" --due_date "2024-04-15 10:00"
|
104
|
+
```
|
105
|
+
|
106
|
+
Move a task to a different status:
|
107
|
+
```bash
|
108
|
+
$ ruby_todo task move "Work" 1 "in_progress"
|
109
|
+
```
|
110
|
+
|
111
|
+
Delete a task:
|
112
|
+
```bash
|
113
|
+
$ ruby_todo task delete "Work" 1
|
114
|
+
```
|
115
|
+
|
116
|
+
### Search
|
117
|
+
|
118
|
+
Search for tasks across all notebooks:
|
119
|
+
```bash
|
120
|
+
$ ruby_todo task search "documentation"
|
121
|
+
```
|
122
|
+
|
123
|
+
Search within a specific notebook:
|
124
|
+
```bash
|
125
|
+
$ ruby_todo task search "documentation" --notebook "Work"
|
126
|
+
```
|
127
|
+
|
128
|
+
### Statistics
|
129
|
+
|
130
|
+
View statistics for all notebooks:
|
131
|
+
```bash
|
132
|
+
$ ruby_todo stats
|
133
|
+
```
|
134
|
+
|
135
|
+
View statistics for a specific notebook:
|
136
|
+
```bash
|
137
|
+
$ ruby_todo stats "Work"
|
138
|
+
```
|
139
|
+
|
140
|
+
### Export and Import
|
141
|
+
|
142
|
+
Export tasks from a notebook to JSON:
|
143
|
+
```bash
|
144
|
+
$ ruby_todo export "Work" "work_export"
|
145
|
+
```
|
146
|
+
|
147
|
+
Export all notebooks:
|
148
|
+
```bash
|
149
|
+
$ ruby_todo export --all "full_export"
|
150
|
+
```
|
151
|
+
|
152
|
+
Export to CSV format:
|
153
|
+
```bash
|
154
|
+
$ ruby_todo export "Work" "work_export" --format csv
|
155
|
+
```
|
156
|
+
|
157
|
+
Import tasks from a file:
|
158
|
+
```bash
|
159
|
+
$ ruby_todo import "work_export.json"
|
160
|
+
```
|
161
|
+
|
162
|
+
Import to a specific notebook:
|
163
|
+
```bash
|
164
|
+
$ ruby_todo import "work_export.json" --notebook "New Work"
|
165
|
+
```
|
166
|
+
|
167
|
+
### Task Templates
|
168
|
+
|
169
|
+
Create a template:
|
170
|
+
```bash
|
171
|
+
$ ruby_todo template create "Weekly Report" --title "Weekly Report {week}" --description "Prepare weekly report for week {week}" --priority "high" --tags "report,weekly" --due_date_offset "5d"
|
172
|
+
```
|
173
|
+
|
174
|
+
List all templates:
|
175
|
+
```bash
|
176
|
+
$ ruby_todo template list
|
177
|
+
```
|
178
|
+
|
179
|
+
Show template details:
|
180
|
+
```bash
|
181
|
+
$ ruby_todo template show "Weekly Report"
|
182
|
+
```
|
183
|
+
|
184
|
+
Use a template to create a task:
|
185
|
+
```bash
|
186
|
+
$ ruby_todo template use "Weekly Report" "Work" --replacements week="12"
|
187
|
+
```
|
188
|
+
|
189
|
+
Delete a template:
|
190
|
+
```bash
|
191
|
+
$ ruby_todo template delete "Weekly Report"
|
192
|
+
```
|
193
|
+
|
194
|
+
## Template Placeholders
|
195
|
+
|
196
|
+
Templates support the following placeholder types:
|
197
|
+
|
198
|
+
- Custom placeholders: `{name}`, `{week}`, etc. (replaced when using template)
|
199
|
+
- Date placeholders:
|
200
|
+
- `{today}`: Current date
|
201
|
+
- `{tomorrow}`: Next day
|
202
|
+
- `{yesterday}`: Previous day
|
203
|
+
- `{weekday}`: Current day of week
|
204
|
+
- `{month}`: Current month
|
205
|
+
- `{year}`: Current year
|
206
|
+
|
207
|
+
## Development
|
208
|
+
|
209
|
+
After checking out the repo, run `bundle install` to install dependencies. Then, run `rake test` to run the tests.
|
210
|
+
|
211
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
212
|
+
|
213
|
+
## Contributing
|
214
|
+
|
215
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/jeremiahparrack/ruby_todo.
|
216
|
+
|
217
|
+
## License
|
218
|
+
|
219
|
+
The gem is available as open source under the terms of the MIT License.
|
data/Rakefile
ADDED
data/lib/ruby_todo.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "ruby_todo/version"
|
4
|
+
require_relative "ruby_todo/database"
|
5
|
+
require_relative "ruby_todo/models/notebook"
|
6
|
+
require_relative "ruby_todo/models/task"
|
7
|
+
require_relative "ruby_todo/models/template"
|
8
|
+
require_relative "ruby_todo/cli"
|
9
|
+
|
10
|
+
module RubyTodo
|
11
|
+
class Error < StandardError; end
|
12
|
+
|
13
|
+
def self.start
|
14
|
+
CLI.start(ARGV)
|
15
|
+
end
|
16
|
+
end
|
data/ruby_todo.gemspec
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/ruby_todo/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "ruby_todo"
|
7
|
+
spec.version = RubyTodo::VERSION
|
8
|
+
spec.authors = ["Jeremiah Parrack"]
|
9
|
+
spec.email = ["jeremiah.parrack@gmail.com"]
|
10
|
+
|
11
|
+
spec.summary = "A command-line todo application"
|
12
|
+
spec.description = "A flexible and powerful todo list management system for the command line"
|
13
|
+
spec.homepage = "https://github.com/jtparrack/ruby_todo"
|
14
|
+
spec.license = "MIT"
|
15
|
+
spec.required_ruby_version = ">= 3.0.0"
|
16
|
+
|
17
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
18
|
+
|
19
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
20
|
+
spec.metadata["source_code_uri"] = "https://github.com/jtparrack/ruby_todo"
|
21
|
+
spec.metadata["changelog_uri"] = "https://github.com/jtparrack/ruby_todo/blob/main/CHANGELOG.md"
|
22
|
+
|
23
|
+
# Specify which files should be added to the gem when it is released.
|
24
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
25
|
+
spec.files = Dir.chdir(__dir__) do
|
26
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
27
|
+
(File.expand_path(f) == __FILE__) ||
|
28
|
+
f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor Gemfile])
|
29
|
+
end
|
30
|
+
end
|
31
|
+
spec.bindir = "exe"
|
32
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
33
|
+
spec.require_paths = ["lib"]
|
34
|
+
|
35
|
+
# Runtime dependencies
|
36
|
+
spec.add_dependency "activerecord", "~> 7.1"
|
37
|
+
spec.add_dependency "colorize", "~> 1.1"
|
38
|
+
spec.add_dependency "sqlite3", "~> 1.7"
|
39
|
+
spec.add_dependency "thor", "~> 1.3"
|
40
|
+
spec.add_dependency "tty-prompt", "~> 0.23"
|
41
|
+
spec.add_dependency "tty-table", "~> 0.12"
|
42
|
+
|
43
|
+
# Development dependencies
|
44
|
+
spec.add_development_dependency "minitest", "~> 5.19"
|
45
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
46
|
+
spec.add_development_dependency "rubocop", "~> 1.59"
|
47
|
+
spec.add_development_dependency "rubocop-minitest", "~> 0.34"
|
48
|
+
spec.add_development_dependency "rubocop-rake", "~> 0.6"
|
49
|
+
|
50
|
+
# For more information and examples about making a new gem, check out our
|
51
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
52
|
+
end
|
data/sig/ruby_todo.rbs
ADDED
metadata
ADDED
@@ -0,0 +1,211 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ruby_todo
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jeremiah Parrack
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2025-03-28 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activerecord
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '7.1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '7.1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: colorize
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.1'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.1'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: sqlite3
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.7'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.7'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: thor
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.3'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.3'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: tty-prompt
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.23'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.23'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: tty-table
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0.12'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0.12'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: minitest
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '5.19'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '5.19'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rake
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '13.0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '13.0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '1.59'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '1.59'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rubocop-minitest
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0.34'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0.34'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rubocop-rake
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0.6'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0.6'
|
167
|
+
description: A flexible and powerful todo list management system for the command line
|
168
|
+
email:
|
169
|
+
- jeremiah.parrack@gmail.com
|
170
|
+
executables: []
|
171
|
+
extensions: []
|
172
|
+
extra_rdoc_files: []
|
173
|
+
files:
|
174
|
+
- ".rubocop.yml"
|
175
|
+
- CHANGELOG.md
|
176
|
+
- CODE_OF_CONDUCT.md
|
177
|
+
- LICENSE.txt
|
178
|
+
- README.md
|
179
|
+
- Rakefile
|
180
|
+
- lib/ruby_todo.rb
|
181
|
+
- lib/ruby_todo/version.rb
|
182
|
+
- ruby_todo.gemspec
|
183
|
+
- sig/ruby_todo.rbs
|
184
|
+
homepage: https://github.com/jtparrack/ruby_todo
|
185
|
+
licenses:
|
186
|
+
- MIT
|
187
|
+
metadata:
|
188
|
+
allowed_push_host: https://rubygems.org
|
189
|
+
homepage_uri: https://github.com/jtparrack/ruby_todo
|
190
|
+
source_code_uri: https://github.com/jtparrack/ruby_todo
|
191
|
+
changelog_uri: https://github.com/jtparrack/ruby_todo/blob/main/CHANGELOG.md
|
192
|
+
post_install_message:
|
193
|
+
rdoc_options: []
|
194
|
+
require_paths:
|
195
|
+
- lib
|
196
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
197
|
+
requirements:
|
198
|
+
- - ">="
|
199
|
+
- !ruby/object:Gem::Version
|
200
|
+
version: 3.0.0
|
201
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
202
|
+
requirements:
|
203
|
+
- - ">="
|
204
|
+
- !ruby/object:Gem::Version
|
205
|
+
version: '0'
|
206
|
+
requirements: []
|
207
|
+
rubygems_version: 3.5.18
|
208
|
+
signing_key:
|
209
|
+
specification_version: 4
|
210
|
+
summary: A command-line todo application
|
211
|
+
test_files: []
|