tuxemon.mod_manager package

class tuxemon.mod_manager.Manager(*other_urls, default_to_cache=True)[source]

Bases: object

Parameters:
  • other_urls (Any) –

  • default_to_cache (bool) –

cache_to_pkglist()[source]

Override self.packages with the cache. Uses self.packages = self.read_from_cache()

Return type:

None

download_package(author, name, release, repo=None, dont_extract=False, install_deps=True, installed=None)[source]

Downloads the specified package

Parameters:
  • author (str) –

  • name (str) –

  • release (float | None) –

  • repo (Any | None) –

  • dont_extract (bool) –

  • install_deps (bool) –

  • installed (Any | None) –

Return type:

None

get_package_info(author, name, repo)[source]

Get specified package info. Always downloads the info from the server.

Parameters:
  • author (str) –

  • name (str) –

  • repo (Any) –

Return type:

None

get_package_repo(name)[source]

Reads the origin of an package. Returns None, if key ‘mods’ doesn’t exist

Parameters:

name (str) –

Return type:

Any

install_dependencies(author, name, repo, symlink=True, **args)[source]

Recursively resolve dependencies and symlink them

Parameters:
  • author (str) –

  • name (str) –

  • repo (Any) –

  • symlink (bool) –

  • args (Any) –

Return type:

None

install_local_package(filename, name, download_deps=False, link_deps=False)[source]

Installs local packages. Based on the download_package function, but without the downloads

Parameters:
  • filename (str) –

  • name (str) –

  • download_deps (bool) –

  • link_deps (bool) –

Return type:

None

parse_mod_conf(content)[source]

Parses the minetest’s mod.conf files. Returns: dict

Parameters:

content (Any) –

Return type:

Any

read_from_cache()[source]

Read self.packages from the cache file

Return type:

Any

read_package_from_list(name)[source]

Reads path of the specified mod

Parameters:

name (str) –

Return type:

Any

remove_package(name)[source]

Removes the local package

Parameters:

name (str) –

Return type:

None

remove_package_from_list(name)[source]

Removes specified package from the package list

Parameters:

name (str) –

Return type:

None

update(url)[source]

Returns the response from the server

Parameters:

url (str) –

Return type:

Any

update_all()[source]

Updates all packages in self.package. It automatically clears the self.package variable, and then populates it from the data from the repositories.

Return type:

None

write_package_to_list(path_to_folder, name)[source]

Writes specified package to the package list

Parameters:
  • path_to_folder (str) –

  • name (str) –

Return type:

None

write_to_cache()[source]

Writes self.packages to the cache file

Return type:

None

tuxemon.mod_manager.sanitize_paths(path)[source]

Removes path specific characters like /.

Parameters:

path (str) –

Return type:

str

Submodules