watchme.command package

Submodules

watchme.command.commit module

Copyright (C) 2019 Vanessa Sochat.

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

watchme.command.commit.get_commits(*args, **kwargs)[source]
watchme.command.commit.get_earliest_commit()[source]

get the earliest commit for a repository. This is intended to be used when in the present working directory

Parameters:repo (the repository path to get the commit from)
watchme.command.commit.get_latest_commit()[source]

get the latest commit for a repository in the present working directory

Parameters:repo (the repository path to get the commit from)
watchme.command.commit.git_add(*args, **kwargs)[source]
watchme.command.commit.git_clone(repo, name=None, base=None, force=False)[source]

clone a git repo to a destination. The user can provide the following groupings of arguments:

base without name: destination is ignored, the repo is cloned (named as it is) to the base. If the folder exists, –force must be used to remove it first.

base with name: destination is ignored, repo is cloned (and named based on name variable) to the base. The same applies for force.

dest provided: the repo is cloned to the destination, if it doesn’t exist and/or force is True.

Parameters:
  • name (the name of the watcher to add)
  • base (the base of the watcher (defaults to $HOME/.watchme)
  • force (remove first if already exists)
watchme.command.commit.git_commit(*args, **kwargs)[source]
watchme.command.commit.git_date(*args, **kwargs)[source]
watchme.command.commit.git_pwd(func)[source]

ensure that we are in the repo present working directory before running a git command. Return to where we were before after completion. The repo is always the first (positional or keyword) argument.

watchme.command.commit.git_show(*args, **kwargs)[source]
watchme.command.commit.write_timestamp(*args, **kwargs)[source]

watchme.command.create module

Copyright (C) 2019 Vanessa Sochat.

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

watchme.command.create.create_watcher(name=None, watcher_type=None, base=None)[source]

create a watcher, meaning a folder with a configuration and initialized git repo.

Parameters:
  • name (the watcher to create, uses default or WATCHME_WATCHER)
  • watcher_type (the type of watcher to create. defaults to) – WATCHER_DEFAULT_TYPE base: The watcher base to use (defaults to $HOME/.watchme)
watchme.command.create.create_watcher_base(name=None, base=None)[source]

create a watch base and default repo, if it doesn’t already exist.

Parameters:
  • name (the watcher to create, uses default or WATCHME_WATCHER)
  • base (the watcher base, defaults to WATCHME_BASE_DIR)

watchme.command.utils module

Copyright (C) 2019 Vanessa Sochat.

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

watchme.command.utils.clone_watcher(repo, base=None, name=None)[source]

clone a watcher from Github (or other version control with git) meaning that we clone to a temporary folder, and then move to a new folder. By default, the user gets all tasks associated with the watcher, along with the git folder so that removing is also done with version control.

Parameters:
  • repo (the repository to clone)
  • base (the watchme base, defaults to $HOME/.watchme)
  • name (a new name for the watcher, if a rename is desired.)
watchme.command.utils.get_watchers(base=None, quiet=False)[source]

list the watchers installed at a base. If base is not defined, the default base is used.

Parameters:base (the watchme base, defaults to $HOME/.watchme)
watchme.command.utils.list_task(watcher, task, base=None)[source]

list the contents (result files) of a task folder beloning to a watcher.

Parameters:
  • watcher (the watcher folder to use)
  • task (the task folder within)
  • base (the watchme base, defaults to $HOME/.watchme)
watchme.command.utils.list_watcher(watcher, base=None)[source]

list the contents (tasks) of a single watcher.

Parameters:base (the watchme base, defaults to $HOME/.watchme)
watchme.command.utils.list_watcher_types()[source]

list the exporter options provided by watchme

Module contents

Copyright (C) 2019 Vanessa Sochat.

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.