github-backup 0.45.0__py3-none-any.whl → 0.45.2__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.
- github_backup/__init__.py +1 -1
- github_backup/github_backup.py +10 -3
- {github_backup-0.45.0.dist-info → github_backup-0.45.2.dist-info}/METADATA +8 -1
- github_backup-0.45.2.dist-info/RECORD +9 -0
- {github_backup-0.45.0.dist-info → github_backup-0.45.2.dist-info}/WHEEL +1 -1
- github_backup-0.45.0.dist-info/RECORD +0 -9
- {github_backup-0.45.0.data → github_backup-0.45.2.data}/scripts/github-backup +0 -0
- {github_backup-0.45.0.dist-info → github_backup-0.45.2.dist-info}/LICENSE.txt +0 -0
- {github_backup-0.45.0.dist-info → github_backup-0.45.2.dist-info}/top_level.txt +0 -0
- {github_backup-0.45.0.dist-info → github_backup-0.45.2.dist-info}/zip-safe +0 -0
github_backup/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.45.
|
|
1
|
+
__version__ = "0.45.2"
|
github_backup/github_backup.py
CHANGED
|
@@ -777,14 +777,19 @@ class S3HTTPRedirectHandler(HTTPRedirectHandler):
|
|
|
777
777
|
return request
|
|
778
778
|
|
|
779
779
|
|
|
780
|
-
def download_file(url, path, auth):
|
|
780
|
+
def download_file(url, path, auth, as_app=False, fine=False):
|
|
781
781
|
# Skip downloading release assets if they already exist on disk so we don't redownload on every sync
|
|
782
782
|
if os.path.exists(path):
|
|
783
783
|
return
|
|
784
784
|
|
|
785
|
-
request =
|
|
785
|
+
request = _construct_request(per_page=100,
|
|
786
|
+
page=1,
|
|
787
|
+
query_args={},
|
|
788
|
+
template=url,
|
|
789
|
+
auth=auth,
|
|
790
|
+
as_app=as_app,
|
|
791
|
+
fine=fine)
|
|
786
792
|
request.add_header("Accept", "application/octet-stream")
|
|
787
|
-
request.add_header("Authorization", "Basic ".encode("ascii") + auth)
|
|
788
793
|
opener = build_opener(S3HTTPRedirectHandler)
|
|
789
794
|
|
|
790
795
|
try:
|
|
@@ -1255,6 +1260,8 @@ def backup_releases(args, repo_cwd, repository, repos_template, include_assets=F
|
|
|
1255
1260
|
asset["url"],
|
|
1256
1261
|
os.path.join(release_assets_cwd, asset["name"]),
|
|
1257
1262
|
get_auth(args),
|
|
1263
|
+
as_app=args.as_app,
|
|
1264
|
+
fine=True if args.token_fine is not None else False
|
|
1258
1265
|
)
|
|
1259
1266
|
|
|
1260
1267
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: github-backup
|
|
3
|
-
Version: 0.45.
|
|
3
|
+
Version: 0.45.2
|
|
4
4
|
Summary: backup a github user or organization
|
|
5
5
|
Home-page: http://github.com/josegonzalez/python-github-backup
|
|
6
6
|
Author: Jose Diaz-Gonzalez
|
|
@@ -230,6 +230,13 @@ When you use the ``--lfs`` option, you will need to make sure you have Git LFS i
|
|
|
230
230
|
Instructions on how to do this can be found on https://git-lfs.github.com.
|
|
231
231
|
|
|
232
232
|
|
|
233
|
+
Run in Docker container
|
|
234
|
+
-----------------------
|
|
235
|
+
|
|
236
|
+
To run the tool in a Docker container use the following command:
|
|
237
|
+
|
|
238
|
+
sudo docker run --rm -v /path/to/backup:/data --name github-backup ghcr.io/josegonzalez/python-github-backup -o /data $OPTIONS $USER
|
|
239
|
+
|
|
233
240
|
Gotchas / Known-issues
|
|
234
241
|
======================
|
|
235
242
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
github_backup/__init__.py,sha256=tds0V9F1Q9oamCkPJBF1oU5gAI0B2Y0XGkpwE0Axysk,23
|
|
2
|
+
github_backup/github_backup.py,sha256=EiYRWJZI5VK-T3QREblmg3YH7dAY74t1zRd5c5yNFsk,48052
|
|
3
|
+
github_backup-0.45.2.data/scripts/github-backup,sha256=I79TNA67phytRmI9nm_LlD9h2zauXFOsOn9tYyAy9pU,1546
|
|
4
|
+
github_backup-0.45.2.dist-info/LICENSE.txt,sha256=ML-pLyn1qtAKo_DHMcQ8-p7k3f8cp-IR-mf5B49R2rk,1085
|
|
5
|
+
github_backup-0.45.2.dist-info/METADATA,sha256=tJ-JWFkNs1X7n5J-ZiDybXdrfTJOhprIP5MFFSrxo_8,19223
|
|
6
|
+
github_backup-0.45.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
7
|
+
github_backup-0.45.2.dist-info/top_level.txt,sha256=Za6fKRAlxZ0b3ZBH_osPqklLe14LetdNAkvAQANT2AA,14
|
|
8
|
+
github_backup-0.45.2.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
9
|
+
github_backup-0.45.2.dist-info/RECORD,,
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
github_backup/__init__.py,sha256=p2Xvd610sh3godS2s3KpBCKAbfwwnEs-mH0Q6wQI5LE,23
|
|
2
|
-
github_backup/github_backup.py,sha256=4DX06Tbj6QtSRgEsWBNWqV1cvrryZBvf7RUmxDlG2dg,47687
|
|
3
|
-
github_backup-0.45.0.data/scripts/github-backup,sha256=I79TNA67phytRmI9nm_LlD9h2zauXFOsOn9tYyAy9pU,1546
|
|
4
|
-
github_backup-0.45.0.dist-info/LICENSE.txt,sha256=ML-pLyn1qtAKo_DHMcQ8-p7k3f8cp-IR-mf5B49R2rk,1085
|
|
5
|
-
github_backup-0.45.0.dist-info/METADATA,sha256=fRe-Ut7k4UVvklGr4nWUNPowGMQoKvnaF5wGZLrx16o,18970
|
|
6
|
-
github_backup-0.45.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
7
|
-
github_backup-0.45.0.dist-info/top_level.txt,sha256=Za6fKRAlxZ0b3ZBH_osPqklLe14LetdNAkvAQANT2AA,14
|
|
8
|
-
github_backup-0.45.0.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
9
|
-
github_backup-0.45.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|