dump-github 0.1.2__py3-none-any.whl → 0.1.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
dump_github/main.py CHANGED
@@ -5,7 +5,7 @@ from .lib import *
5
5
  # Config_MaxSize = 1_000
6
6
 
7
7
  parser = argparse.ArgumentParser(
8
- prog="dump_github",
8
+ prog="dump-github",
9
9
  description="Backup users github repo.",
10
10
  epilog="https://github.com/Core2002/dump_github",
11
11
  )
@@ -31,10 +31,10 @@ def clone_repo(repo):
31
31
  os.system("git clone {}".format(url))
32
32
 
33
33
 
34
- def download_zip(user_name, reop_name):
35
- url = f"https://github.com/{user_name}/{reop_name}/archive/refs/heads/main.zip"
36
- print("Downloading repo zip: {}".format(reop_name))
37
- os.system("wget {} -O ./{}_{}.zip".format(url, user_name, reop_name))
34
+ def download_zip(user_name, reop):
35
+ url = f"https://github.com/{user_name}/{reop['name']}/archive/refs/heads/{reop['default_branch']}.zip"
36
+ print("Downloading repo zip: {}".format(reop["name"]))
37
+ os.system("wget {} -O ./{}_{}.zip".format(url, user_name, reop["name"]))
38
38
 
39
39
 
40
40
  def main():
@@ -44,7 +44,7 @@ def main():
44
44
  if args.print == True:
45
45
  print(repo["clone_url"])
46
46
  elif args.download_zip == True:
47
- download_zip(args.username, repo["name"])
47
+ download_zip(args.username, repo)
48
48
  else:
49
49
  clone_repo(repo)
50
50
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dump-github
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: This tool can be used to back up users' GitHub repositories in case they need them later.
5
5
  Home-page: https://github.com/core2002/dump_github
6
6
  Author: core2002
@@ -21,7 +21,7 @@ Github Dumper is a Python program designed to search for users' GitHub repositor
21
21
 
22
22
  **Usage:**
23
23
  ```
24
- usage: dump_github [-h] [-d] [-p] [-t TOKEN] username
24
+ usage: dump-github [-h] [-d] [-p] [-t TOKEN] username
25
25
 
26
26
  Backup users github repo.
27
27
 
@@ -0,0 +1,10 @@
1
+ dump_github/__init__.py,sha256=3XLRrchVn7g3TYWiQpv3u2lKdTO-jDqg4_0-lpmRuRs,43
2
+ dump_github/lib.py,sha256=pHONzAjGbXkmAUvCGn8HkHWS7fyY2qu9R17to6jD1TU,715
3
+ dump_github/main.py,sha256=5cGccpUxt88fiqPf5BPhmxY1vpwdO-8tzIj2KiRSyVs,1506
4
+ dump_github/mylib.py,sha256=pHONzAjGbXkmAUvCGn8HkHWS7fyY2qu9R17to6jD1TU,715
5
+ dump_github-0.1.4.dist-info/LICENSE,sha256=5tQa-lQLqvLhjTuELEk4bm70I5hcdjUeOn4qf3MK84E,1064
6
+ dump_github-0.1.4.dist-info/METADATA,sha256=Hv9Rqxb4uLtI508RNrT50ZBM_xlwx_DpqwfuNXVWnnA,1162
7
+ dump_github-0.1.4.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
8
+ dump_github-0.1.4.dist-info/entry_points.txt,sha256=qbBICoPzzAZRMjmgnFvndjx0SGhF8ji9MsY2F8Isrrs,50
9
+ dump_github-0.1.4.dist-info/top_level.txt,sha256=6oWfdkP2U1AN9zL6AUIUTxe6hYIeo_Nf8M8SWBxElUw,12
10
+ dump_github-0.1.4.dist-info/RECORD,,
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ dump-github = dump_github:main
3
+
@@ -1,10 +0,0 @@
1
- dump_github/__init__.py,sha256=3XLRrchVn7g3TYWiQpv3u2lKdTO-jDqg4_0-lpmRuRs,43
2
- dump_github/lib.py,sha256=pHONzAjGbXkmAUvCGn8HkHWS7fyY2qu9R17to6jD1TU,715
3
- dump_github/main.py,sha256=OJE08ZVbv1-TZvSUvmz6smjYYWoqSiDhE1XYyKynHBQ,1490
4
- dump_github/mylib.py,sha256=pHONzAjGbXkmAUvCGn8HkHWS7fyY2qu9R17to6jD1TU,715
5
- dump_github-0.1.2.dist-info/LICENSE,sha256=5tQa-lQLqvLhjTuELEk4bm70I5hcdjUeOn4qf3MK84E,1064
6
- dump_github-0.1.2.dist-info/METADATA,sha256=rtzv-7udXjyD7EOPqhWPt7sSlVh1E7FArBd82gfKaK0,1162
7
- dump_github-0.1.2.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
8
- dump_github-0.1.2.dist-info/entry_points.txt,sha256=bHSMsd4MLHu5N-1Vomjq7P_VLmFWN5VabwMVyJEJurA,50
9
- dump_github-0.1.2.dist-info/top_level.txt,sha256=6oWfdkP2U1AN9zL6AUIUTxe6hYIeo_Nf8M8SWBxElUw,12
10
- dump_github-0.1.2.dist-info/RECORD,,
@@ -1,3 +0,0 @@
1
- [console_scripts]
2
- dump_github = dump_github:main
3
-