~soywod/pimalaya#151: 
Improve JSON output for read subcommand

Displaying mails in JSON format seems to be broken, not sure what's going on.

#How to reproduce

Read mail in JSON format

himalaya read 23565 -o json

Output

"From: <a href="/~soywod">~soywod</a> <outgoing@sr.ht>\nTo: Lorenz Schmidt <bytesnake@mailbox.org>\nSubject: Re: <a href="/~soywod/pimalaya/150" title="~soywod/pimalaya#150: Write command just hangs">~soywod/pimalaya#150</a>: Quick question for writing mails\n\n> When I'm trying to compose a mail with Himalaya, opening Vim just gets\n> stuck (I also tried with Nano)\n\nI was able to reproduce with neovim. Somehow it works with emacs, I will\ninvestigate and let you know. For sure you did nothing wrong, it is\ndefinitely a bug!\n\n\n-- \nView on the web: https://todo.sr.ht/~soywod/pimalaya/150#event-261597\n"

-- Best, Lorenz Schmidt

Status
REPORTED
Submitter
Lorenz Schmidt
Assigned to
Submitted
9 months ago
Updated
4 months ago
Labels
0:todo 1:email-lib 2:himalaya 3:cli

Lorenz Schmidt 9 months ago ยท edit

title should be read instead of edit

~soywod 9 months ago

Displaying mails in JSON format seems to be broken, not sure what's going on.

The JSON output for reading is one of the thing I would like to refactor. For now it just returns a "valid" JSON string containing the interpreted message body. It could be better instead to return headers separated from the message body. I will keep this issue open for that purpose, thank you!

~soywod 9 months ago

title should be read instead of edit

I updated the title, thanks!

~soywod referenced this from #212 a month ago

Register here or Log in to comment, or comment via email.