errbot.repo_manager module

class errbot.repo_manager.BotRepoManager(storage_plugin, plugin_dir, plugin_indexes)[source]

Bases: errbot.storage.StoreMixin

Manages the repo list, git clones/updates or the repos.

__init__(storage_plugin, plugin_dir, plugin_indexes)[source]

Make a repo manager. :param storage_plugin: where the manager store its state. :param plugin_dir: where on disk it will git clone the repos. :param plugin_indexes: a list of URL / path to get the json repo index.

add_plugin_repo(name, url)[source]
check_for_index_update()[source]
get_all_repos_paths()[source]
get_installed_plugin_repos()[source]
get_repo_from_index(repo_name)[source]

Retreive the list of plugins for the repo_name from the index.

Parameters:repo_name -- the name of hte repo
Returns:a list of RepoEntry
index_update()[source]
install_repo(repo)[source]

Install the repository from repo

Parameters:repo --
The url, git url or path on disk of a repository. It can point to either a git repo or
a .tar.gz of a plugin
Returns:The path on disk where the repo has been installed on.
Raises:RepoException if an error occured.
search_repos(query)[source]

A simple search feature, keywords are AND and case insensitive on all the fields.

Parameters:query -- a string query
Returns:an iterator of RepoEntry
set_plugin_repos(repos)[source]

Used externally.

shutdown()[source]
uninstall_repo(name)[source]
update_all_repos()[source]
update_repos(repos)[source]

This git pulls the specified repos on disk. Yields tuples like (name, success, reason)

class errbot.repo_manager.RepoEntry(entry_name, name, python, repo, path, avatar_url, documentation)

Bases: tuple

avatar_url

Alias for field number 5

documentation

Alias for field number 6

entry_name

Alias for field number 0

name

Alias for field number 1

path

Alias for field number 4

python

Alias for field number 2

repo

Alias for field number 3

exception errbot.repo_manager.RepoException[source]

Bases: Exception

errbot.repo_manager.human_name_for_git_url(url)[source]
errbot.repo_manager.makeEntry(repo_name, plugin_name, json_value)[source]
errbot.repo_manager.tokenizeJsonEntry(json_dict)[source]

Returns all the words in a repo entry.