dump-github 0.1.5__py3-none-any.whl → 0.1.6__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 +6 -4
- {dump_github-0.1.5.dist-info → dump_github-0.1.6.dist-info}/METADATA +1 -1
- dump_github-0.1.6.dist-info/RECORD +10 -0
- dump_github-0.1.5.dist-info/RECORD +0 -10
- {dump_github-0.1.5.dist-info → dump_github-0.1.6.dist-info}/LICENSE +0 -0
- {dump_github-0.1.5.dist-info → dump_github-0.1.6.dist-info}/WHEEL +0 -0
- {dump_github-0.1.5.dist-info → dump_github-0.1.6.dist-info}/entry_points.txt +0 -0
- {dump_github-0.1.5.dist-info → dump_github-0.1.6.dist-info}/top_level.txt +0 -0
dump_github/main.py
CHANGED
|
@@ -35,13 +35,15 @@ def clone_repo(repo):
|
|
|
35
35
|
def download_zip(user_name, reop):
|
|
36
36
|
url = f"https://github.com/{user_name}/{reop['name']}/archive/refs/heads/{reop['default_branch']}.zip"
|
|
37
37
|
max_size = args.limit_size * 1000 * 1000
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
)
|
|
38
|
+
file_name = f"./{user_name}_{reop['name']}.zip"
|
|
39
|
+
cmd = "curl -L --connect-timeout 5 --retry 3 --retry-delay 3 --max-filesize {} {} -o {}".format(
|
|
40
|
+
max_size, url, file_name
|
|
42
41
|
)
|
|
43
42
|
print(f"Download {reop['name']} : {url}")
|
|
44
43
|
os.system(cmd)
|
|
44
|
+
if os.path.exists(file_name) and max_size < os.stat(file_name).st_size:
|
|
45
|
+
os.remove(file_name)
|
|
46
|
+
print(f"Removed {file_name} because it exceeds the limit size.")
|
|
45
47
|
|
|
46
48
|
|
|
47
49
|
def main():
|
|
@@ -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=uTPdcVwg0mkmOAGJXpVeBn3m3f7SyNOracyqAnR-KuA,1842
|
|
4
|
+
dump_github/mylib.py,sha256=pHONzAjGbXkmAUvCGn8HkHWS7fyY2qu9R17to6jD1TU,715
|
|
5
|
+
dump_github-0.1.6.dist-info/LICENSE,sha256=5tQa-lQLqvLhjTuELEk4bm70I5hcdjUeOn4qf3MK84E,1064
|
|
6
|
+
dump_github-0.1.6.dist-info/METADATA,sha256=N-GTzKpnXMnd1tsmEiJc7exaO0XEbuJJTuzqiDQemBI,1287
|
|
7
|
+
dump_github-0.1.6.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
8
|
+
dump_github-0.1.6.dist-info/entry_points.txt,sha256=qbBICoPzzAZRMjmgnFvndjx0SGhF8ji9MsY2F8Isrrs,50
|
|
9
|
+
dump_github-0.1.6.dist-info/top_level.txt,sha256=6oWfdkP2U1AN9zL6AUIUTxe6hYIeo_Nf8M8SWBxElUw,12
|
|
10
|
+
dump_github-0.1.6.dist-info/RECORD,,
|
|
@@ -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=8Ye8RHf9il4rkjWui5NcPsZAlIMtFymmaWB8sAZOplU,1639
|
|
4
|
-
dump_github/mylib.py,sha256=pHONzAjGbXkmAUvCGn8HkHWS7fyY2qu9R17to6jD1TU,715
|
|
5
|
-
dump_github-0.1.5.dist-info/LICENSE,sha256=5tQa-lQLqvLhjTuELEk4bm70I5hcdjUeOn4qf3MK84E,1064
|
|
6
|
-
dump_github-0.1.5.dist-info/METADATA,sha256=xDZ0VFYmP0ImFyfHb-VHvhiVLznuCUPuP_2bP2lRwNw,1287
|
|
7
|
-
dump_github-0.1.5.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
8
|
-
dump_github-0.1.5.dist-info/entry_points.txt,sha256=qbBICoPzzAZRMjmgnFvndjx0SGhF8ji9MsY2F8Isrrs,50
|
|
9
|
-
dump_github-0.1.5.dist-info/top_level.txt,sha256=6oWfdkP2U1AN9zL6AUIUTxe6hYIeo_Nf8M8SWBxElUw,12
|
|
10
|
-
dump_github-0.1.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|