Commit Graph

585 Commits

Author SHA1 Message Date
Jeremiah Russell
9c237d8681 feat(eol_action): add parse method to EolAction
- implement `parse` method for `EolAction` to convert strings to `EolAction` variants
- support "trash" and "delete" strings, return `None` for others
2025-10-11 09:35:12 +01:00
Jeremiah Russell
3673c059f3 📝 docs(config): add documentation for get_rules_by_label function
- add comment to describe the purpose of the function
2025-10-11 09:35:12 +01:00
Jerus Bot
fda5f8f472 chore: update prlog for pr 2025-10-11 09:35:12 +01:00
Jeremiah Russell
a1015d9837 feat(cli): add run command to execute rules
- introduce `run` subcommand to trigger rule execution
- implement `RunCli` struct and logic for rule processing
2025-10-11 09:35:12 +01:00
Jeremiah Russell
360c4d6433 feat(cli): add run cli command
- introduce run_cli module with clap integration
- implement basic structure for future command logic
2025-10-11 09:35:12 +01:00
Jerus Bot
1c148f8d31 chore: Release cull-gmail v0.0.6 2025-10-09 21:55:06 +00:00
Jeremiah Russell
a3645a5b14 ♻️ refactor(trash): encapsulate message list operations
- move label, query, and max results setting to the message list
- simplify the `TrashCli::run` method
2025-10-09 22:45:24 +01:00
Jeremiah Russell
9baa7a93b9 ♻️ refactor(cli): improve delete command structure
- Refactor the delete command to improve code structure
- Encapsulate message list operations within the MessageList struct
- Enhance readability and maintainability
2025-10-09 22:45:24 +01:00
Jeremiah Russell
8348a88568 ♻️ refactor(trash): encapsulate message list
- remove methods from trash and expose message list directly
2025-10-09 22:45:24 +01:00
Jeremiah Russell
fad35eb474 ♻️ refactor(delete): rename struct and methods for deleting messages
- rename the `Trash` struct to `Delete` for clarity
- update method names to reflect the deleting functionality
2025-10-09 22:45:24 +01:00
Jerus Bot
0fc0ca6a54 chore: update prlog for pr 2025-10-09 22:45:24 +01:00
Jeremiah Russell
bca235a2e7 feat(cli): add delete subcommand
- introduce delete_cli module for handling message deletion
- implement delete subcommand to permanently remove messages
- refactor subcommands to use non-optional enum for improved handling
2025-10-09 22:45:24 +01:00
Jeremiah Russell
7c5b3c807f feat(cli): add delete subcommand
- introduce `delete` subcommand for deleting messages in Gmail
- implement command-line arguments for filtering and executing deletion
- add options for max results, pages, labels, and query
2025-10-09 22:45:24 +01:00
Jeremiah Russell
13a0b1496f feat(gh-release): add delete module
- introduce delete module for handling deletion operations
2025-10-09 22:45:24 +01:00
Jeremiah Russell
061048797c feat(delete): implement batch delete functionality
- add `delete.rs` module for batch deleting messages in gmail
- create `Delete` struct with methods for preparing and executing batch deletes
- implement `batch_delete` method to delete messages using gmail api
2025-10-09 22:45:24 +01:00
Jeremiah Russell
fdf623ea20 ♻️ refactor(trash): streamline label handling in trash listing
- consolidate label retrieval and addition into `add_labels` method
- improve code clarity and reduce redundancy
2025-10-09 17:03:04 +01:00
Jeremiah Russell
9e5c6e1bc8 ♻️ refactor(utils): improve config directory handling
- use Result alias for better readability
- simplify error handling with early return
2025-10-09 17:03:04 +01:00
Jeremiah Russell
ca1ab60c50 ♻️ refactor(labels): simplify error handling in labels module
- use `crate::Result` alias for `Result<T, Error>` to reduce redundancy
2025-10-09 17:03:04 +01:00
Jeremiah Russell
a114023ec8 feat(message_list): add label support
- add labels to the message list
- add label ids to the message list
- add labels from command line

🐛 fix(message_list): fix error handling

- use Result type alias instead of Error
- remove unused Error import

♻️ refactor(message_list): improve code readability

- rename add_labels to add_labels_ids
- move add_labels to Labels struct
2025-10-09 17:03:04 +01:00
Jeremiah Russell
172f0ca1bc ♻️ refactor(trash): simplify error handling and label management
- change Error to Result for consistent error handling
- remove add_labels function and refactor to async function
2025-10-09 17:03:04 +01:00
Jeremiah Russell
ca06e9290f feat(message): add label support to message listing
- add ability to filter messages by labels
- enhance message listing functionality
2025-10-09 17:03:04 +01:00
Jerus Bot
bdb3a9e457 chore: update prlog for pr 2025-10-09 17:03:04 +01:00
Jeremiah Russell
44d8eef872 feat(rules_cli): implement add command for managing retention rules
- add `add` subcommand to manage retention rules
- introduce `Period` enum for specifying time units
- implement logic to add and save new retention rules to the configuration
2025-10-09 17:03:04 +01:00
Jeremiah Russell
801628310b ♻️ refactor(cli): move rm_cli to new directory
- move the rm_cli module from src/config_cli/rules_cli/ to src/cli/config_cli/rules_cli/
2025-10-09 17:03:04 +01:00
Jeremiah Russell
7d55e6bbd4 feat(cli): add remove label subcommand
- add `remove-label` subcommand to remove labels from rules
2025-10-09 17:03:04 +01:00
Jeremiah Russell
278171503f feat(cli): add list labels subcommand
- add `list` subcommand to `label` subcommand to list labels in rule
- remove `remove` subcommand from `label` subcommand
2025-10-09 17:03:04 +01:00
Jeremiah Russell
0c8da9aa23 feat(label): implement add label command
- adds a new subcommand to add labels to existing rules
- removes list label subcommand
2025-10-09 17:03:04 +01:00
Jeremiah Russell
b8a473c978 🔥 chore(config_cli): remove add_cli module
- remove unused add_cli module and its dependencies
2025-10-09 17:03:04 +01:00
Jeremiah Russell
12ce3a2fd8 ♻️ refactor(cli): move rules_cli to config_cli
- move rules_cli to config_cli for better organization
2025-10-09 17:03:04 +01:00
Jeremiah Russell
ce27475269 ♻️ refactor(cli): rename label_cli module
- move label_cli module to config_cli for better organization
2025-10-09 17:03:04 +01:00
Jeremiah Russell
752f0f8c34 ♻️ refactor(cli): rename action_cli module
- move action_cli module to follow project structure
2025-10-09 17:03:04 +01:00
Jeremiah Russell
d4de088fd4 ♻️ refactor(cli): rename trash_cli to cli
- move trash_cli to cli for better project structure
2025-10-09 17:03:04 +01:00
Jeremiah Russell
7ce5cf9bdd ♻️ refactor(cli): rename message_cli to cli
- move message_cli to cli folder
2025-10-09 17:03:04 +01:00
Jeremiah Russell
ec0f160317 ♻️ refactor(cli): move label_cli to cli directory
- moves label_cli.rs to the cli directory for better organization
2025-10-09 17:03:04 +01:00
Jeremiah Russell
de91753f88 ♻️ refactor(cli): move config_cli to cli directory
- moves the config_cli module to the cli directory for better organization
2025-10-09 17:03:04 +01:00
Jeremiah Russell
0e4f4c6fef ♻️ refactor(cli): move main.rs to cli folder
- move main.rs to cli folder for better structure
2025-10-09 17:03:04 +01:00
Jeremiah Russell
f59c534312 ♻️ refactor(project): move main.rs to cli directory
- move main.rs to src/cli/main.rs to better reflect its role as a cli entrypoint
2025-10-09 17:03:04 +01:00
Jerus Bot
2fd6c8d542 chore: update prlog for pr 2025-10-09 14:30:21 +01:00
Jeremiah Russell
40ea9e52f4 ♻️ refactor(cli): rename command to sub_command for clarity
- rename `command` field to `sub_command` in `Cli` and `ConfigCli` structs
- rename `Commands` enum to `SubCmds` to reflect its role as subcommand
- update references to the renamed fields and enum variants
- this improves code readability and avoids confusion with other command concepts

🐛 fix(config): correct method name for setting eol action

- rename `set_command` to `set_action` in `EolRule` struct
- update references in `config.rs` to use the correct method name
- this fixes a bug where the eol action was not being set correctly
2025-10-09 14:30:21 +01:00
Jerus Bot
e80c7e3273 chore: update prlog for pr 2025-10-09 14:12:41 +01:00
Jeremiah Russell
992e62f0c9 🐛 fix(config): correct typo in eol_cmd module name
- fix a typo in the module name from `eol_cmd` to `eol_action`
- update the `set_command` function to accept a reference to `EolAction`
2025-10-09 14:12:41 +01:00
Jeremiah Russell
ae41e86744 ♻️ refactor(core): rename eol_cmd module to eol_action
- rename `eol_cmd` module to `eol_action` for clarity
- update module import and export statements
2025-10-09 14:12:41 +01:00
Jeremiah Russell
a317372d3a ♻️ refactor(core): rename eol_cmd to eol_action
- clarifies the file's purpose as defining actions related to EOL handling rather than just commands
2025-10-09 14:12:41 +01:00
Jeremiah Russell
fdc36096dc feat(config): add functionality to set action on rule
- add `set_action_on_rule` function to modify rule action
- allow users to update action (e.g., delete) for specific rules
2025-10-09 14:12:41 +01:00
Jeremiah Russell
6b4f0bf214 feat(cli): add action subcommand
- implement action subcommand to set actions on rules
- create action_cli module to handle action-related commands
2025-10-09 14:12:41 +01:00
Jeremiah Russell
7f43b90102 feat(config_cli): implement action subcommand
- adds a new subcommand to configure actions on rules
- allows setting action to trash or delete for a specific rule id
2025-10-09 14:12:41 +01:00
Jerus Bot
43c13dfe5f chore: update prlog for pr 2025-10-09 13:00:18 +01:00
Jeremiah Russell
b9fec9a064 🐛 fix(eol_rule): correct grammar in rule descriptions
- improve clarity and grammatical correctness of EolRule descriptions
- use backticks for retention values for better readability
2025-10-09 13:00:18 +01:00
Jeremiah Russell
02d7a49f31 🐛 fix(config): correct grammar in EolRule display
- fix grammar error in EolRule display implementation
2025-10-09 13:00:18 +01:00
Jerus Bot
ae27ad73f3 chore: update prlog for pr 2025-10-09 12:32:56 +01:00