[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Naming conventions for scripting applets and data engines
From:       "Richard Dale" <richard.j.dale () gmail ! com>
Date:       2008-11-14 20:02:56
Message-ID: 491684420811141202g15c1d598y70ee0ed179b98b5 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


2008/11/14 Aaron J. Seigo <aseigo@kde.org>

> On Friday 14 November 2008, Richard Dale wrote:
> > I think 'examples' is a better place than 'test', and that we are better
> > off dividing them into 'applets' and 'dataengine' directories like the
> ruby
> > ones.
>
> agreed ... it also follows other places in kde better.
>
> > I prefer the python names like 'pyclock' or 'rbclock' to 'python_clock'
> or
> > 'ruby_clock'.
> >
> > Do we need to include 'plasma_applet' or 'plasma_dataengine' in all the
> > names?
> >
> > Should the names contain hyphens or underscores instead?
>
> it depends on which names. =)
>
> * in the file system: ruby/examples/applets/clock should be clear?


>
> * installation dir: python_<appletname>, ruby_<appletname>
>
> * .desktop file: pasma-applet-python-<appletname>.desktop

OK, just tried that. I have my engine in dataengines/time, the name in the
metadata.desktop file is 'ruby-time', and I install with this command:

plasmapkg --install time --type dataengine

I get:

/home/rdale/.kde/share/apps/plasma/dataengines/ruby-time
/home/rdale/.kde/share/kde4/services/plasma-dataengine-ruby-time.desktop

So it looks like plasmapkg goes on the name inside the metadata.desktop file
for the destination directory, and so dataengines/ruby-time has a hyphen in
it, rather than an underscore.



>
>
> this just follows the conventions we already have in place and follow for
> the
> c++ side of life.
>
> the rational for all of it is to make it easy to use traditional command
> line
> tools to sort through things, e.g.:
>
>         ls ~/.kde/share/kde4/services/plasma-applet*

Yes, I certainly agree with that - this is an example of 'Convention over
Configuration' as long as we can establish the conventions before we have
too many applets.

-- Richard

[Attachment #5 (text/html)]

<br><br><div class="gmail_quote">2008/11/14 Aaron J. Seigo <span dir="ltr">&lt;<a \
href="mailto:aseigo@kde.org">aseigo@kde.org</a>&gt;</span><br><blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;"> <div class="Ih2E3d">On Friday 14 November 2008, \
Richard Dale wrote:<br> &gt; I think &#39;examples&#39; is a better place than \
&#39;test&#39;, and that we are better<br> &gt; off dividing them into \
&#39;applets&#39; and &#39;dataengine&#39; directories like the ruby<br> &gt; \
ones.<br> <br>
</div>agreed ... it also follows other places in kde better.<br>
<div class="Ih2E3d"><br>
&gt; I prefer the python names like &#39;pyclock&#39; or &#39;rbclock&#39; to \
&#39;python_clock&#39; or<br> &gt; &#39;ruby_clock&#39;.<br>
&gt;<br>
&gt; Do we need to include &#39;plasma_applet&#39; or &#39;plasma_dataengine&#39; in \
all the<br> &gt; names?<br>
&gt;<br>
&gt; Should the names contain hyphens or underscores instead?<br>
<br>
</div>it depends on which names. =)<br>
<br>
* in the file system: ruby/examples/applets/clock should be \
clear?</blockquote><blockquote class="gmail_quote" style="border-left: 1px solid \
rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br> <br>
* installation dir: python_&lt;appletname&gt;, ruby_&lt;appletname&gt;<br>
<br>
* .desktop file: pasma-applet-python-&lt;appletname&gt;.desktop</blockquote><div>OK, \
just tried that. I have my engine in dataengines/time, the name in the \
metadata.desktop file is &#39;ruby-time&#39;, and I install with this command:<br> \
<br>plasmapkg --install time --type dataengine<br><br>I \
get:<br><br>/home/rdale/.kde/share/apps/plasma/dataengines/ruby-time<br>/home/rdale/.kde/share/kde4/services/plasma-dataengine-ruby-time.desktop<br><br>So \
it looks like plasmapkg goes on the name inside the metadata.desktop file for the \
destination directory, and so dataengines/ruby-time has a hyphen in it, rather than \
an underscore.<br> <br>&nbsp;<br></div><blockquote class="gmail_quote" \
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; \
padding-left: 1ex;"><br> <br>
this just follows the conventions we already have in place and follow for the<br>
c++ side of life.<br>
<br>
the rational for all of it is to make it easy to use traditional command line<br>
tools to sort through things, e.g.:<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; ls ~/.kde/share/kde4/services/plasma-applet*<font \
color="#888888"></font></blockquote><div>Yes, I certainly agree with that - this is \
an example of &#39;Convention over Configuration&#39; as long as we can establish the \
conventions before we have too many applets.<br> <br>-- Richard<br></div></div><br>



_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic