[Kde-imaging] Making a smugmug export plugin
Gilles Caulier
caulier.gilles at gmail.com
Tue Oct 7 09:45:32 CEST 2008
Hi Kosta,
Welcome in kipi project. We are always happy to see new contributor...
Writing smugmug plugin is a fine idea.
In first, you need to knoiw that KDE3 branche is closed for new
implementation. you will work on KDE4 code using trunk:
http://websvn.kde.org/trunk/extragear/graphics/kipi-plugins/
There is a main library to use in your plugin to play with host application
(as digiKam): libkipi. Since KDE4.1, this lib is hosted by in KDEGraphics
and published with KDE4 distro. source code is here:
http://websvn.kde.org/trunk/KDE/kdegraphics/libs/
There are others libraries here used by kipi-plugins and digiKam as:
libkexiv2 : C++ wrapper around Exiv2 library dedicated to host common method
to play with metadata following this paper :
http://www.metadataworkinggroup.com/pdf/mwg_guidance.pdf
libkdcraw : C++ wrapper around LibRaw library to play with Raw files.
libksane : a Sane interface to play with flat scanners.
I'm afraid about API doc. nothing is published on KDE API web site about
these libraries. i will contact maintainer's... At least, API doc is
available in header files. You can run Doxygen in your computer to generate
a suitable html documentation.
A second way to start a new plugin is to take a look into current code as
FlickrExport tool:
http://websvn.kde.org/trunk/extragear/graphics/kipi-plugins/flickrexport/
http://www.digikam.org/drupal/node/346
The plugin declaration to host application is done here :
http://websvn.kde.org/trunk/extragear/graphics/kipi-plugins/flickrexport/plugin_flickrexport.cpp?view=markup
... where you create menu action (look properties in libkipi) and methods to
run when user use it. In Flickr tool, a dialog is created and display
current selected items from host appliction to post on web service. This is
exactly what you need.
libkipi provide a set of container to host collections, selections,
items... properties. Just use it in your plugin. take a care that kipi
interface are generally non-reentrant and do not support (yet)
multithreading. Note that libkexiv2, libkdcraw support multithreading.
libkipi interface provides virtual classes re-implemented in host
application, especially to render virtual collection contents widget
following host application design. It's the case for ex with Flash Export
plugin:
http://www.flickr.com/photos/digikam/2608034196/
In kipi-plugins, you will find a collection of common code to use in your
plugin :
http://websvn.kde.org/trunk/extragear/graphics/kipi-plugins/common/libkipiplugins/
Just read header files for details.
Of course, you can post question in this room or join #kde-imaging and
#digiKam irc channels to find help.
Note : It's not too late to contribute to Coding Sprint planed in Genoa
(Italia) between 31 october and 2 november. It's a perfect way to meet
developpers and learn more about kipi project:
http://www.digikam.org/drupal/node/374
Best
Gilles Caulier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-imaging/attachments/20081007/8eb5d60e/attachment-0001.htm
More information about the Kde-imaging
mailing list