Skip to main content

A Python package for automatic updating tools.

Project description

auto_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

Usage example:

import auto_update_founder #import pack
import os
import git
import shutil
import time

cwd = os.getcwd()
print(cwd)

auto_update_founder.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
auto_update_founder.set_current_version("1.1.2")

if not auto_update_founder.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

auto_update_founder-2.8.12.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

auto_update_founder-2.8.12-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file auto_update_founder-2.8.12.tar.gz.

File metadata

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

File hashes

Hashes for auto_update_founder-2.8.12.tar.gz
Algorithm Hash digest
SHA256 1e58a105e987c64363e3467c08c7e607eb12d7eeecfa85570ff706039d5f99c8
MD5 0f0363ca677fa3fe3c8e057d3a78799e
BLAKE2b-256 9a663b20587eb832e7e4a64fa81f9a18445101ba96f91afdfa01247d4c957711

See more details on using hashes here.

File details

Details for the file auto_update_founder-2.8.12-py3-none-any.whl.

File metadata

File hashes

Hashes for auto_update_founder-2.8.12-py3-none-any.whl
Algorithm Hash digest
SHA256 18b25a7f1778222188e2abfdf3441025167041c4dd93be82b3db4dfcf75bffb5
MD5 1860956492ddf84223deca52ce33f7ec
BLAKE2b-256 d8c3c7d62a2fdc3ec86bd758db3550957de511f5ee96d9377581aa981ec06ce0

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