Proposal: Sharing plugin to call command-line apps (e.g. photo sharing via SCP)

Proposal: Sharing plugin to call command-line apps (e.g. photo sharing via SCP)

Thomas Perl
Karma: 2689
2010-01-02 15:53 UTC
Hello!

I've been thinking of creating a "SCP" sharing plugin for uploading
photos to a web server, but then thought that a "generic" command-line
sharing plugin would be even more universal and useful. I'm thinking
of a plugin that has a single-line configuration entry that contains
the command line will be called by the shell and the filename of the
to-be-shared file passed in as parameter (%s), so if I want to publish
photos on a server via SCP, I set up SSH public key authentication the
normal way and then create a new account with the following command
line:

scp %s user@server.example.org:~/photo-uploads/

The command will be called for each file that is to be shared, and the
success or failure of the operation is determined by the return value
of the application. The sharing framework support multiple "acounts"
per "service", so our "service" (Command line) can then have multiple
"accounts" (e.g. one for copying files via SCP to server A, one for
copying files via FTP to server B, ...) for different purposes.

Writing a shell script or utility that takes one media file to upload
as argument is much easier than writing a sharing plugin for every
service. Of course, it's not as user-friendly, but power users can do
lots of interesting things without much effort, and we can provide
"template command lines" for use by normal users (e.g. SCP, FTP, woof,
copy to "manual upload queue" folder in MyDocs, ...).

Is anyone interested in collaborating on such a plugin, or does such a
thing already exist?

Thanks,
Thomas
  •  Reply

Re: Proposal: Sharing plugin to call command-line apps (e.g. photo sharing via SCP)

Tuomas Kulve
Karma: 631
2010-01-02 21:57 UTC
Thomas Perl wrote:

> Is anyone interested in collaborating on such a plugin, or does such a
> thing already exist?

I've been planning to implement something like that for the scp use case
but haven't had the energy yet. I'm happy to at least test it, if you
get something done.


Thanks,
--
Tuomas
  •  Reply

Re: Proposal: Sharing plugin to call command-line apps (e.g. photo sharing via SCP)

Daniele Maio
Karma: 576
2010-01-04 04:50 UTC
On Sat, Jan 2, 2010 at 10:57 PM, Tuomas Kulve <tuomas@kulve.fi> wrote:

> Thomas Perl wrote:
>
> > Is anyone interested in collaborating on such a plugin, or does such a
> > thing already exist?
>

I don't know if something similiar already exist, btw I'm interested and you
can count me for collaborating.


> I've been planning to implement something like that for the scp use case
> but haven't had the energy yet. I'm happy to at least test it, if you
> get something done.
>
>
> Thanks,
> --
> Tuomas
>

  •  Reply

Re: Proposal: Sharing plugin to call command-line apps (e.g. photo sharing via SCP)

alan bruce
Karma: 1345
2010-01-04 23:14 UTC
Thomas,

What a MARVELOUS idea!

If you coupled this with an "Advanced Mode" in the File manager that let you
show all files and browse all directories, it would be The Best Idea Evar!

On Sat, Jan 2, 2010 at 7:53 AM, Thomas Perl <th.perl@gmail.com> wrote:

> Hello!
>
> I've been thinking of creating a "SCP" sharing plugin for uploading
> photos to a web server, but then thought that a "generic" command-line
> sharing plugin would be even more universal and useful. I'm thinking
> of a plugin that has a single-line configuration entry that contains
> the command line will be called by the shell and the filename of the
> to-be-shared file passed in as parameter (%s), so if I want to publish
> photos on a server via SCP, I set up SSH public key authentication the
> normal way and then create a new account with the following command
> line:
>
> scp %s user@server.example.org:~/photo-uploads/
>
> The command will be called for each file that is to be shared, and the
> success or failure of the operation is determined by the return value
> of the application. The sharing framework support multiple "acounts"
> per "service", so our "service" (Command line) can then have multiple
> "accounts" (e.g. one for copying files via SCP to server A, one for
> copying files via FTP to server B, ...) for different purposes.
>
> Writing a shell script or utility that takes one media file to upload
> as argument is much easier than writing a sharing plugin for every
> service. Of course, it's not as user-friendly, but power users can do
> lots of interesting things without much effort, and we can provide
> "template command lines" for use by normal users (e.g. SCP, FTP, woof,
> copy to "manual upload queue" folder in MyDocs, ...).
>
> Is anyone interested in collaborating on such a plugin, or does such a
> thing already exist?
>
> Thanks,
> Thomas
>



--
enthusiast, n. "One whose mind is wholly possessed and heated by what
engages it; one who is influenced by a peculiar fervor of mind; an ardent
and imaginative person."

  •  Reply

Re: Proposal: Sharing plugin to call command-line apps (e.g. photo sharing via SCP)

Thomas Perl
Karma: 2689
2010-01-07 12:12 UTC
Hello Alan, b0nc3 and Tuomas!

2010/1/5 Qole <qole.tablet@gmail.com>:
> On Sat, Jan 2, 2010 at 7:53 AM, Thomas Perl <th.perl@gmail.com> wrote:
>> I've been thinking of creating a "SCP" sharing plugin for uploading
>> photos to a web server, but then thought that a "generic" command-line
>> sharing plugin would be even more universal and useful. [...]
>
> What a MARVELOUS idea!

I have created a project on garage:

https://garage.maemo.org/projects/sharing-cli/

Would be nice if all of you who are interested can join this group so
we can collaboratively implement this plugin. I've set up the git
repository (although no commits yet) and am waiting for the mailing
list to be activated.

> If you coupled this with an "Advanced Mode" in the File manager that let you
> show all files and browse all directories, it would be The Best Idea Evar!

This should probably go into Petrovich - we have control over it (it's
open source), and it integrates the "Sharing" functionality already.

Greetings,
Thomas
  •  Reply