Open Bug 1305218 Opened 8 years ago Updated 2 years ago

Add method to get standard input from command line

Categories

(Thunderbird :: General, enhancement)

enhancement

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: abspack, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0
Build ID: 20160920074044

Steps to reproduce:

I want to do something like 
cat body.htm | thunderbird -compose
Attached patch stdinput.patchSplinter Review
The patch attached is a first idea how to implement the API for it.
OS: Unspecified → All
Hardware: Unspecified → All
Severity: normal → enhancement
Product: Toolkit → Thunderbird
I got the idea for it when working on this enhancement:
https://bugzilla.mozilla.org/show_bug.cgi?id=882104
Attachment #8794482 - Flags: feedback?(bugmail)
Comment on attachment 8794482 [details] [diff] [review]
stdinput.patch

I'm no longer a Thunderbird contributor or reviewer.  Having said that, your patch makes a change to Gecko, not Thunderbird-specific code, so Thunderbird reviewers can't approve it either.  Also, I'm very confident this change wouldn't be accepted into Gecko core since it's synchronous IO on the main thread not using the existing IO APIs.

I don't think the appshells close stdin, so you can probably use existing (async) API's on the existing stdin file descriptor or something like that.  I'd expect there's existing code out there that does something similar if you're wedded to this command-line workflow.
Attachment #8794482 - Flags: feedback?(bugmail)
We actually implemented this enhancement synchronously:
https://bugzilla.mozilla.org/show_bug.cgi?id=882104
So we would need a synchronous solution again.
Also, I would like to call the code within Javascript.
The Thunderbird command line handler additions are done in Javascript, which means that mail reviewers could review them, and also that they could possibly be overridden by an extension. Have you looked at, for example, https://dxr.mozilla.org/comm-central/source/mail/components/nsMailDefaultHandler.js ?

I'm a little late to this bug and maybe I'm completely offbase here.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: