github-backup 0.50.3__tar.gz → 0.51.0__tar.gz

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.
@@ -1,9 +1,373 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
- 0.50.3 (2025-08-08)
4
+ 0.51.0 (2025-11-06)
5
5
  -------------------
6
6
  ------------------------
7
+
8
+ Fix
9
+ ~~~
10
+ - Remove Python 3.8 and 3.9 from CI matrix. [Rodos]
11
+
12
+ 3.8 and 3.9 are failing because the pinned dependencies don't support them:
13
+ - autopep8==2.3.2 needs Python 3.9+
14
+ - bleach==6.3.0 needs Python 3.10+
15
+
16
+ Both are EOL now anyway (3.8 in Oct 2024, 3.9 in Oct 2025).
17
+
18
+ Just fixing CI to test 3.10-3.14 for now. Will do a separate PR to formally
19
+ drop 3.8/3.9 support with python_requires and README updates.
20
+
21
+ Other
22
+ ~~~~~
23
+ - Refactor: Add atomic writes for attachment files and manifests.
24
+ [Rodos]
25
+ - Feat: Add attachment download support for issues and pull requests.
26
+ [Rodos]
27
+
28
+ Adds new --attachments flag that downloads user-uploaded files from
29
+ issue and PR bodies and comments. Key features:
30
+
31
+ - Determines attachment URLs
32
+ - Tracks downloads in manifest.json with metadata
33
+ - Supports --skip-existing to avoid re-downloading
34
+ - Handles filename collisions with counter suffix
35
+ - Smart retry logic for transient vs permanent failures
36
+ - Uses Content-Disposition for correct file extensions
37
+ - Feat: Drop support for Python 3.8 and 3.9 (EOL) [Rodos]
38
+
39
+ Both Python 3.8 and 3.9 have reached end-of-life:
40
+ - Python 3.8: EOL October 7, 2024
41
+ - Python 3.9: EOL October 31, 2025
42
+
43
+ Changes:
44
+ - Add python_requires=">=3.10" to setup.py
45
+ - Remove Python 3.8 and 3.9 from classifiers
46
+ - Add Python 3.13 and 3.14 to classifiers
47
+ - Update README to document Python 3.10+ requirement
48
+ - Feat: Enforce Python 3.8+ requirement and add multi-version CI
49
+ testing. [Rodos]
50
+
51
+ - Add python_requires=">=3.8" to setup.py to enforce minimum version at install time
52
+ - Update README to explicitly document Python 3.8+ requirement
53
+ - Add CI matrix to test lint/build on Python 3.8-3.14 (7 versions)
54
+ - Aligns with actual usage patterns (~99% of downloads on Python 3.8+)
55
+ - Prevents future PRs from inadvertently using incompatible syntax
56
+
57
+ This change protects users by preventing installation on unsupported Python
58
+ versions and ensures contributors can see version requirements clearly.
59
+ - Chore(deps): bump bleach in the python-packages group.
60
+ [dependabot[bot]]
61
+
62
+ Bumps the python-packages group with 1 update: [bleach](https://github.com/mozilla/bleach).
63
+
64
+
65
+ Updates `bleach` from 6.2.0 to 6.3.0
66
+ - [Changelog](https://github.com/mozilla/bleach/blob/main/CHANGES)
67
+ - [Commits](https://github.com/mozilla/bleach/compare/v6.2.0...v6.3.0)
68
+
69
+ ---
70
+ updated-dependencies:
71
+ - dependency-name: bleach
72
+ dependency-version: 6.3.0
73
+ dependency-type: direct:production
74
+ update-type: version-update:semver-minor
75
+ dependency-group: python-packages
76
+ ...
77
+ - Chore(deps): bump charset-normalizer in the python-packages group.
78
+ [dependabot[bot]]
79
+
80
+ Bumps the python-packages group with 1 update: [charset-normalizer](https://github.com/jawah/charset_normalizer).
81
+
82
+
83
+ Updates `charset-normalizer` from 3.4.3 to 3.4.4
84
+ - [Release notes](https://github.com/jawah/charset_normalizer/releases)
85
+ - [Changelog](https://github.com/jawah/charset_normalizer/blob/master/CHANGELOG.md)
86
+ - [Commits](https://github.com/jawah/charset_normalizer/compare/3.4.3...3.4.4)
87
+
88
+ ---
89
+ updated-dependencies:
90
+ - dependency-name: charset-normalizer
91
+ dependency-version: 3.4.4
92
+ dependency-type: direct:production
93
+ update-type: version-update:semver-patch
94
+ dependency-group: python-packages
95
+ ...
96
+ - Chore(deps): bump idna from 3.10 to 3.11 in the python-packages group.
97
+ [dependabot[bot]]
98
+
99
+ Bumps the python-packages group with 1 update: [idna](https://github.com/kjd/idna).
100
+
101
+
102
+ Updates `idna` from 3.10 to 3.11
103
+ - [Release notes](https://github.com/kjd/idna/releases)
104
+ - [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst)
105
+ - [Commits](https://github.com/kjd/idna/compare/v3.10...v3.11)
106
+
107
+ ---
108
+ updated-dependencies:
109
+ - dependency-name: idna
110
+ dependency-version: '3.11'
111
+ dependency-type: direct:production
112
+ update-type: version-update:semver-minor
113
+ dependency-group: python-packages
114
+ ...
115
+ - Chore(deps): bump the python-packages group across 1 directory with 2
116
+ updates. [dependabot[bot]]
117
+
118
+ Bumps the python-packages group with 2 updates in the / directory: [platformdirs](https://github.com/tox-dev/platformdirs) and [rich](https://github.com/Textualize/rich).
119
+
120
+
121
+ Updates `platformdirs` from 4.4.0 to 4.5.0
122
+ - [Release notes](https://github.com/tox-dev/platformdirs/releases)
123
+ - [Changelog](https://github.com/tox-dev/platformdirs/blob/main/CHANGES.rst)
124
+ - [Commits](https://github.com/tox-dev/platformdirs/compare/4.4.0...4.5.0)
125
+
126
+ Updates `rich` from 14.1.0 to 14.2.0
127
+ - [Release notes](https://github.com/Textualize/rich/releases)
128
+ - [Changelog](https://github.com/Textualize/rich/blob/master/CHANGELOG.md)
129
+ - [Commits](https://github.com/Textualize/rich/compare/v14.1.0...v14.2.0)
130
+
131
+ ---
132
+ updated-dependencies:
133
+ - dependency-name: platformdirs
134
+ dependency-version: 4.5.0
135
+ dependency-type: direct:production
136
+ update-type: version-update:semver-minor
137
+ dependency-group: python-packages
138
+ - dependency-name: rich
139
+ dependency-version: 14.2.0
140
+ dependency-type: direct:production
141
+ update-type: version-update:semver-minor
142
+ dependency-group: python-packages
143
+ ...
144
+ - Chore(deps): bump the python-packages group with 3 updates.
145
+ [dependabot[bot]]
146
+
147
+ Bumps the python-packages group with 3 updates: [certifi](https://github.com/certifi/python-certifi), [click](https://github.com/pallets/click) and [markdown-it-py](https://github.com/executablebooks/markdown-it-py).
148
+
149
+
150
+ Updates `certifi` from 2025.8.3 to 2025.10.5
151
+ - [Commits](https://github.com/certifi/python-certifi/compare/2025.08.03...2025.10.05)
152
+
153
+ Updates `click` from 8.1.8 to 8.3.0
154
+ - [Release notes](https://github.com/pallets/click/releases)
155
+ - [Changelog](https://github.com/pallets/click/blob/main/CHANGES.rst)
156
+ - [Commits](https://github.com/pallets/click/compare/8.1.8...8.3.0)
157
+
158
+ Updates `markdown-it-py` from 3.0.0 to 4.0.0
159
+ - [Release notes](https://github.com/executablebooks/markdown-it-py/releases)
160
+ - [Changelog](https://github.com/executablebooks/markdown-it-py/blob/master/CHANGELOG.md)
161
+ - [Commits](https://github.com/executablebooks/markdown-it-py/compare/v3.0.0...v4.0.0)
162
+
163
+ ---
164
+ updated-dependencies:
165
+ - dependency-name: certifi
166
+ dependency-version: 2025.10.5
167
+ dependency-type: direct:production
168
+ update-type: version-update:semver-minor
169
+ dependency-group: python-packages
170
+ - dependency-name: click
171
+ dependency-version: 8.3.0
172
+ dependency-type: direct:production
173
+ update-type: version-update:semver-minor
174
+ dependency-group: python-packages
175
+ - dependency-name: markdown-it-py
176
+ dependency-version: 4.0.0
177
+ dependency-type: direct:production
178
+ update-type: version-update:semver-major
179
+ dependency-group: python-packages
180
+ ...
181
+ - Chore(deps): bump docutils in the python-packages group.
182
+ [dependabot[bot]]
183
+
184
+ Bumps the python-packages group with 1 update: [docutils](https://github.com/rtfd/recommonmark).
185
+
186
+
187
+ Updates `docutils` from 0.22.1 to 0.22.2
188
+ - [Changelog](https://github.com/readthedocs/recommonmark/blob/master/CHANGELOG.md)
189
+ - [Commits](https://github.com/rtfd/recommonmark/commits)
190
+
191
+ ---
192
+ updated-dependencies:
193
+ - dependency-name: docutils
194
+ dependency-version: 0.22.2
195
+ dependency-type: direct:production
196
+ update-type: version-update:semver-patch
197
+ dependency-group: python-packages
198
+ ...
199
+ - Chore(deps): bump the python-packages group across 1 directory with 2
200
+ updates. [dependabot[bot]]
201
+
202
+ Bumps the python-packages group with 2 updates in the / directory: [black](https://github.com/psf/black) and [docutils](https://github.com/rtfd/recommonmark).
203
+
204
+
205
+ Updates `black` from 25.1.0 to 25.9.0
206
+ - [Release notes](https://github.com/psf/black/releases)
207
+ - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
208
+ - [Commits](https://github.com/psf/black/compare/25.1.0...25.9.0)
209
+
210
+ Updates `docutils` from 0.22 to 0.22.1
211
+ - [Changelog](https://github.com/readthedocs/recommonmark/blob/master/CHANGELOG.md)
212
+ - [Commits](https://github.com/rtfd/recommonmark/commits)
213
+
214
+ ---
215
+ updated-dependencies:
216
+ - dependency-name: black
217
+ dependency-version: 25.9.0
218
+ dependency-type: direct:production
219
+ update-type: version-update:semver-minor
220
+ dependency-group: python-packages
221
+ - dependency-name: docutils
222
+ dependency-version: 0.22.1
223
+ dependency-type: direct:production
224
+ update-type: version-update:semver-patch
225
+ dependency-group: python-packages
226
+ ...
227
+ - Delete .github/ISSUE_TEMPLATE.md. [Jose Diaz-Gonzalez]
228
+ - Create feature.yaml. [Jose Diaz-Gonzalez]
229
+ - Delete .github/ISSUE_TEMPLATE/bug_report.md. [Jose Diaz-Gonzalez]
230
+ - Rename bug.md to bug.yaml. [Jose Diaz-Gonzalez]
231
+ - Chore: create bug template. [Jose Diaz-Gonzalez]
232
+ - Chore: Rename PULL_REQUEST.md to .github/PULL_REQUEST.md. [Jose Diaz-
233
+ Gonzalez]
234
+ - Chore: Rename ISSUE_TEMPLATE.md to .github/ISSUE_TEMPLATE.md. [Jose
235
+ Diaz-Gonzalez]
236
+ - Chore(deps): bump actions/setup-python from 5 to 6. [dependabot[bot]]
237
+
238
+ Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
239
+ - [Release notes](https://github.com/actions/setup-python/releases)
240
+ - [Commits](https://github.com/actions/setup-python/compare/v5...v6)
241
+
242
+ ---
243
+ updated-dependencies:
244
+ - dependency-name: actions/setup-python
245
+ dependency-version: '6'
246
+ dependency-type: direct:production
247
+ update-type: version-update:semver-major
248
+ ...
249
+ - Chore(deps): bump twine from 6.1.0 to 6.2.0 in the python-packages
250
+ group. [dependabot[bot]]
251
+
252
+ Bumps the python-packages group with 1 update: [twine](https://github.com/pypa/twine).
253
+
254
+
255
+ Updates `twine` from 6.1.0 to 6.2.0
256
+ - [Release notes](https://github.com/pypa/twine/releases)
257
+ - [Changelog](https://github.com/pypa/twine/blob/main/docs/changelog.rst)
258
+ - [Commits](https://github.com/pypa/twine/compare/6.1.0...6.2.0)
259
+
260
+ ---
261
+ updated-dependencies:
262
+ - dependency-name: twine
263
+ dependency-version: 6.2.0
264
+ dependency-type: direct:production
265
+ update-type: version-update:semver-minor
266
+ dependency-group: python-packages
267
+ ...
268
+ - Chore(deps): bump more-itertools in the python-packages group.
269
+ [dependabot[bot]]
270
+
271
+ Bumps the python-packages group with 1 update: [more-itertools](https://github.com/more-itertools/more-itertools).
272
+
273
+
274
+ Updates `more-itertools` from 10.7.0 to 10.8.0
275
+ - [Release notes](https://github.com/more-itertools/more-itertools/releases)
276
+ - [Commits](https://github.com/more-itertools/more-itertools/compare/v10.7.0...v10.8.0)
277
+
278
+ ---
279
+ updated-dependencies:
280
+ - dependency-name: more-itertools
281
+ dependency-version: 10.8.0
282
+ dependency-type: direct:production
283
+ update-type: version-update:semver-minor
284
+ dependency-group: python-packages
285
+ ...
286
+ - Chore(deps): bump platformdirs in the python-packages group.
287
+ [dependabot[bot]]
288
+
289
+ Bumps the python-packages group with 1 update: [platformdirs](https://github.com/tox-dev/platformdirs).
290
+
291
+
292
+ Updates `platformdirs` from 4.3.8 to 4.4.0
293
+ - [Release notes](https://github.com/tox-dev/platformdirs/releases)
294
+ - [Changelog](https://github.com/tox-dev/platformdirs/blob/main/CHANGES.rst)
295
+ - [Commits](https://github.com/tox-dev/platformdirs/compare/4.3.8...4.4.0)
296
+
297
+ ---
298
+ updated-dependencies:
299
+ - dependency-name: platformdirs
300
+ dependency-version: 4.4.0
301
+ dependency-type: direct:production
302
+ update-type: version-update:semver-minor
303
+ dependency-group: python-packages
304
+ ...
305
+ - Chore(deps): bump actions/checkout from 4 to 5. [dependabot[bot]]
306
+
307
+ Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
308
+ - [Release notes](https://github.com/actions/checkout/releases)
309
+ - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
310
+ - [Commits](https://github.com/actions/checkout/compare/v4...v5)
311
+
312
+ ---
313
+ updated-dependencies:
314
+ - dependency-name: actions/checkout
315
+ dependency-version: '5'
316
+ dependency-type: direct:production
317
+ update-type: version-update:semver-major
318
+ ...
319
+ - Chore(deps): bump requests in the python-packages group.
320
+ [dependabot[bot]]
321
+
322
+ Bumps the python-packages group with 1 update: [requests](https://github.com/psf/requests).
323
+
324
+
325
+ Updates `requests` from 2.32.4 to 2.32.5
326
+ - [Release notes](https://github.com/psf/requests/releases)
327
+ - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
328
+ - [Commits](https://github.com/psf/requests/compare/v2.32.4...v2.32.5)
329
+
330
+ ---
331
+ updated-dependencies:
332
+ - dependency-name: requests
333
+ dependency-version: 2.32.5
334
+ dependency-type: direct:production
335
+ update-type: version-update:semver-patch
336
+ dependency-group: python-packages
337
+ ...
338
+ - Chore: update Dockerfile to use Python 3.12 and improve dependency
339
+ installation. [Mateusz Hajder]
340
+ - Chore(deps): bump the python-packages group with 2 updates.
341
+ [dependabot[bot]]
342
+
343
+ Bumps the python-packages group with 2 updates: [certifi](https://github.com/certifi/python-certifi) and [charset-normalizer](https://github.com/jawah/charset_normalizer).
344
+
345
+
346
+ Updates `certifi` from 2025.7.14 to 2025.8.3
347
+ - [Commits](https://github.com/certifi/python-certifi/compare/2025.07.14...2025.08.03)
348
+
349
+ Updates `charset-normalizer` from 3.4.2 to 3.4.3
350
+ - [Release notes](https://github.com/jawah/charset_normalizer/releases)
351
+ - [Changelog](https://github.com/jawah/charset_normalizer/blob/master/CHANGELOG.md)
352
+ - [Commits](https://github.com/jawah/charset_normalizer/compare/3.4.2...3.4.3)
353
+
354
+ ---
355
+ updated-dependencies:
356
+ - dependency-name: certifi
357
+ dependency-version: 2025.8.3
358
+ dependency-type: direct:production
359
+ update-type: version-update:semver-minor
360
+ dependency-group: python-packages
361
+ - dependency-name: charset-normalizer
362
+ dependency-version: 3.4.3
363
+ dependency-type: direct:production
364
+ update-type: version-update:semver-patch
365
+ dependency-group: python-packages
366
+ ...
367
+
368
+
369
+ 0.50.3 (2025-08-08)
370
+ -------------------
7
371
  - Revert "Add conditional check for git checkout in development path"
8
372
  [Eric Wheeler]
9
373
 
@@ -1,3 +1,33 @@
1
+ Metadata-Version: 2.4
2
+ Name: github-backup
3
+ Version: 0.51.0
4
+ Summary: backup a github user or organization
5
+ Home-page: http://github.com/josegonzalez/python-github-backup
6
+ Author: Jose Diaz-Gonzalez
7
+ Author-email: github-backup@josediazgonzalez.com
8
+ License: MIT
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Topic :: System :: Archiving :: Backup
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Requires-Python: >=3.10
18
+ Description-Content-Type: text/x-rst
19
+ License-File: LICENSE.txt
20
+ Dynamic: author
21
+ Dynamic: author-email
22
+ Dynamic: classifier
23
+ Dynamic: description
24
+ Dynamic: description-content-type
25
+ Dynamic: home-page
26
+ Dynamic: license
27
+ Dynamic: license-file
28
+ Dynamic: requires-python
29
+ Dynamic: summary
30
+
1
31
  =============
2
32
  github-backup
3
33
  =============
@@ -9,8 +39,8 @@ The package can be used to backup an *entire* `Github <https://github.com/>`_ or
9
39
  Requirements
10
40
  ============
11
41
 
42
+ - Python 3.10 or higher
12
43
  - GIT 1.9+
13
- - Python
14
44
 
15
45
  Installation
16
46
  ============
@@ -50,7 +80,7 @@ CLI Help output::
50
80
  [--keychain-name OSX_KEYCHAIN_ITEM_NAME]
51
81
  [--keychain-account OSX_KEYCHAIN_ITEM_ACCOUNT]
52
82
  [--releases] [--latest-releases NUMBER_OF_LATEST_RELEASES]
53
- [--skip-prerelease] [--assets]
83
+ [--skip-prerelease] [--assets] [--attachments]
54
84
  [--exclude [REPOSITORY [REPOSITORY ...]]
55
85
  [--throttle-limit THROTTLE_LIMIT] [--throttle-pause THROTTLE_PAUSE]
56
86
  USER
@@ -133,6 +163,9 @@ CLI Help output::
133
163
  --skip-prerelease skip prerelease and draft versions; only applies if including releases
134
164
  --assets include assets alongside release information; only
135
165
  applies if including releases
166
+ --attachments download user-attachments from issues and pull requests
167
+ to issues/attachments/{issue_number}/ and
168
+ pulls/attachments/{pull_number}/ directories
136
169
  --exclude [REPOSITORY [REPOSITORY ...]]
137
170
  names of repositories to exclude from backup.
138
171
  --throttle-limit THROTTLE_LIMIT
@@ -213,6 +246,29 @@ When you use the ``--lfs`` option, you will need to make sure you have Git LFS i
213
246
  Instructions on how to do this can be found on https://git-lfs.github.com.
214
247
 
215
248
 
249
+ About Attachments
250
+ -----------------
251
+
252
+ When you use the ``--attachments`` option with ``--issues`` or ``--pulls``, the tool will download user-uploaded attachments (images, videos, documents, etc.) from issue and pull request descriptions and comments. In some circumstances attachments contain valuable data related to the topic, and without their backup important information or context might be lost inadvertently.
253
+
254
+ Attachments are saved to ``issues/attachments/{issue_number}/`` and ``pulls/attachments/{pull_number}/`` directories, where ``{issue_number}`` is the GitHub issue number (e.g., issue #123 saves to ``issues/attachments/123/``). Each attachment directory contains:
255
+
256
+ - The downloaded attachment files (named by their GitHub identifier with appropriate file extensions)
257
+ - If multiple attachments have the same filename, conflicts are resolved with numeric suffixes (e.g., ``report.pdf``, ``report_1.pdf``, ``report_2.pdf``)
258
+ - A ``manifest.json`` file documenting all downloads, including URLs, file metadata, and download status
259
+
260
+ The tool automatically extracts file extensions from HTTP headers to ensure files can be more easily opened by your operating system.
261
+
262
+ **Supported URL formats:**
263
+
264
+ - Modern: ``github.com/user-attachments/{assets,files}/*``
265
+ - Legacy: ``user-images.githubusercontent.com/*`` and ``private-user-images.githubusercontent.com/*``
266
+ - Repo files: ``github.com/{owner}/{repo}/files/*`` (filtered to current repository)
267
+ - Repo assets: ``github.com/{owner}/{repo}/assets/*`` (filtered to current repository)
268
+
269
+ **Repository filtering** for repo files/assets handles renamed and transferred repositories gracefully. URLs are included if they either match the current repository name directly, or redirect to it (e.g., ``willmcgugan/rich`` redirects to ``Textualize/rich`` after transfer).
270
+
271
+
216
272
  Run in Docker container
217
273
  -----------------------
218
274
 
@@ -303,7 +359,7 @@ Quietly and incrementally backup useful Github user data (public and private rep
303
359
  export FINE_ACCESS_TOKEN=SOME-GITHUB-TOKEN
304
360
  GH_USER=YOUR-GITHUB-USER
305
361
 
306
- github-backup -f $FINE_ACCESS_TOKEN --prefer-ssh -o ~/github-backup/ -l error -P -i --all-starred --starred --watched --followers --following --issues --issue-comments --issue-events --pulls --pull-comments --pull-commits --labels --milestones --repositories --wikis --releases --assets --pull-details --gists --starred-gists $GH_USER
362
+ github-backup -f $FINE_ACCESS_TOKEN --prefer-ssh -o ~/github-backup/ -l error -P -i --all-starred --starred --watched --followers --following --issues --issue-comments --issue-events --pulls --pull-comments --pull-commits --labels --milestones --repositories --wikis --releases --assets --attachments --pull-details --gists --starred-gists $GH_USER
307
363
 
308
364
  Debug an error/block or incomplete backup into a temporary directory. Omit "incremental" to fill a previous incomplete backup. ::
309
365
 
@@ -1,31 +1,3 @@
1
- Metadata-Version: 2.4
2
- Name: github-backup
3
- Version: 0.50.3
4
- Summary: backup a github user or organization
5
- Home-page: http://github.com/josegonzalez/python-github-backup
6
- Author: Jose Diaz-Gonzalez
7
- Author-email: github-backup@josediazgonzalez.com
8
- License: MIT
9
- Classifier: Development Status :: 5 - Production/Stable
10
- Classifier: Topic :: System :: Archiving :: Backup
11
- Classifier: License :: OSI Approved :: MIT License
12
- Classifier: Programming Language :: Python :: 3.8
13
- Classifier: Programming Language :: Python :: 3.9
14
- Classifier: Programming Language :: Python :: 3.10
15
- Classifier: Programming Language :: Python :: 3.11
16
- Classifier: Programming Language :: Python :: 3.12
17
- Description-Content-Type: text/x-rst
18
- License-File: LICENSE.txt
19
- Dynamic: author
20
- Dynamic: author-email
21
- Dynamic: classifier
22
- Dynamic: description
23
- Dynamic: description-content-type
24
- Dynamic: home-page
25
- Dynamic: license
26
- Dynamic: license-file
27
- Dynamic: summary
28
-
29
1
  =============
30
2
  github-backup
31
3
  =============
@@ -37,8 +9,8 @@ The package can be used to backup an *entire* `Github <https://github.com/>`_ or
37
9
  Requirements
38
10
  ============
39
11
 
12
+ - Python 3.10 or higher
40
13
  - GIT 1.9+
41
- - Python
42
14
 
43
15
  Installation
44
16
  ============
@@ -78,7 +50,7 @@ CLI Help output::
78
50
  [--keychain-name OSX_KEYCHAIN_ITEM_NAME]
79
51
  [--keychain-account OSX_KEYCHAIN_ITEM_ACCOUNT]
80
52
  [--releases] [--latest-releases NUMBER_OF_LATEST_RELEASES]
81
- [--skip-prerelease] [--assets]
53
+ [--skip-prerelease] [--assets] [--attachments]
82
54
  [--exclude [REPOSITORY [REPOSITORY ...]]
83
55
  [--throttle-limit THROTTLE_LIMIT] [--throttle-pause THROTTLE_PAUSE]
84
56
  USER
@@ -161,6 +133,9 @@ CLI Help output::
161
133
  --skip-prerelease skip prerelease and draft versions; only applies if including releases
162
134
  --assets include assets alongside release information; only
163
135
  applies if including releases
136
+ --attachments download user-attachments from issues and pull requests
137
+ to issues/attachments/{issue_number}/ and
138
+ pulls/attachments/{pull_number}/ directories
164
139
  --exclude [REPOSITORY [REPOSITORY ...]]
165
140
  names of repositories to exclude from backup.
166
141
  --throttle-limit THROTTLE_LIMIT
@@ -241,6 +216,29 @@ When you use the ``--lfs`` option, you will need to make sure you have Git LFS i
241
216
  Instructions on how to do this can be found on https://git-lfs.github.com.
242
217
 
243
218
 
219
+ About Attachments
220
+ -----------------
221
+
222
+ When you use the ``--attachments`` option with ``--issues`` or ``--pulls``, the tool will download user-uploaded attachments (images, videos, documents, etc.) from issue and pull request descriptions and comments. In some circumstances attachments contain valuable data related to the topic, and without their backup important information or context might be lost inadvertently.
223
+
224
+ Attachments are saved to ``issues/attachments/{issue_number}/`` and ``pulls/attachments/{pull_number}/`` directories, where ``{issue_number}`` is the GitHub issue number (e.g., issue #123 saves to ``issues/attachments/123/``). Each attachment directory contains:
225
+
226
+ - The downloaded attachment files (named by their GitHub identifier with appropriate file extensions)
227
+ - If multiple attachments have the same filename, conflicts are resolved with numeric suffixes (e.g., ``report.pdf``, ``report_1.pdf``, ``report_2.pdf``)
228
+ - A ``manifest.json`` file documenting all downloads, including URLs, file metadata, and download status
229
+
230
+ The tool automatically extracts file extensions from HTTP headers to ensure files can be more easily opened by your operating system.
231
+
232
+ **Supported URL formats:**
233
+
234
+ - Modern: ``github.com/user-attachments/{assets,files}/*``
235
+ - Legacy: ``user-images.githubusercontent.com/*`` and ``private-user-images.githubusercontent.com/*``
236
+ - Repo files: ``github.com/{owner}/{repo}/files/*`` (filtered to current repository)
237
+ - Repo assets: ``github.com/{owner}/{repo}/assets/*`` (filtered to current repository)
238
+
239
+ **Repository filtering** for repo files/assets handles renamed and transferred repositories gracefully. URLs are included if they either match the current repository name directly, or redirect to it (e.g., ``willmcgugan/rich`` redirects to ``Textualize/rich`` after transfer).
240
+
241
+
244
242
  Run in Docker container
245
243
  -----------------------
246
244
 
@@ -331,7 +329,7 @@ Quietly and incrementally backup useful Github user data (public and private rep
331
329
  export FINE_ACCESS_TOKEN=SOME-GITHUB-TOKEN
332
330
  GH_USER=YOUR-GITHUB-USER
333
331
 
334
- github-backup -f $FINE_ACCESS_TOKEN --prefer-ssh -o ~/github-backup/ -l error -P -i --all-starred --starred --watched --followers --following --issues --issue-comments --issue-events --pulls --pull-comments --pull-commits --labels --milestones --repositories --wikis --releases --assets --pull-details --gists --starred-gists $GH_USER
332
+ github-backup -f $FINE_ACCESS_TOKEN --prefer-ssh -o ~/github-backup/ -l error -P -i --all-starred --starred --watched --followers --following --issues --issue-comments --issue-events --pulls --pull-comments --pull-commits --labels --milestones --repositories --wikis --releases --assets --attachments --pull-details --gists --starred-gists $GH_USER
335
333
 
336
334
  Debug an error/block or incomplete backup into a temporary directory. Omit "incremental" to fill a previous incomplete backup. ::
337
335
 
@@ -1,31 +1,3 @@
1
- Metadata-Version: 2.4
2
- Name: github-backup
3
- Version: 0.50.3
4
- Summary: backup a github user or organization
5
- Home-page: http://github.com/josegonzalez/python-github-backup
6
- Author: Jose Diaz-Gonzalez
7
- Author-email: github-backup@josediazgonzalez.com
8
- License: MIT
9
- Classifier: Development Status :: 5 - Production/Stable
10
- Classifier: Topic :: System :: Archiving :: Backup
11
- Classifier: License :: OSI Approved :: MIT License
12
- Classifier: Programming Language :: Python :: 3.8
13
- Classifier: Programming Language :: Python :: 3.9
14
- Classifier: Programming Language :: Python :: 3.10
15
- Classifier: Programming Language :: Python :: 3.11
16
- Classifier: Programming Language :: Python :: 3.12
17
- Description-Content-Type: text/x-rst
18
- License-File: LICENSE.txt
19
- Dynamic: author
20
- Dynamic: author-email
21
- Dynamic: classifier
22
- Dynamic: description
23
- Dynamic: description-content-type
24
- Dynamic: home-page
25
- Dynamic: license
26
- Dynamic: license-file
27
- Dynamic: summary
28
-
29
1
  =============
30
2
  github-backup
31
3
  =============
@@ -37,8 +9,8 @@ The package can be used to backup an *entire* `Github <https://github.com/>`_ or
37
9
  Requirements
38
10
  ============
39
11
 
12
+ - Python 3.10 or higher
40
13
  - GIT 1.9+
41
- - Python
42
14
 
43
15
  Installation
44
16
  ============
@@ -78,7 +50,7 @@ CLI Help output::
78
50
  [--keychain-name OSX_KEYCHAIN_ITEM_NAME]
79
51
  [--keychain-account OSX_KEYCHAIN_ITEM_ACCOUNT]
80
52
  [--releases] [--latest-releases NUMBER_OF_LATEST_RELEASES]
81
- [--skip-prerelease] [--assets]
53
+ [--skip-prerelease] [--assets] [--attachments]
82
54
  [--exclude [REPOSITORY [REPOSITORY ...]]
83
55
  [--throttle-limit THROTTLE_LIMIT] [--throttle-pause THROTTLE_PAUSE]
84
56
  USER
@@ -161,6 +133,9 @@ CLI Help output::
161
133
  --skip-prerelease skip prerelease and draft versions; only applies if including releases
162
134
  --assets include assets alongside release information; only
163
135
  applies if including releases
136
+ --attachments download user-attachments from issues and pull requests
137
+ to issues/attachments/{issue_number}/ and
138
+ pulls/attachments/{pull_number}/ directories
164
139
  --exclude [REPOSITORY [REPOSITORY ...]]
165
140
  names of repositories to exclude from backup.
166
141
  --throttle-limit THROTTLE_LIMIT
@@ -241,6 +216,29 @@ When you use the ``--lfs`` option, you will need to make sure you have Git LFS i
241
216
  Instructions on how to do this can be found on https://git-lfs.github.com.
242
217
 
243
218
 
219
+ About Attachments
220
+ -----------------
221
+
222
+ When you use the ``--attachments`` option with ``--issues`` or ``--pulls``, the tool will download user-uploaded attachments (images, videos, documents, etc.) from issue and pull request descriptions and comments. In some circumstances attachments contain valuable data related to the topic, and without their backup important information or context might be lost inadvertently.
223
+
224
+ Attachments are saved to ``issues/attachments/{issue_number}/`` and ``pulls/attachments/{pull_number}/`` directories, where ``{issue_number}`` is the GitHub issue number (e.g., issue #123 saves to ``issues/attachments/123/``). Each attachment directory contains:
225
+
226
+ - The downloaded attachment files (named by their GitHub identifier with appropriate file extensions)
227
+ - If multiple attachments have the same filename, conflicts are resolved with numeric suffixes (e.g., ``report.pdf``, ``report_1.pdf``, ``report_2.pdf``)
228
+ - A ``manifest.json`` file documenting all downloads, including URLs, file metadata, and download status
229
+
230
+ The tool automatically extracts file extensions from HTTP headers to ensure files can be more easily opened by your operating system.
231
+
232
+ **Supported URL formats:**
233
+
234
+ - Modern: ``github.com/user-attachments/{assets,files}/*``
235
+ - Legacy: ``user-images.githubusercontent.com/*`` and ``private-user-images.githubusercontent.com/*``
236
+ - Repo files: ``github.com/{owner}/{repo}/files/*`` (filtered to current repository)
237
+ - Repo assets: ``github.com/{owner}/{repo}/assets/*`` (filtered to current repository)
238
+
239
+ **Repository filtering** for repo files/assets handles renamed and transferred repositories gracefully. URLs are included if they either match the current repository name directly, or redirect to it (e.g., ``willmcgugan/rich`` redirects to ``Textualize/rich`` after transfer).
240
+
241
+
244
242
  Run in Docker container
245
243
  -----------------------
246
244
 
@@ -331,7 +329,7 @@ Quietly and incrementally backup useful Github user data (public and private rep
331
329
  export FINE_ACCESS_TOKEN=SOME-GITHUB-TOKEN
332
330
  GH_USER=YOUR-GITHUB-USER
333
331
 
334
- github-backup -f $FINE_ACCESS_TOKEN --prefer-ssh -o ~/github-backup/ -l error -P -i --all-starred --starred --watched --followers --following --issues --issue-comments --issue-events --pulls --pull-comments --pull-commits --labels --milestones --repositories --wikis --releases --assets --pull-details --gists --starred-gists $GH_USER
332
+ github-backup -f $FINE_ACCESS_TOKEN --prefer-ssh -o ~/github-backup/ -l error -P -i --all-starred --starred --watched --followers --following --issues --issue-comments --issue-events --pulls --pull-comments --pull-commits --labels --milestones --repositories --wikis --releases --assets --attachments --pull-details --gists --starred-gists $GH_USER
335
333
 
336
334
  Debug an error/block or incomplete backup into a temporary directory. Omit "incremental" to fill a previous incomplete backup. ::
337
335
 
@@ -0,0 +1 @@
1
+ __version__ = "0.51.0"