diff --git a/edit.py b/edit.py index 544489a..9c7575c 100644 --- a/edit.py +++ b/edit.py @@ -10,6 +10,14 @@ COMMIT_MESSAGE = 'news update' HTML_INSERT_TAG = "" uploaded_image_path = None # Global to track uploaded image +def git_pull(): + try: + repo = Repo(PATH_OF_GIT_REPO) + origin = repo.remotes.origin + origin.pull() + except: + messagebox.showerror("Git error", "Something went wrong while pulling from origin") + def git_push(): try: repo = Repo(PATH_OF_GIT_REPO) @@ -137,5 +145,7 @@ img_lib_text.pack(padx=10, pady=5) submit_button = tk.Button(root, text="Submit to HTML", command=submit_content) submit_button.pack(pady=5) +git_pull() + root.mainloop() diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..ace7585 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +tk +GitPython +shutils