SuperCollider CLASSES

# Quark

Package of SC classes and extensions
Source: /usr/local/share/SuperCollider/SCClassLibrary/Common/Quarks/Quark.sc
Inherits from: Object

## Description

A Quark is a package of SC classes, helpfiles and other SC code.

A Quark object is created from the quark file found at Quarks.local.path +/+ "DIRECTORY" +/+ nameOfQuark ++ ".quark". These Quark objects are mostly used just by the Quarks class, and you usually don't need to deal with them at all. But to publish a quark, you do need to make the quark file.

### Format of the .quark file

This quarkfile is written in sc code, and should contain a dictionary with basic information about the package.

(
// required:
\name:           "theName",
\path:           "foldername", // almost always the same as the quark name
\summary:        "Human readable summary",
\author:         "My Name",

// optional:
\version:        1.0, // must be a float
\organization:   "My Organization",
\country:        "My Country",
\since:          "2004",
\schelp:         "Classes/MyClass",
\ext_dependancy: "Information on additional software needed to run this quark properly",
\url:            "http://www.strangeQuark.de",

// If the quark depends on other quarks, you can specify it as a list containing:
// (1) strings (just the quark name)
\dependencies:   "nameOfDependantQuark"
// (2) key->value pairs (name->version)
//  \dependencies:   [("nameOfDependantQuark" -> 1.0)]
// or (3) arrays with info in this order: [name, version, repositoryBaseUrl]
//  \dependencies:   [["nameOfDependantQuark", 1.0, "https://svn.weirdserver.be/trunk/weirdquarks"]]

)

Of particular importance for the Quarks interface class is the PATH. This is the path relative to the quark directory. In most cases this is simply the name of the quark and also the name of the folder. However, you may wish to create a parent folder and then keep several quarks inside that, in which case your path would be: parentfolder/quarkname

It may even be possible to nest quarks inside of quarks (a kind of aggregate package), though a better way to do that would be to define an empty quark (the aggregate) and specify the other sub quarks as dependencies.

The value of \schelp optionally sets the main help file for the quark. It is a help path relative to an included HelpSource folder. For example, if the quark contains HelpSource/Reference/MyQuark.schelp one could use:

    \schelp: "Reference/MyQuark"

It is used by -help. If no \schelp is given, it will open the category browser showing all helpfiles for the quark.

NOTE: The old help system (sc version 3.4) used \helpdoc, and the new help system (SCDoc) uses \schelp instead to be able to support both old and new helpfiles during the transition to the new help system.
WARNING: Please test that you don't have any syntax errors in your quark file before commiting it.

## Class Methods

### *find (name)

Return the Quark object with specified name, if found.

## Instance Methods

### -name

The name of the quark.

### -summary

The summary of the quark.

### -version

The version of the quark.

### -author

The author of the quark.

### -path = value

The path of the quark.

### -info

The whole info blob as given in the .quark file.

### -help

Open the main helpfile for this quark as given by the \schelp key in the directory file, or the category browser page showing all helpfiles for this quark if no main helpfile was specified. This method falls back to opening the old help as given by \helpdoc if above fails.