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

Arguments are apparently not parsed correctly with respect to the doc #189

Closed
lucbouge opened this issue Nov 5, 2023 · 2 comments
Closed
Assignees
Labels
crate: cli Related to the CLI crate txt Related to TXT Export

Comments

@lucbouge
Copy link

lucbouge commented Nov 5, 2023

Dear colleagues,

Thank you for this long-awaited utiity.

I downloaded it to my Somona 14.0 Intel Mac today from Homebrew

% brew info imessage-exporter
==> imessage-exporter: stable 1.6.0 (bottled)
Command-line tool to export and inspect local iMessage database
https://github.com/ReagentX/imessage-exporter
/usr/local/Cellar/imessage-exporter/1.6.0 (7 files, 3.2MB) *
Poured from bottle using the formulae.brew.sh API on 2023-11-05 at 17:43:29
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/i/imessage-exporter.rb
License: GPL-3.0-only
==> Dependencies
Build: rust ✘
==> Analytics
install: 107 (30 days), 384 (90 days), 829 (365 days)
install-on-request: 107 (30 days), 384 (90 days), 829 (365 days)
build-error: 0 (30 days)

It works fine with the diagnostics argument:

% imessage-exporter --diagnostics
Building cache...
[1/4] Caching chats...
[2/4] Caching chatrooms...
[3/4] Caching participants...
[4/4] Caching reactions...
Cache built!

iMessage Database Diagnostics

Message diagnostic data:
Messages not associated with a chat: 80
Attachment diagnostic data:
Total attachments: 5
Total attachment data: 454.07 KB
Duplicated contacts: 1
Done!

However, there looks to be a problem in the parsing of the regular arguments. Or might I missed something?

% imessage-exporter --format txt

works fine, but not

% imessage-exporter --format txt --no-lazy
Invalid options!
Option no-lazy is enabled, which requires --format

@ReagentX ReagentX added the bug Something isn't working label Nov 6, 2023
@ReagentX
Copy link
Owner

ReagentX commented Nov 6, 2023

This is working as intended, but the error message is incorrect:

if no_lazy && export_type != Some("html") {
return Err(RuntimeError::InvalidOptions(format!(
"Option {OPTION_DISABLE_LAZY_LOADING} is enabled, which requires `--{OPTION_EXPORT_TYPE}`"
)));

You cannot use no-lazy with a txt export because text files can't embed data the way html can. I need to re-write the error message to reflect this.

@ReagentX ReagentX added the txt Related to TXT Export label Nov 6, 2023
@ReagentX ReagentX self-assigned this Nov 6, 2023
@ReagentX ReagentX moved this to Todo in 1.7: Laurel Sumac Nov 6, 2023
@ReagentX ReagentX added crate: cli Related to the CLI crate and removed bug Something isn't working labels Nov 6, 2023
ReagentX added a commit that referenced this issue Nov 6, 2023
@ReagentX ReagentX moved this from Todo to In Progress in 1.7: Laurel Sumac Nov 6, 2023
ReagentX added a commit that referenced this issue Nov 6, 2023
@ReagentX ReagentX closed this as completed Nov 6, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in 1.7: Laurel Sumac Nov 6, 2023
@lucbouge
Copy link
Author

lucbouge commented Nov 8, 2023 via email

@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 txt Related to TXT Export
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants