[Kde-pim] Commandline tools

Kevin Krammer kevin.krammer at gmx.at
Tue Aug 15 20:23:31 BST 2006


On Tuesday 15 August 2006 18:26, Mark Bucciarelli wrote:
> On Mon, Aug 14, 2006 at 11:20:57PM +0200, Kevin Krammer wrote:
> > On Monday 14 August 2006 22:12, Mark Bucciarelli wrote:
> > > also wasn't that one main piece of feedback from the isv's at
> > > that meeting in portland?
> >
> > The Portland task for addressbook access is not very detailed,
> > though I think kabcclient could handle it in any case :)
>
> IIRC, the ISV's at Portland said more command-line apps is good.
> Which I a bit odd, maybe Aaron will see this and chime in.

A commandline app is a little bit like a plugin, one can test if it is 
available instead of hard-depending on it, one can run it sychronously or 
asynchronously depending on the caller's needs, etc

> > Some ideas:
> > - unless an indivual name is very descriptive (for example like
> > konsolekalendar) it should be prefixed with kde4,
>
> From the perspective of someone just using command-line tools, I
> object to longer names for that case.  :P

No code^W commandline completion?

Do you as a develop object to long but descriptive method/variable names as 
well? ;)

> Rather than changing executable names, I would suggest a
> command-line arg that all console apps must support; say
> "--konsole" (not a particularly good one) or "--theK" [1] or
> probably best: "--console".  Then the gui and command-line tool
> have the same name.

Interesting idea. You mean like kdeinit becoming a different program depending 
on how it called?

e.g. just "kmail" would load libkmail_ui.so and "kmail --console" would load 
libkmail_console_so?

> > maybe having a second name part according to the module, e.g.
> > kde4-io-client (instead if kfmclient), maybe using
> > kde4-io-copy/move/trash as convenience shortcuts
>
> I don't have enough knowledge to comment here.  In general I
> would lean toward same names for gui and console versions.

If it is the console version of a specific program, I am all for it.
Some (most?) commandline tools will have only a small subset of one of the GUI 
apps or cover functionality not directly exposed in GUI apps, e.g. quering 
MIME settings, KDE's config

> Maybe the approach Linus took with git is relevant?  I believe he
> used a few executables coupled with shell scripts to, for
> example, provide both "git diff and git-diff".

Good point, some argv[0] magic and symlinks can work as well.

> It would be nice to have a cmake target so I can build and run
> these apps without X.
>
> More generally, I think having suite of console apps will support
> good API design, as it will create another "angle" to use the
> apps from.  It will also be easier to write unit tests, and more
> unit test writing will also help with API design.

Agreed

Cheers,
Kevin

-- 
Kevin Krammer <kevin.krammer at gmx.at>
Qt/KDE Developer, Debian User
Moderator: www.mrunix.de (German), www.qtcentre.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060815/fca9ac2c/attachment.sig>


More information about the kde-core-devel mailing list