Skip to main content

A Python package for automatic updating tools.

Project description

update_founder

PYPI PROJECT A Python package to automatically find software updates of your repositories in GitHub

Discord Instagram YouTube

Updated Badge Python

how does it work:

Step 1: Go to your desired repository and create a file named version (don't give it a .txt extension) And write your code in that version.

write your code in that version.

Step 2: Right click on the raw option and copy the link

Right click on the raw option and copy the link

Step 3:


Usage example:

import found_update #import pack
import os
import git
import shutil
import time

cwd = os.getcwd()
print(cwd)

AutoUpdate.set_url("https://raw.githubusercontent.com/Pytholearn/HAZARD-CHAMELEONS/main/version") # Raw Code
download_link = "https://github.com/Pytholearn/HAZARD-CHAMELEONS.git" #Git Download Link
AutoUpdate.set_current_version("1.1.2")

if not AutoUpdate.is_up_to_date():
    print("New UPDATE!")

    print("Would you like to update your tool?")
    choice = input("If you like(Y) or you dont want to update (N)[>>>] ")
    if choice == "Y" or choice == "y":
    
        
        local_repo_path = os.path.join(cwd, "temp_repo")
        if not os.path.exists(local_repo_path):
            os.makedirs(local_repo_path)
        git.Repo.clone_from(download_link, local_repo_path)
        
        
        for root, dirs, files in os.walk(local_repo_path):
            relative_path = os.path.relpath(root, local_repo_path)
            for file in files:
                source_file_path = os.path.join(root, file)
                dest_file_path = os.path.join(cwd, relative_path, file)
                if os.path.exists(dest_file_path):
                    os.remove(dest_file_path)  
                shutil.move(source_file_path, dest_file_path)  
            for dir in dirs:
                source_dir_path = os.path.join(root, dir)
                dest_dir_path = os.path.join(cwd, relative_path, dir)
                if not os.path.exists(dest_dir_path):
                    shutil.move(source_dir_path, dest_dir_path) 
        
        
        shutil.rmtree(local_repo_path)
        print("Update Complete!")
        time.sleep(2)
    elif choice == "n" or choice == "N":
        pass
else:
    print("Update Not Found!")
    time.sleep(2)

FAQ

For Help: https://discord.gg/qD8SXrRJbw

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

found_update-1.5.8.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

found_update-1.5.8-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file found_update-1.5.8.tar.gz.

File metadata

  • Download URL: found_update-1.5.8.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for found_update-1.5.8.tar.gz
Algorithm Hash digest
SHA256 5ac23f11080935e860afde4b422d07fe755e985e00bcdc282148a5412838a132
MD5 77d36a0bc620190b47b4f796ab98e005
BLAKE2b-256 8f08be8c0ba4f5108e088e0f23c19d066220214584b4314d48e35fde98ed70cb

See more details on using hashes here.

File details

Details for the file found_update-1.5.8-py3-none-any.whl.

File metadata

File hashes

Hashes for found_update-1.5.8-py3-none-any.whl
Algorithm Hash digest
SHA256 bed204fcf9037b8715db4b738b61b771abab43ea75e9ec5f84d6a7f70e438622
MD5 fd09561453339457f3e282fc238351d1
BLAKE2b-256 de8bff32a5b32c560325623e63475742405185783e7dd55505292158bd2ce03f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page