Classes | Quarks

Quarks : Object

Package manager
Source: Quarks.sc

Description

See Using Quarks for an introduction to the Quarks package system.

Class Methods

Quarks.gui

Show the interface for managing quarks

Returns:

QuarksGui

Quarks.install(name, refspec)

Arguments:

name

Name of a quark that is listed in the directory, or the url of a git repository or the path (absolute or relative to current working directory) of a folder to install.

refspec

Optional git refspec. By default it will install the latest version. Optionally you can specify a tag: "tags/1.0.0" A sha commit: "15e6ea822a18d06b286c3f10918f83b8d797d939" "HEAD" nil (default)

Returns:

this

Quarks.installQuark(quark)

Install a quark Usually you use *install with a name, url or path.

Arguments:

quark

Returns:

this

Quarks.uninstall(name)

Arguments:

name

Name (String) of a quark that is listed in the directory, or url of a git repository or the path (absolute or relative to current working directory) of a folder to uninstall.

Returns:

this

Quarks.clear

Uninstall all Quarks, by setting LanguageConfig.installedPaths to empty.

Returns:

this

Quarks.addFolder(path)

Arguments:

path

In addition to the default downloaded-quarks add folders that contain quarks to offer on the menu for installation. These may be private quarks, cloned working copies or folders where you have manually downloaded quarks.

NOTE: The argument should be a path to a directory containing quark directories. It should not be an isolated quark directory by itself. Users are discouraged from scattering quark directories in isolated locations.

Returns:

this

Quarks.all

All Quarks whether downloaded or installed or not. Includes any Quarks that were installed by path.

Returns:

Array of Quarks

Quarks.installed

All currently installed Quarks

Returns:

Array of Quarks

Quarks.isInstalled(name)

Arguments:

name

Name, url or path

Returns:

Boolean

Quarks.save(path)

Saves the currently installed quarks to a file as a list of urls and refspecs.

Arguments:

path

path of file to save to

Returns:

this

Quarks.load(path, done)

Clear all installed quarks and load a list from a file. Relative paths in the file are resolved relative to the file itself. eg. ./classes/my-quark Unix style tildas (~/supercollider/quarks/my-quark) resolve to the user's home directory, even on Windows. By convention the file is called quarks.txt

Arguments:

path

path of file to load. May contain ~ or relative paths (root is current working directory)

done

function to be evaluated when loading is done

Returns:

this

Quarks.update(name)

Runs 'git pull' on the checked out copy of the quark. The gui provides a more robust way to do updates.

Arguments:

name

name of quark

Returns:

this

Quarks.openFolder

Open the downloaded-quarks folder

Returns:

this

Quarks.folder

Path of the downloaded-quarks folder where Quarks are cloned to before installing.

Returns:

path

Quarks.fetchDirectory(force: true)

Private. Fetches the directory listing into downloaded-quarks/quarks If a local copy already exists and it is not a git repo then this is used instead.

Arguments:

force

(Boolean) Force fetch. By default it is fetched once per session. Recompile the class library to fetch it again, or call Quarks.fetchDirectory(true) to force it.

Returns:

this

Quarks.classesInPackage(packageName)

From extension in /usr/local/share/SuperCollider/SCClassLibrary/Common/Quarks/packages.sc

Returns the Classes that are defined in the Quark or package.

Arguments:

packageName

name of quark or any folder in Extensions or Common. "Common" is a package that refers to the standard library.

Returns:

Array of Classes

Quarks.link(path)

Adds the path to LanguageConfig.installedPaths. private

Arguments:

path

Returns:

this

Quarks.unlink(path)

Removes a path from LanguageConfig.installedPaths. private

Arguments:

path

Returns:

this

Quarks.initClass

private

Returns:

this

Quarks.findQuarkURL(name)

private

Arguments:

name

Returns:

this

Quarks.directoryUrl

Quarks.directoryUrl = value

The URL of the directory.txt file

Returns:

this

Quarks.directory

The community contributed Quarks directory. Fetched from the directoryUrl and parsed.

Returns:

Dictionary[name->url@refspec]

Quarks.asAbsolutePath(path, relativeTo)

Helper method to resolve paths to absolute paths.

Arguments:

path
relativeTo

optional root for resolving relative paths

Returns:

absolute path

Quarks.quarkNameAsLocalPath(name)

private

Arguments:

name

quark name, path or git url.

Returns:

absolute path where the Quark is

Quarks.at(name)

private. gets or creates a Quark by name, storing it in a central cache.

Arguments:

name

Returns:

Quark

Inherited class methods

Undocumented class methods

Quarks.additionalFolders

Quarks.additionalFolders = value

Quarks.asRelativePath(path, relativeToDir)

Quarks.checkForUpdates(done)

Quarks.clearCache

Quarks.installedPaths

Quarks.isPath(string)

Quarks.pathIsInstalled(path)

Quarks.prFetchDirectory

Quarks.uninstallQuark(quark)

Instance Methods

Inherited instance methods