-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add save_attachments action and provide enhancements to search_items action. #17
Merged
amanda11
merged 136 commits into
StackStorm-Exchange:master
from
TimothyDJones:save_attachments
Dec 2, 2021
Merged
Changes from all commits
Commits
Show all changes
136 commits
Select commit
Hold shift + click to select a range
85302b6
Add "attachment_directory" configuration parameter for server directo…
6728259
Add handler for pack attachment configuration parameters.
d605c33
Disable attachment configuration for troubleshooting.
071121d
Remove st2common.content import for troubleshooting.
4bfaf37
Move st2common.content import into _attachment_configuration to avoid…
d8540d3
Add email_sender and email_recipient_list attributes to item_to_dict …
9b251e6
Cast "item.item_class" to str() for comparison.
8a9e3d1
Add debugging output to show fields on search results.
a9e843a
Change debugging to show class of items returned by search.
5a1aeb9
Remove check for item class.
0614905
Update item_to_dict() method to extract email address from exchangeli…
0d6a4da
Remove Item class from list of exchangelib imports.
e340f17
Debugging email addresses.
1d99738
Fix acquisition of sender email address.
a476dce
Change name of attribute for list of email recipients to "email_recip…
c93d182
Add support for searching for items by date using free-format date vi…
5792a38
Update _get_date_from_string to return EWSDateTime object instance.
7a816b1
Fix missing key in logging format statement.
f7d79e9
Add pytz library to make search start date timezone-aware using pack …
e2f05fa
Remove temporary debug logging.
7e69d58
Add support for searching for items by date using free-format date vi…
5725a6a
Merge branch 'save_attachments' of github.com:TimothyDJones/stackstor…
94c6455
Remove temporary debug logging.
8ca8f4d
Add check to ensure that attachment save directory is writeable.
bffc9b5
Cast attachment directory maximum size and days to keep attachments c…
25be039
Add check to ensure that attachment save directory is writeable.
03eadfe
Make class attributes associated with attachment configuration parame…
703db98
Re-enable attachment attribute configuration.
b0c93ed
Comment out custom attachment directory configuration code.
4211e25
Comment out custom attachment directory configuration code.
2cceab6
Change data structure access to retrieve attachment directory configu…
7bcf8a7
Add logging output for troubleshooting.
f4255b0
Add missing format() key.
f49e83f
Change data structure access to retrieve attachment directory configu…
dfbaf17
Update attachment configuration method to use "self.config" object.
fc8aa74
Re-enable all functionality for _attachment_configuration.
8b8b25a
Add implementation for saving email file attachments.
fb06a97
Correct data structure for ATTACHMENT_FORMAT lookup dictionary.
ef9ca24
Add folder_name attribute to results of item search to allow use of f…
49b9069
Update attachment save to include parent folder containing message an…
b316de7
Use "id" key to get message by ID.
15fd6dc
Use "item_id" key to get message by ID.
98515f6
Change criteria to retrieve email to save attachments to use combinat…
1eb71f2
Add missing changekey_id parameter to run() method.
a892630
Add logging output for troubleshooting.
b4a0ee2
Update logic to handle iterator returned by "account.fetch()" method.
46f5813
Add logging output for troubleshooting.
a61d317
Add logging output for troubleshooting.
cf32b33
Add logging output for troubleshooting.
bbf9e11
Add pytz to pack requirements.
8a8697e
Move _get_date_from_string() utility method to base/action.py.
1059b61
Re-factor attachment save functionality to obtain results via search.
a888e94
Update to use _get_date_from_string() utility method in base/action.py.
ad13017
Correct attribute name.
47d0679
Update output data structure of results from saving attachments.
668650a
Correct attribute name.
3c6401e
Correct fp name.
83b40ce
Correct fp name.
cf3b207
Add logging output for troubleshooting.
fa8adab
Changed to simple file writer for saving attachment.
f1adf36
Add attachment_folder_maximum_size and attachment_days_to_keep config…
69614bb
Updates for version 1.1.0.
ab7e53d
Change pack version to 1.1.0.
c196d22
Move common search code to utility method in base/actions.py to share…
417f55f
Implement attachment directory maintenance functionality.
25b75c6
Remove directory checks from attachment directory maintenance sensor,…
2fd4e22
Rename attachment directory maintenance sensor to better reflect purp…
8b0862b
Correct argument to join() to list.
3dd7320
Remove quotes from attachment_folder_maximum_size description.
5cfd97d
Fix attachment_directory_maximum_size parameter name.
30737fb
Add optional attachment_directory_maximum_size and attachment_days_to…
5792795
Additional updates for changes to pack.
3b777af
Update README for save_attachments and related actions, sensors, etc.
cde564b
Change contributor email address to personal email address.
9775971
Fix multiple assignment error.
bd285e0
Correct date calculations in _remove_old_files() method.
a315362
Add check for attachment directory and ensure it is writeable.
32d7d30
Cast date value converted to Unix epoch string to integer for compari…
26d0989
Use "path" attribute from scandir() result to get full pathname to fi…
03b09b4
Add missing key to format() statement.
f7679a2
Fix multiple assignment error.
c0e36b2
Add logging for troubleshooting.
56d2ccf
Change to using Python sorted() function to get sorted_file_list.
e5c2024
Additional notes on updates.
6f7504f
Correct "subject" object reference.
28f114a
Update to append to result list only if one or more attachments are s…
e0c6f74
Change log level for message when attachment is *not* file attachment…
b5e17e1
Remove temporary logging for debugging.
e1b2aef
Fix parameter for folder_name.
e6bc9dd
Flake8 fixes.
4475700
Flake8 fixes.
fd6c0db
Flake8 fixes.
718f4ee
Flake8 fixes.
13e7d46
Flake8 fixes.
92fc15b
Flake8 fixes.
76e4936
Flake8 fixes.
84e4cc4
Flake8 fixes.
428cc82
Flake8 fixes.
bdc5cf8
Update to call _search_items() method in base/actions.py instead of l…
cf701c0
Update to call _search_items() method in base/actions.py instead of l…
4971692
Fix comprehension for messages_as_dict to include outer list.
ca4c508
Flake8 fixes.
b788a46
Comment out code for troubleshooting.
b0c30cc
Refactor creation of messages_as_dict data structure for debug logging.
ada1491
Fix argument to dict() to make it list() of tuples.
51695f5
Fix argument to dict() to make it list() of tuples.
d6866d9
Add 'attachments' directory.
7a2d6ed
Correct initialization of att_filename_list to *BEFORE* looping throu…
125d7d8
Add method for creating unique filename by using *CURRENT* date/time …
eaf1361
Create utility method _construct_filename() and refactor _get_unique_…
7b763ae
Use positional arguments to _construct_filename() calls.
f412792
Create utility method _construct_filename() and refactor _get_unique_…
9f3f93b
Refactor _construct_filename() to use implicit default of self.attach…
b9af93a
Add enumerated value replace_spaces_in_filename parameter to allow re…
4e044af
Add dictionary and corresponding lookup for replace_spaces_in_filenam…
7fd0752
Change default for replace_spaces_in_filename parameter on save_attac…
a48b121
Add debug logging for troubleshooting.
9963c8b
Add debug logging for troubleshooting.
fa983d5
Add debug logging for troubleshooting.
c1a70a2
Fix target of dictionary get() function.
b2dbaa9
Remove temporary log debug output.
8832f66
Fix class hierarchy for datetime "now()" method.
2c9d9e1
Add "change_key" attribute to trigger payload to allow finding items …
3d1d46f
Add _get_item_by_id() utility method to get MS Exchange item (email m…
fa7e1dd
Update "save attachments" action to accept alternate input of combina…
53a73af
Update maximum revision of exchangelib to 1.12.5.
e8f201e
Update maximum revision of exchangelib to 2.2.0.
0e194b7
Update maximum revision of exchangelib to 1.12.5.
f477156
Revert to maximum version of 1.10.0 for exchangelib.
44a7688
Update call to exchangelib fetch() method to use a *list* of tuple fo…
0ac2f6d
Change to use dictionary get() method for "folder_name" attribute, be…
d569e04
Add "change_key" attribute to ItemSensor payload schema YAML definition.
90a4270
Change to require use on only version 2020.1 of pytz library.
a498ee4
Add dependency on version 2.1 of tzlocal library, because of API vers…
89694ff
Add ".vscode" settings directory to list of directories to ignore.
df00745
Remove VS Code settings from repository.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,3 +87,6 @@ ENV/ | |
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# VS Code project settings | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe to prep for the upgrade of exchangelib in #16, remove the
get_folder_by_name
outlined in #20 as it is now deprecated.