[rkward-devel] plugin skeleton [was: a new approach to external plugins]

meik michalke meik.michalke at uni-duesseldorf.de
Sun Aug 28 19:15:43 UTC 2011


hi,

am Samstag 27 August 2011 (12:54) schrieb Thomas Friedrichsmeier:
> For the moment, however, I see the most convincing use-case for a single 
> function
>   rk.create.plugin.skeleton()

i've just uploaded a new XiMpLe package with some new rk.* functions:

the already mentioned
  - rk.XML.dropdown()
  - rk.XML.tabbook()

as well as
  - rk.plugin.skeleton()
    - calls: rk.XML.plugin()
    - calls: rk.XML.pluginmap()
      - calls: rk.XML.about()

<example>
about.info <- list(
  about=list(
    name="Square the circle",
    desc="Squares the circle using Heisenberg compensation.",
    version="0.1-3",
    date=Sys.Date(),
    url="http://eternalwondermaths.example.org/23/stc.html",
    license="GPL",
    category="Geometry"),
  author=list(
    c(name="E.A. Dölle", email="doelle at eternalwondermaths.example.org",
      url="http://eternalwondermaths.example.org"),
    c(name="A. Assistant", email="alterego at eternalwondermaths.example.org",
      url="http://eternalwondermaths.example.org/staff/")),
  dependencies=list(
    rkward.min="0.5.3",
    rkward.max="",
    R.min="2.10",
    R.max=""),
    package=list(
    c(name="heisenberg", min="0.11-2", max="",
    repository="http://rforge.r-project.org"),
    c(name="DreamsOfPi", min="0.2", max="", repository="")),
  pluginmap=list(
    c(name="heisenberg.pluginmap", 
      url="http://eternalwondermaths.example.org/hsb"))
)

rk.plugin.skeleton("Square the Circle", path="/tmp", about=about.info)
</example>

this should create the directory structure and files for a plugin below 
'path'. if you want you can directly include content in the XML file, e.g.

<example>
test.dropdown <- rk.XML.dropdown("mydrop",
  opts=list("First Option"=c(val="val1"),
  "Second Option"=c(val="val2", chk=TRUE)))
test.tabbook <- rk.XML.tabbook("My Tabbook", tab.labels=c("First Tab",
  "Second Tab"), children=list(test.dropdown, NULL))

rk.plugin.skeleton("Square the Circle", path="/tmp", about=about.info, 
  dialog=list(test.tabbook), overwrite=TRUE)
</example>

the *.js and *.rkh files are still empty dummies, DESCRIPTION can be improved, 
and i did very little testing for side effects. still, i think it's not that 
bad for a train ride ;-)

the created skeleton pluginmap can be added and checked in RKWard immediately, 
and the whole structure can be used to build an R package. a package check 
just warned about non-ASCII characters in the DESCRIPTION, which shure can be 
dealt with somehow.


viele grüße :: m.eik

-- 
dipl. psych. meik michalke
institut f"ur experimentelle psychologie
abt. f"ur diagnostik und differentielle psychologie
heinrich-heine-universit"at d-40204 d"usseldorf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20110828/4d402a07/attachment.sig>


More information about the Rkward-devel mailing list