Skip to content
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

Allow copying attachments from non-default location #178

Closed
unitof opened this issue Sep 28, 2023 · 3 comments
Closed

Allow copying attachments from non-default location #178

unitof opened this issue Sep 28, 2023 · 3 comments
Assignees
Labels
crate: cli Related to the CLI crate crate: database Related to the database crate new feature Requires creating a new feature

Comments

@unitof
Copy link

unitof commented Sep 28, 2023

iMessage Exporter 1.6.0

When --copy-method is specified, it appears to look for attachments in the default ~/Library/Messages/Attachments/ directory, even if --db-path is specified, leading to a series of errors such as:

Attachment not found at specified path: "/Users/jacob/Library/Messages/Attachments/db/11/EF5FD3A3-7766-4CB4-91E6-BD1F23D1B382/IMG_3522.jpeg"
Attachment not found at specified path: "/Users/jacob/Library/Messages/Attachments/9d/13/280D341B-60CB-42C7-8175-33C57A4D2832/IMG_3523.jpeg"
Attachment not found at specified path: "/Users/jacob/Library/Messages/Attachments/73/03/BC4F65D1-9D59-4998-9CF1-C53CBC0FC848/image_1.jpg"
Attachment not found at specified path: "/Users/jacob/Library/Messages/Attachments/ee/14/476BC0FC-4B85-4C7F-86B7-77CD83802609/Screenshot 2022-09-13 at 12.26.12 PM.jpeg"
Attachment not found at specified path: "/Users/jacob/Library/Messages/Attachments/42/02/07EC0108-5F60-43E7-A8E0-84A3ECF6AD3D/IMG_4066.mov"

and render in the exported HTML as

<div class="message_part">
<span class="attachment_error">Unable to locate attachment: D6ED891F-6210-4EBF-9AA9-BBECF0F212EFIMG_4845.heic</span>
</div>

I suppose this might be by design, but my use case is archiving iMessage databases (including Attachments directories) from complete backups on external hard drives.

Would love if --copy-method looked relative to --db-path if set, or if there were an additional flag for specifying a custom Attachments directory location.

@ReagentX
Copy link
Owner

The attachment paths are stored in the database, how would a custom attachment path work?

@unitof
Copy link
Author

unitof commented Sep 28, 2023

Ah, I see. Didn't realize the database specified absolute paths. In my ideal world, it'd substitute all database-coded locations with the specified path, for use cases like mine where you have a fully intact Attachments folder from a complete backup, but not in its expected home directory location.

How I imagine it would work:

If I run imessages-exporter with --attachments-path /Volumes/Backblaze_MacEx1TB89963677/Backblaze Restore/Bicycle HD/Users/jacob/Library/Messages/Attachments:

Any time the database specifies an Attachment in ~/Library/Messages/Attachments, imessage-exporter would instead look in (and copy from) /Volumes/Backblaze_MacEx1TB89963677/Backblaze Restore/Bicycle HD/Users/jacob/Library/Messages/Attachments.

@ReagentX
Copy link
Owner

ReagentX commented Sep 28, 2023

Sounds reasonable!

@ReagentX ReagentX self-assigned this Sep 28, 2023
@ReagentX ReagentX added crate: cli Related to the CLI crate exporter Related to exporter processes new feature Requires creating a new feature labels Sep 28, 2023
@ReagentX ReagentX moved this to Todo in 1.7: Laurel Sumac Sep 28, 2023
@ReagentX ReagentX moved this from Todo to In Progress in 1.7: Laurel Sumac Nov 18, 2023
ReagentX added a commit that referenced this issue Nov 19, 2023
@ReagentX ReagentX added crate: database Related to the database crate and removed exporter Related to exporter processes labels Nov 19, 2023
ReagentX added a commit that referenced this issue Nov 19, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in 1.7: Laurel Sumac Nov 19, 2023
@ReagentX ReagentX mentioned this issue Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate: cli Related to the CLI crate crate: database Related to the database crate new feature Requires creating a new feature
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants