KDE / synchrotron-sources

An OCS compatible web service for publishing application add-ons from upstream projects directly to users via a git repository.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction
============
Synchrotron is a small web app that takes a git repository populated with application
addons such as data packs, scripts, Plasmoids, etc. and automates the process of
turning that repository, referred to as the "source repository", into an
Open Collaboration Services compatible feed that can be used with, for instance,
"Get Hot New Stuff" features in KDE applications.

Quickstart
==========
To add support for your application's addons:

* Open the providers file that is in the top-level of the repository in a text editor and
  add a new group, such as [MyApplication]. The name of the group must be unique and will
  become part of the URL for your providers.xml file.

* Create a directory in the repository that has the same name as your group

* Popuplate that directory with your addons with each add-on in its own subdirectory. This
  subdirectory must contain a .desktop file describing the addon and a contents/ directory
  that contains the addon itself (or, alternaitvely, use the X-Synchrotron-ContentUrl key
  in the .desktop file; see below for more details on that)

* Commit and push your changes to git

* Within the next 15 minutes, the OCS-compatible feed will be available and the provider
  file will be located at http://collect.kde.org/<GroupNameFromProvidersFile>/providers.xml


Details
=======

The addons should be platform independant and multiple sets of addons in the same git
repository are supported. This allows one git repository to service the needs of
multiple applications (or multiple kinds of addons for one application) and serve
the entire user base of those addons.

This is the "sources" repository for the default Synchrotron installation.

The provider file in the root of the repository is an INI format file.
Each group represents a provider, so to create a new provider for your project start
a new group in this file. The name of the group becomes the name of the provider.
A directory by the same name must exist in the repository, this is where all items
for this provider are stored.

The following configuration params are understood and may appear as a key/value pair
in a provider's group in the provider configuration file:

    * compression: can be one of zip or none; in the case of "none", the
      first file in the content directory is simle copied over; support for
      tgz and tbz are on the TODO (patches welcome :). Default is "none"
    * metadata: the standard path to a .desktop file that contains the metadata
      for the addon. This file should be of the sort compatible with KPluginInfo.
      Default is "metadata.desktop"
    * packageSuffix: the suffix to append to created add on packages, e.g. for
      Plasmoids this is ".plasmoid"

For each provider, a directory matching the name of the group in the provider file
must exist. This is known as the "provider's content directory"

Within each provider's content directory, each addon to be published via OCS should
appear in its own directory. Directories only need to be uniquely named within each
provider; so multiple providers can have addons with the same names, for instance.

Within each addon directory, a content/ directory should exist which contains the
actual addon itself, unless the addon is hosted elsewhere outside of this repository.
The files in content/ can be a single (compressed) file or a set of uncompressed files.
If they are uncompressed, synchrotron will take care of compressing them into a single
package file for you using the compression= directive in the providers configuration
file.

For addons which already provide a .desktop file for local usage, uncompressed is
convenient as it means that the .desktop file installed on the user's computer can
be the same one used to generate the metadata for the OCS service.

For content which is hosted outside of the git repository, include a http URL to the
file in the metadata.desktop file like this:

    X-Synchrotron-ContentUrl=http://host/path/to/contentfile

Within each addon directory, an optional preview image can be included (currently
support for this is on the TODO, as are specifications for prefered image size and
format).

About

An OCS compatible web service for publishing application add-ons from upstream projects directly to users via a git repository.


Languages

Language:JavaScript 100.0%