Commit Graph

818 Commits

Author SHA1 Message Date
Jeremiah Russell
33027a6c34 ♻️ refactor(cli): rename config_cli to rules_cli
- rename config_cli to rules_cli for better clarity
- rename ConfigCommands to RulesCommands for better clarity
- rename ConfigCli to RulesCli for better clarity
2025-10-08 06:42:29 +01:00
Jerus Bot
39da683fc0 chore: update prlog for pr 2025-10-07 17:34:19 +01:00
Jeremiah Russell
7a1a8f6a1a 🐛 fix(ui): correct grammar errors in eol command and trash messages
- fix typo in `Delete` variant description from "immediatly" to "immediately"
- correct grammar in trash log message from "move to trash" to "moved to trash"
2025-10-07 17:34:19 +01:00
Jerus Bot
ed00ab698e chore: update prlog for pr 2025-10-07 15:59:18 +01:00
Jeremiah Russell
050f00940b feat(config): implement configuration file management
- add config.rs to handle program configuration
- create default configuration with retention rules
- implement save and load functions for persistent storage
- add credential file setting
2025-10-07 15:59:18 +01:00
Jeremiah Russell
17dc58c4a7 feat(retention): introduce message age enum
- add MessageAge enum to represent retention periods in days, weeks, months, or years
- implement Display trait for MessageAge to format retention periods
- implement label function to generate retention label
2025-10-07 15:59:18 +01:00
Jeremiah Russell
e77b372413 feat(config): add EolRule struct for managing end-of-life rules
- introduce EolRule struct with fields for id, retention, labels, query, and command
- implement methods for creating new rules, setting retention, and adding labels
- add default implementation for EolRule
2025-10-07 15:59:18 +01:00
Jeremiah Russell
f63a0f888d feat(retention): implement data retention policy
- introduce `Retention` struct to define data retention period and label generation flag
- add `MessageAge` enum to represent different retention time units (days, months, years)
- implement default values for retention policy (5 years, generate label)
2025-10-07 15:59:18 +01:00
Jeremiah Russell
4390fe4c2d feat(cli): load configuration for message command
- load config file instead of hardcoding credential path
- create default config if not exist
2025-10-07 15:59:18 +01:00
Jeremiah Russell
ab8df6bdd9 feat(lib): add config and retention modules
- add config module for managing application settings
- add retention module for message age management
2025-10-07 15:59:18 +01:00
Jeremiah Russell
c4e4e28f66 🐛 fix(error): refine error handling with granular variants
- introduce specific error variants for std::io::Error and toml::de::Error
- remove commented-out error variants to streamline error reporting
2025-10-07 15:59:18 +01:00
Jeremiah Russell
1bbc75206a feat(eol_cmd): introduce EolCmd enum for message disposal
- add Trash and Delete variants for specifying end-of-life actions
- implement Display trait for EolCmd to provide string representation
2025-10-07 15:59:18 +01:00
Jeremiah Russell
9c4e1c989d 🔧 chore(vscode): update disabled rules for ltex extension
- add new rules to improve code quality and consistency
2025-10-07 15:59:18 +01:00
Jeremiah Russell
b960436a9f 📦 build(deps): add toml dependency
- add toml crate for configuration file parsing
2025-10-07 15:59:18 +01:00
Jeremiah Russell
122d000d6b feat(build): add toml dependency
- add toml crate for configuration file parsing
2025-10-07 15:59:18 +01:00
Jerus Bot
f36b962867 chore: update prlog for pr 2025-10-07 09:54:54 +01:00
Jeremiah Russell
8bab1e3dec 📝 docs(changelog): update changelog for new cli feature
- update changelog to reflect the addition of the config subcommand for end-of-life rules in the cli
2025-10-07 09:54:54 +01:00
Jeremiah Russell
9713e42d61 📝 docs(PRLOG): update changelog format
- change "Add" to "### Add" for better readability
2025-10-07 09:54:54 +01:00
Jeremiah Russell
a8ac4b1f2a 📝 docs(PRLOG): update PRLOG with unreleased changes
- add new "Add" section to highlight new features
- include feat(cli): add config subcommand for end-of-life rules(pr [#34])
- remove redundant merge commit entry
2025-10-07 09:54:54 +01:00
Jerus Bot
77b81bdbc3 chore: update prlog for pr 2025-10-07 09:32:58 +01:00
Jeremiah Russell
782cfc4baf Merge branch 'implement-config-subcommand' of github.com:jerus-org/cull-gmail 2025-10-07 09:32:58 +01:00
Jerus Bot
c68d34867e chore: update prlog for pr 2025-10-07 07:50:47 +01:00
Jeremiah Russell
2731ee673e 📝 docs(PRLOG): update PRLOG.md
- add new feature and change logs
- update unreleased link to HEAD
2025-10-07 07:50:47 +01:00
Jerus Bot
e2087c07a0 chore: Release cull-gmail v0.0.4 2025-10-07 05:23:38 +00:00
Jerus Bot
8f2d9687fe chore: update prlog for pr 2025-10-06 17:09:47 +01:00
Jeremiah Russell
a0b365a455 feat(message_list): create message summary struct
- introduce MessageSummary struct to encapsulate message id and subject
- implement methods to set and retrieve subject, with default if missing
2025-10-06 17:09:47 +01:00
Jeremiah Russell
65f8bf7fc5 feat(utils): implement string elision trait
- introduce `Elide` trait for string truncation
- add `elide` function to truncate strings longer than a specified length, adding " ..." at the end
2025-10-06 17:09:47 +01:00
Jeremiah Russell
f42718328e ♻️ refactor(trash): improve trash operation logging
- change debug log level to trace for batch request
- remove debug log for response
- log message subject instead of id after trashing
2025-10-06 17:09:47 +01:00
Jeremiah Russell
adaf2b1e30 feat(message_list): improve message handling and logging
- create MessageSummary struct to hold message id and subject
- update MessageList to use MessageSummary instead of just message ids
- implement log_message_subjects to fetch and log message subjects
- add elide function to truncate long subjects for better logging
2025-10-06 17:09:47 +01:00
Jeremiah Russell
bfa719959c 🔧 chore(vscode): add cSpell settings
- add cSpell settings for vscode
- configure cSpell to include the word "trdir"
2025-10-06 17:09:47 +01:00
Jerus Bot
9c59c8c24b chore: update prlog for pr 2025-10-06 10:38:30 +01:00
Jeremiah Russell
041646809c feat(trash): implement trash functionality
- add trash struct and methods for moving messages to trash
- implement batch move to trash functionality
2025-10-06 10:38:30 +01:00
Jeremiah Russell
8554737cd5 feat(trash): add trash cli
- Implement a command-line interface for the trash functionality
- Allow users to specify max results, pages, labels, and query parameters
2025-10-06 10:38:30 +01:00
Jeremiah Russell
2035dc7a85 feat(cli): add trash command
- Implement a new subcommand `trash` to move emails to trash.
- Introduce `trash_cli.rs` to handle the logic for selecting emails to move to  trash.
2025-10-06 10:38:30 +01:00
Jeremiah Russell
f7a8066f66 feat(message_list): enhance message list functionality and debugging
- implement Debug trait for MessageList struct for better debugging
- add getter methods for message_ids, label_ids, and hub for external access
- change log level check to include Info and higher for message subject logging
2025-10-06 10:38:30 +01:00
Jeremiah Russell
b7792bedc6 feat(lib): add trash module for moving messages to trash
- introduce trash module to handle deletion of messages
2025-10-06 10:38:30 +01:00
Jerus Bot
eedc616b8e chore: update prlog for pr 2025-10-06 07:14:46 +01:00
Jeremiah Russell
0a528b4196 feat(message_list): add message_ids to MessageList struct
- add message_ids field to store message IDs
- update run method to populate message_ids
- create messages_list method for API calls
- create log_message_subjects method to log message subjects
2025-10-06 07:14:46 +01:00
Jerus Bot
215a2218c4 chore: update prlog for pr 2025-10-05 09:49:56 +01:00
Jeremiah Russell
9247839ccc ♻️ refactor(message): rename Message to MessageList
- rename Message struct to MessageList for clarity
- reflect the change in the instantiation
2025-10-05 09:49:56 +01:00
Jeremiah Russell
0b52987a7d ♻️ refactor(core): rename message module to message_list
- rename message module to message_list to better reflect its functionality
2025-10-05 09:49:56 +01:00
Jeremiah Russell
188a311175 ♻️ refactor(message): rename message to message_list
- rename `message.rs` to `message_list.rs` to improve clarity
- update struct name from `Message` to `MessageList`
2025-10-05 09:49:56 +01:00
Jerus Bot
36d92b4126 chore: update prlog for pr 2025-10-04 09:57:20 +01:00
Jeremiah Russell
7e779a218d ♻️ refactor(labels): remove unused code
- Remove commented-out code block for displaying labels.
2025-10-04 09:57:20 +01:00
Jeremiah Russell
7cd4b8987b ♻️ refactor(labels): improve label listing and mapping
- refactor label listing to use `else` for option handling
- enhance label listing with id display and conditional logging
- create label map for efficient label id lookup
2025-10-04 09:57:20 +01:00
Jerus Bot
603240ae06 chore: update prlog for pr 2025-10-04 09:10:35 +01:00
Jeremiah Russell
cbe61ab2f3 ♻️ refactor(message): improve subject logging with early returns
- use early returns and `else` blocks for better readability and reduced nesting
- add a log message to indicate emails with no subject
2025-10-04 09:10:35 +01:00
Jerus Bot
7ba4b09fc2 chore: Release cull-gmail v0.0.3 2025-10-04 06:55:23 +00:00
Jerus Bot
6889bfef82 chore: update prlog for pr 2025-10-04 07:09:58 +01:00
Jeremiah Russell
57ddb8da90 ♻️ refactor(cli): rename list subcommand to message
- rename list_cli module to message_cli
- rename ListCli struct to MessageCli
- update the command name from list to message
2025-10-04 07:09:58 +01:00