imessage-exporter icon indicating copy to clipboard operation
imessage-exporter copied to clipboard

Split attachments folder into subfolders

Open ReagentX opened this issue 2 years ago • 4 comments

This came from feature request #51.

Right now all attachments get copied to output_dir/attachments per:

https://github.com/ReagentX/imessage-exporter/blob/release/imessage-exporter/src/app/runtime.rs/#L77-L82

When we copy to that location, all we do is drop in the file with a unique name:

https://github.com/ReagentX/imessage-exporter/blob/release/imessage-exporter/src/exporters/html.rs/#L411-L421

It would be better to have separate subdirectories for each conversation to make it easier to find attachments manually.

ReagentX avatar Jan 15 '23 07:01 ReagentX

Subdirectories by chat could conflict with the deduplication that the original Attachments directory uses. Alternatively, attachments could be copied with their original structure and linked to the chat directory. #79

fracai avatar Jan 20 '23 04:01 fracai

Subdirectories by chat could conflict with the deduplication that the original Attachments directory uses.

It won't; every time imessage-exporter sees a message with an attachment, it makes a copy.

I don't like the original structure, I think it is annoying to navigate. With #60 and #67, we get a date-sorted directory of attachments for each conversation. That is clean and sparks joy.

ReagentX avatar Jan 20 '23 04:01 ReagentX

Subdirectories by chat could conflict with the deduplication that the original Attachments directory uses.

It won't, every time imessage-exporter sees a message with an attachment, it makes a copy.

I don't like the original structure, I think it is annoying to navigate. With #60 and #67, we get a date-sorted directory of attachments for each conversation. That is clean and sparks joy.

It's the multiple copies that I was thinking could be avoided. But, if iMessage itself isn't actually deduplicating, that's not a concern. Splitting messages and attachments by date would be enough.

fracai avatar Jan 20 '23 04:01 fracai

I would rather err on the side of caution and copy every attachment as we see it; I think it's safer to store a few more things on disk than it is to try and figure out if there are duplicate files and possibly miss something.

ReagentX avatar Jan 20 '23 05:01 ReagentX