diff --git a/README.md b/README.md index 8b882b7..90c9cb4 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,117 @@ -# Ruby-Template +# TodoMarker + +`todo_marker` is a Standalone Ruby gem designed to help developers manage TODO comments in their code. It scans a directory for TODO comments in Ruby files and generates a `TODO.md` file summarizing all the tasks. + +## Features + +- Scans Ruby files for TODO comments. +- Generates a `TODO.md` file with a summary of all TODO comments. +- Supports styled TODO comments for better organization. + +## Installation + +To install the `todo_marker` gem, install it manually via the command line: + +```sh +gem install todo_marker +``` + +## Usage +### Command-Line Interface + +The `todo_marker` gem provides a very simple command-line interface for generating the `TODO.md` file. + +To generate a `TODO.md` file, run the following command: + +```sh +todo_marker +``` + +Replace `` with the path to the directory you want to scan. + +### Example: + +```sh +todo_marker ./my_project +``` + +This command will create a `TODO.md` file in the specified directory, listing all TODO comments found in Ruby files. + +## Supported TODO Comment Formats + +The todo_marker gem supports various styles for TODO comments to help organize tasks effectively. The supported formats include: + +1. Basic TODO Comment: + +```ruby +# !!TODO!! "Your task description here" +``` + +2. Title1 Style: + +```ruby +# !!TODO!! style: title1 "Title for a section" +``` + +3. Title2 Style: + +```ruby +# !!TODO!! style: title2 "Title for a subsection" +``` + +4. Title3 Style: + +```ruby +# !!TODO!! style: title3 "Title for a sub-subsection" +``` + +5. Sublist Style: + +```ruby +# !!TODO!! style: sublist "Subtask description" +``` + +### Example + +Here's an example of a Ruby file with various TODO comments: + +```ruby +# !!TODO!! "Complete method implementation" +def example_method + # implementation needed +end + +# !!TODO!! style: title1 "Main Section" +# !!TODO!! "Main task" +# !!TODO!! style: sublist "Subtask 1" +# !!TODO!! style: sublist "Subtask 2" + +# !!TODO!! "Normal TODO item" +``` + +Running the todo_marker command on this directory will generate the following `TODO.md` file: + +```md +# TODO List + +- Complete method implementation + (./file1.rb:1) +# Main Section +- Main task + - Subtask 1 + - Subtask 2 +- Normal TODO item + (./file1.rb:9) +``` + +## Contributing + +We welcome contributions to improve the todo_marker gem! Feel free to fork the repository and submit pull requests. Make sure to follow the contribution guidelines. + +## Issues + +If you encounter any issues or have questions, please open an issue in the Git repository. ## License -This project is licensed under the GNU V3.0 License. See the [LICENSE](LICENSE) file for details. \ No newline at end of file +This project is licensed under the GNU V3.0 License. See the [LICENSE](LICENSE) file for details. diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..bcc6b74 --- /dev/null +++ b/changelog.md @@ -0,0 +1,20 @@ +# Changelog + +## [0.2.0] - 2024-06-22 + +### Updated +- README.md + +### Added +- Introduced additional formatting options for TODO comments. +- Implemented styles for TODO comments including titles and sublists. +- Added support for `title1`, `title2`, and `title3` styles. + +### Commits +- [Adding in additional formatting options](https://git.pixelridgesoftworks.com/PixelRidge-Softworks/Todo_Marker/commit/b47350d96dc67a4ed2f707c2e57f8bf9deba7f13) +- [Finished implementation of styles](https://git.pixelridgesoftworks.com/PixelRidge-Softworks/Todo_Marker/commit/99b4b136c451e20091a31dfdca2aa1f204f67fcd) + +## [0.1.0] - Initial Release + +### Added +- Basic functionality to read TODO comments from Ruby files and generate a `TODO.md` file. diff --git a/lib/todo_marker.rb b/lib/todo_marker.rb index 901b53c..3d906a7 100644 --- a/lib/todo_marker.rb +++ b/lib/todo_marker.rb @@ -7,8 +7,9 @@ require 'find' module TodoMarker TODO_REGEX = /# !!TODO!!(?: style: (\w+))? "(.*?)"/ STYLES = { - 'title' => '## %s', 'title1' => '# %s', + 'title2' => '## %s', + 'title3' => '### %s', 'sublist' => ' - %s' }.freeze diff --git a/lib/todo_marker/version.rb b/lib/todo_marker/version.rb index bc46c6e..bcb8045 100644 --- a/lib/todo_marker/version.rb +++ b/lib/todo_marker/version.rb @@ -2,5 +2,5 @@ # lib/todo_marker/version.rb module TodoMarker - VERSION = '0.1.2' + VERSION = '0.2.1' end