Skip to main content

development

Integrating with other plugins

Posted in

This section describes how your plugin can be integrated with other LeechCraft plugins and facilities, from notifications to SB2.

Roadmap & wanted

Posted in

Since this page is write-protected, discussion of desired features can be found here.

Features we want

Jamendo integration in LMP.
We need to support radio streams, obtaining artists info, recommendations, album art and similar stuff as does LastFMScrobble for Last.FM.
HAL backend for Liznoo.
This will be needed for the FreeBSD port of Liznoo, since there is no UPower there.
UPower2 backend for Liznoo.
This should be pretty simple since UPower2 resembles UPower pretty much.

Plans

0.5.85

Release date: ≈15 September.

Nicer Google Drive support.
CHM support in Monocle.
Use chmlib for this.

Plugin-specific documentation

Posted in

This chapter lists information specific to plugins, like what kind of entities a plugin accepts, API for its subplugins, etc.

Packaging

Posted in

This page describes the process of packaging for LackMan.

Basics

Generally, LackMan package consists from a description of the package and a set of archives. Each archive corresponds to a separate package version, while package description describes the most recent version.

The package description file is named like the package itself, converted to lowercase and whitespaces removed. So for a package called Cool New Icons the corresponding file would be coolnewicons.xml.

Description example

The XML file for the Modern Bubbling package, which we will create in the next section, looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<package type="theme">
 <name>Modern Bubbling</name>
 <description>An Adium chat style theme from the Adiumxtras site.</description>
 <tags>
  <tag>azoth</tag>
  <tag>theme</tag>
  <tag>chat styles</tag>
  <tag>adium</tag>
 </tags>
 <versions>
  <version size="203060">1.0</version>
 </versions>
 <images>
  <icon url=""/>
  <screenshot url="http://files.leechcraft.org/modern_bubbling.png"/>
 </images>
 <long>A nice theme with lots of variants.&lt;br />&lt;br />
This package contains two variants: plain Modern Bubbling and Compact version, which allows to group consecutive messages into a single message bubble.&lt;br />&lt;br />
This theme is available at &lt;a href="http://www.adiumxtras.com/index.php?a=xtras&amp;xtra_id=3629">http://www.adiumxtras.com/index.php?a=xtras&amp;xtra_id=3629&lt;/a></long>
 <maintainer>
  <name>Georg Rudoy</name>
  <email>0xd34df00d@gmail.com</email>
 </maintainer>
 <depends/>
</package>

Creating package description

Package description is, well, just an XML file describing that package. That XML format isn't documented yet, though I hope someday it would be.

The best method of creating the description file is to use our tiny lcpackgen program. It's simple as hell and could be obtained via git: git://github.com/0xd34df00d/lcpackgen.git. It uses Qt and builds with cmake and could be built everywhere LeechCraft can run.

Here we will show by example how lcpackgen can be used. We'd make a description file for package Modern Bubbling, which is an Adium chat style for Azoth.

So, we run lcpackgen and see something like this:

We start filling different fields and noting where the label in bottom right corner becomes green, meaning that we have provided enough information. So, we fill in some fields in the Basic tab:

Please note how we use HTML in the Long description field.

Then we set what versions are available:

Our theme doesn't have any dependencies, so we leave that field blank. Also note that the label in the bottom right corner tells now that the description is valid. We can basically save the description, but since our theme is a really nice piece of artwork, we'd provide a screenshot:

In these fields, we can list URLs of screenshots and thumbnails, one URL per line.

Finally, we save the description to a directory containing all the stuff (like archives) related to our package as modernbubbling.xml.

Archives

Creating proper archives for the packages is documented on the corresponding Archives page.

Getting it into the repo

After you've created the package description and the corresponding archive (or several archives), you can either create an issue on our issue tracker with your files attached, send them into the maillist (leechcraft-users@lists.sourceforge.net), or find us in our XMPP conference, leechcraft@conference.jabber.ru.

After that, if all goes well, your package would be in the LackMan repos:

Archives

Posted in

This page describes creating archives for LackMan packages and also considers some common directory structures for different plugins.

Install destination

Basically, LackMan package is just a tar.gz archive (besides the package description) that would be unpacked to some destination, preserving the directory structure of the archive.

Different types of packages are installed to different places:

  • $LC_DATA_DIR/plugins/scriptable/$pluginlanguage/ for scriptable plugins.
  • $LC_DATA_DIR/icons/ for iconsets.
  • $LC_DATA_DIR/translations/ for translations.
  • $LC_DATA_DIR/data/ for theme packages and general data packages.

$LC_DATA_DIR is the directory in user's home directory where LeechCraft's data relies. Currently it is ~/.leechcraft.

As one may see, destination directory of a scriptable plugins depends on its language. The language name is used as the directory name, and it can be, for example, one of these:

  • python
  • qtscript
  • ruby

For example, a plugin written in Python would go into $LC_DATA_DIR/plugins/scriptable/python/, while JavaScript/QtScript plugin would go to $LC_DATA_DIR/plugins/scriptable/qtscript/.

Naming the archive

The archive should be named as the package with all whitespaces removed and converted to the lower case, plus the version number of the package.

So, for example, archive for the package Really Cool Smiles of version 1.2.1-beta1 would be named reallycoolsmiles-1.2.1-beta1.tar.gz.

Examples

Adium style for Azoth

Azoth AdiumStyles searches for custom Adium styles from $LC_DATA_DIR/data/azoth/styles/adium/. Each style should reside in its own directory, but each package could have several styles included.

So, suppose we want to make a package named Modern Bubbling of the version 1.0 with two styles: Modern Bubbling and Modern Bubbling (Compact). Due to Adium themes internals, the package archive should be created in such a way that, when unpacked, the main.css file have the following path:

$LC_DATA_DIR/data/azoth/styles/adium/Modern\ Bubbling.AdiumMessageStyle/Contents/Resources/main.css

Here we take the main.css file because it's pretty standard for Adium themes and exists in almost all of them.

So, we create a directory where we'd place our archive contents and cd into it. In this example, we assume the following directory: ~/Programming/lcupackages/modernbubbling/arch/. That is:

mkdir -p ~/Programming/lcupackages/modernbubbling/arch/
cd ~/Programming/lcupackages/modernbubbling/arch/

We place there what we want to go to the archive remembering that it would be extracted just to $LC_DATA_DIR/data/. So, our main.css file would be in:

~/Programming/lcupackages/modernbubbling/arch/azoth/styles/adium/Modern Bubbling.AdiumMessageStyle/Contents/Resources/main.css

Then we just create the archive with the following command:

tar cvzf modernbubbling-1.0.tar.gz azoth/

That is, our archive is ready!

Status icons pack for Azoth

Azoth searches for custom status icon packs in $LC_DATA_DIR/data/azoth/iconsets/contactlist/. Each subdirectory there is a separate icon pack and should contain files like online.png or dnd.png.

So, suppose we want to make a package named Humane Statuses of the version 2.1. We create a directory where we'd place our archive contents and cd into it. In this example, we assume the following directory: ~/Programming/lcupackages/humanestatuses/arch/. That is:

mkdir -p ~/Programming/lcupackages/humanestatuses/arch/
cd ~/Programming/lcupackages/humanestatuses/arch/

We place there what we want to go to the archive remembering that it would be extracted just to $LC_DATA_DIR/data/. So, for example, our online.svg file would be in:

~/Programming/lcupackages/modernbubbling/arch/azoth/iconsets/contactlist/Humane\ Statuses/online.svg

Then we just create the archive with the following command:

tar cvzf humanestatuses-2.1.tar.gz azoth/

That is, our archive is ready!

Syndicate content