View Module Documentation¶
-
class
view.
View
(*args, **kwargs)[source]¶ ..class:: View This class is used for getting user inputs. It uses the tkinter GUI package. ..data::master_file
StringVar() variable holds the name of the master file- ..data::local_file
- StringVar() variable holds the name of the local file
- ..data::master_path
- StringVar() variable holds the name of the directory which holds the master file
- ..data::local_path
- StringVar() variable holds the name of the directory which holds the local file
-
close
()[source]¶ deletes the instance of View , commits the new added features to the local file to the remote repository and deletes all the temporary directories that were created for this application
-
list_differences
(list, list2)[source]¶ create a window to display the differences between the two files as two categories: one shows the differences between values of the two properties for a record and the other shows the property present in the master file but not in the local file Args:
list: list of record that have a difference in properties on the master file and the local file list2:list of record that have a property on the master file which is not present on the local file
-
select_disk_files
()[source]¶ create a new window to input the two repositories from which the two bibtex files will be selected
-
select_files
(repo1, repo2, branch1, branch2)[source]¶ given the names of two repositories and their branch names this method creates a local repository and pulls down the content from git
-
view.
commit_remote
(repo, file)[source]¶ Commits to the index of the local git repository and calls the git push Args:
repo: Reference to the head of the local git repository file: File that will be added to the index for the commit and push
to the remote git repository- Raises:
- git.exc.GitCommandError: If git.push() fails
-
view.
create_local_repo
(remote_git, dir, branch)[source]¶ Uses the git.clone_from method to clone a remote git repository locally Args:
remote_git: Url of the remote git repository dir: Local directory where the contents of the
remote git will be downloadedbranch: Name of the branch on the remote git which will be used for cloning
- Returns:
- git.repo: Reference to the local git repository
- Raises:
- git.exc.InvalidGitRepositoryError: If remote git repository is bare git.exc.GitCommandError: If remote git repository does not exist