# update_founder
PYPI PROJECT
A Python package to automatically find software updates of your repositories in GitHub
[](https://discord.gg/qD8SXrRJbw) [](https://instagram.com/ili.hazard) [](https://youtube.com/@iiihazard)
[](https://github.com/Pytholearn/found_update)

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.
<picture>
<img alt="write your code in that version." src="https://cdn.discordapp.com/attachments/1268584313763401749/1268585830574719046/6jR45QP.png?ex=66acf61f&is=66aba49f&hm=15be35caa7a1b2af851cafc61f7e4423170b14bcc005139293cbe96ae9dcdbf8&">
</picture>
Step 2:
Right click on the raw option and copy the link
<picture>
<img alt="Right click on the raw option and copy the link" src="https://cdn.discordapp.com/attachments/1268584313763401749/1268587064237228062/EvHRGqn.png?ex=66acf745&is=66aba5c5&hm=0c9e77f0c0eb9060fc2ad7fb98941b6ff2fe4cf16220c6cdfe4d591fc21b91bc&">
</picture>
Step 3:
```py
```
Usage example:
```py
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
Raw data
{
"_id": null,
"home_page": "https://github.com/Pytholearn/found_update",
"name": "found-update",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Pytholearn-HAZARD(ilia alizade)",
"author_email": "police123456789ilia@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/8f/08/be8c0ba4f5108e088e0f23c19d066220214584b4314d48e35fde98ed70cb/found_update-1.5.8.tar.gz",
"platform": null,
"description": "# update_founder\r\nPYPI PROJECT\r\nA Python package to automatically find software updates of your repositories in GitHub\r\n\r\n[](https://discord.gg/qD8SXrRJbw) [](https://instagram.com/ili.hazard) [](https://youtube.com/@iiihazard) \r\n\r\n[](https://github.com/Pytholearn/found_update)\r\n\r\n\r\n\r\n\r\nhow does it work:\r\n\r\nStep 1:\r\nGo to your desired repository and create a file named version (don't give it a .txt extension)\r\nAnd write your code in that version.\r\n\r\n<picture>\r\n <img alt=\"write your code in that version.\" src=\"https://cdn.discordapp.com/attachments/1268584313763401749/1268585830574719046/6jR45QP.png?ex=66acf61f&is=66aba49f&hm=15be35caa7a1b2af851cafc61f7e4423170b14bcc005139293cbe96ae9dcdbf8&\">\r\n</picture>\r\n\r\nStep 2:\r\nRight click on the raw option and copy the link\r\n\r\n<picture>\r\n <img alt=\"Right click on the raw option and copy the link\" src=\"https://cdn.discordapp.com/attachments/1268584313763401749/1268587064237228062/EvHRGqn.png?ex=66acf745&is=66aba5c5&hm=0c9e77f0c0eb9060fc2ad7fb98941b6ff2fe4cf16220c6cdfe4d591fc21b91bc&\">\r\n</picture>\r\n\r\nStep 3:\r\n```py\r\n\r\n```\r\n\r\nUsage example:\r\n```py\r\nimport found_update #import pack\r\nimport os\r\nimport git\r\nimport shutil\r\nimport time\r\n\r\ncwd = os.getcwd()\r\nprint(cwd)\r\n\r\nAutoUpdate.set_url(\"https://raw.githubusercontent.com/Pytholearn/HAZARD-CHAMELEONS/main/version\") # Raw Code\r\ndownload_link = \"https://github.com/Pytholearn/HAZARD-CHAMELEONS.git\" #Git Download Link\r\nAutoUpdate.set_current_version(\"1.1.2\")\r\n\r\nif not AutoUpdate.is_up_to_date():\r\n print(\"New UPDATE!\")\r\n\r\n print(\"Would you like to update your tool?\")\r\n choice = input(\"If you like(Y) or you dont want to update (N)[>>>] \")\r\n if choice == \"Y\" or choice == \"y\":\r\n \r\n \r\n local_repo_path = os.path.join(cwd, \"temp_repo\")\r\n if not os.path.exists(local_repo_path):\r\n os.makedirs(local_repo_path)\r\n git.Repo.clone_from(download_link, local_repo_path)\r\n \r\n \r\n for root, dirs, files in os.walk(local_repo_path):\r\n relative_path = os.path.relpath(root, local_repo_path)\r\n for file in files:\r\n source_file_path = os.path.join(root, file)\r\n dest_file_path = os.path.join(cwd, relative_path, file)\r\n if os.path.exists(dest_file_path):\r\n os.remove(dest_file_path) \r\n shutil.move(source_file_path, dest_file_path) \r\n for dir in dirs:\r\n source_dir_path = os.path.join(root, dir)\r\n dest_dir_path = os.path.join(cwd, relative_path, dir)\r\n if not os.path.exists(dest_dir_path):\r\n shutil.move(source_dir_path, dest_dir_path) \r\n \r\n \r\n shutil.rmtree(local_repo_path)\r\n print(\"Update Complete!\")\r\n time.sleep(2)\r\n elif choice == \"n\" or choice == \"N\":\r\n pass\r\nelse:\r\n print(\"Update Not Found!\")\r\n time.sleep(2)\r\n\r\n```\r\n\r\n## FAQ\r\n\r\n#### For Help: https://discord.gg/qD8SXrRJbw\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python package for automatic updating tools.",
"version": "1.5.8",
"project_urls": {
"Homepage": "https://github.com/Pytholearn/found_update"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "de8bff32a5b32c560325623e63475742405185783e7dd55505292158bd2ce03f",
"md5": "fd09561453339457f3e282fc238351d1",
"sha256": "bed204fcf9037b8715db4b738b61b771abab43ea75e9ec5f84d6a7f70e438622"
},
"downloads": -1,
"filename": "found_update-1.5.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fd09561453339457f3e282fc238351d1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 4051,
"upload_time": "2024-08-02T19:28:48",
"upload_time_iso_8601": "2024-08-02T19:28:48.411605Z",
"url": "https://files.pythonhosted.org/packages/de/8b/ff32a5b32c560325623e63475742405185783e7dd55505292158bd2ce03f/found_update-1.5.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8f08be8c0ba4f5108e088e0f23c19d066220214584b4314d48e35fde98ed70cb",
"md5": "77d36a0bc620190b47b4f796ab98e005",
"sha256": "5ac23f11080935e860afde4b422d07fe755e985e00bcdc282148a5412838a132"
},
"downloads": -1,
"filename": "found_update-1.5.8.tar.gz",
"has_sig": false,
"md5_digest": "77d36a0bc620190b47b4f796ab98e005",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 3498,
"upload_time": "2024-08-02T19:28:50",
"upload_time_iso_8601": "2024-08-02T19:28:50.444374Z",
"url": "https://files.pythonhosted.org/packages/8f/08/be8c0ba4f5108e088e0f23c19d066220214584b4314d48e35fde98ed70cb/found_update-1.5.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-02 19:28:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Pytholearn",
"github_project": "found_update",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "found-update"
}