githubtakeout 0.1.8__tar.gz → 0.1.9__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.
- {githubtakeout-0.1.8 → githubtakeout-0.1.9}/LICENSE +21 -21
- {githubtakeout-0.1.8/src/githubtakeout.egg-info → githubtakeout-0.1.9}/PKG-INFO +133 -132
- {githubtakeout-0.1.8 → githubtakeout-0.1.9}/README.md +107 -107
- {githubtakeout-0.1.8 → githubtakeout-0.1.9}/pyproject.toml +57 -56
- {githubtakeout-0.1.8 → githubtakeout-0.1.9}/setup.cfg +4 -4
- {githubtakeout-0.1.8 → githubtakeout-0.1.9/src/githubtakeout.egg-info}/PKG-INFO +133 -132
- githubtakeout-0.1.9/src/githubtakeout.egg-info/requires.txt +4 -0
- {githubtakeout-0.1.8 → githubtakeout-0.1.9}/src/githubtakeout.py +278 -270
- {githubtakeout-0.1.8 → githubtakeout-0.1.9}/src/progress.py +73 -73
- githubtakeout-0.1.8/src/githubtakeout.egg-info/requires.txt +0 -3
- {githubtakeout-0.1.8 → githubtakeout-0.1.9}/src/githubtakeout.egg-info/SOURCES.txt +0 -0
- {githubtakeout-0.1.8 → githubtakeout-0.1.9}/src/githubtakeout.egg-info/dependency_links.txt +0 -0
- {githubtakeout-0.1.8 → githubtakeout-0.1.9}/src/githubtakeout.egg-info/entry_points.txt +0 -0
- {githubtakeout-0.1.8 → githubtakeout-0.1.9}/src/githubtakeout.egg-info/top_level.txt +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2015-2025 Corey Goldberg
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015-2025 Corey Goldberg
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,132 +1,133 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: githubtakeout
|
|
3
|
-
Version: 0.1.
|
|
4
|
-
Summary: Archive public Git Repos and Gists from GitHub
|
|
5
|
-
Author: Corey Goldberg
|
|
6
|
-
Maintainer: Corey Goldberg
|
|
7
|
-
License-Expression: MIT
|
|
8
|
-
Project-URL: homepage, https://github.com/cgoldberg/githubtakeout
|
|
9
|
-
Project-URL: source, https://github.com/cgoldberg/githubtakeout
|
|
10
|
-
Project-URL: download, https://pypi.org/project/githubtakeout
|
|
11
|
-
Keywords: git,github,archive,backup,export,takeout
|
|
12
|
-
Classifier: Environment :: Console
|
|
13
|
-
Classifier: Intended Audience :: Developers
|
|
14
|
-
Classifier: Programming Language :: Python
|
|
15
|
-
Classifier: Programming Language :: Python :: 3
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
-
Requires-Python: >=3.12
|
|
19
|
-
Description-Content-Type: text/markdown
|
|
20
|
-
License-File: LICENSE
|
|
21
|
-
Requires-Dist: GitPython==3.1.45
|
|
22
|
-
Requires-Dist: PyGithub==2.
|
|
23
|
-
Requires-Dist: rich==14.1.0
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
|
|
61
|
-
- [
|
|
62
|
-
- [
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
--
|
|
97
|
-
--
|
|
98
|
-
--
|
|
99
|
-
--
|
|
100
|
-
--
|
|
101
|
-
--
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
[github-
|
|
127
|
-
[github-
|
|
128
|
-
[
|
|
129
|
-
[pypi-
|
|
130
|
-
[pypi-
|
|
131
|
-
[pypi-
|
|
132
|
-
[
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: githubtakeout
|
|
3
|
+
Version: 0.1.9
|
|
4
|
+
Summary: Archive public Git Repos and Gists from GitHub
|
|
5
|
+
Author: Corey Goldberg
|
|
6
|
+
Maintainer: Corey Goldberg
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Project-URL: homepage, https://github.com/cgoldberg/githubtakeout
|
|
9
|
+
Project-URL: source, https://github.com/cgoldberg/githubtakeout
|
|
10
|
+
Project-URL: download, https://pypi.org/project/githubtakeout
|
|
11
|
+
Keywords: git,github,archive,backup,export,takeout
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Programming Language :: Python
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Requires-Python: >=3.12
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Requires-Dist: GitPython==3.1.45
|
|
22
|
+
Requires-Dist: PyGithub==2.8.1
|
|
23
|
+
Requires-Dist: rich==14.1.0
|
|
24
|
+
Requires-Dist: tenacity==9.1.2
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
|
|
27
|
+
# githubtakeout
|
|
28
|
+
|
|
29
|
+
## Archive Git Repos and Gists from GitHub
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
- Copyright (c) 2015-2025 [Corey Goldberg][github-home]
|
|
34
|
+
- Development: [GitHub][github-repo]
|
|
35
|
+
- Download/Install: [PyPI][pypi-githubtakeout]
|
|
36
|
+
- License: [MIT][mit-license]
|
|
37
|
+
|
|
38
|
+
----
|
|
39
|
+
|
|
40
|
+
## About:
|
|
41
|
+
|
|
42
|
+
`githubtakeout` is a data export tool for archiving Git repositories hosted on GitHub.
|
|
43
|
+
It clones a user's repos and creates an archive of each.
|
|
44
|
+
|
|
45
|
+
It supports public/private repos and public/secret gists. By default, it doesn't save
|
|
46
|
+
commit history or branches (`.git` directory), or Gist repositories (both can be enabled
|
|
47
|
+
with command line options).
|
|
48
|
+
|
|
49
|
+
When you run the program, archives of your repos will be saved in a directory named
|
|
50
|
+
`backups` inside your current working directory, unless a different location is specified
|
|
51
|
+
using the `--dir` option.
|
|
52
|
+
|
|
53
|
+
Archives are saved in compressed zip format (`.zip`) by default, but can also be saved
|
|
54
|
+
as tarballs (`.tar.gz`) using the `--format=tar` option.
|
|
55
|
+
|
|
56
|
+
## Requirements:
|
|
57
|
+
|
|
58
|
+
- Python 3.12+
|
|
59
|
+
- Git 1.7+
|
|
60
|
+
- Python packages:
|
|
61
|
+
- [GitPython][pypi-gitpython]
|
|
62
|
+
- [PyGithub][pypi-pygithub]
|
|
63
|
+
- [rich][pypi-rich]
|
|
64
|
+
|
|
65
|
+
## Installation:
|
|
66
|
+
|
|
67
|
+
Install from [PyPI][pypyi-githubtakeout]:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
pip install githubtakeout
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Authentication:
|
|
74
|
+
|
|
75
|
+
By default, `githubtakeout` will only retrieve an account's public repos. To access private repos and secret gists,
|
|
76
|
+
you need to authenticate.
|
|
77
|
+
|
|
78
|
+
First, you must create a [personal access token][github-pat] on Github (either a fine-grained or classic personal
|
|
79
|
+
access token). Once you have a token, you can set the `GITHUB_TOKEN` environment variable:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
$ export GITHUB_TOKEN=<access token>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
If you prefer to be prompted for your token each time you run the program, use the `--token` argument.
|
|
86
|
+
|
|
87
|
+
### CLI Options:
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
usage: githubtakeout [-h] [--dir DIR] [--format {tar,zip}] [--gists] [--history] [--list] [--token] username
|
|
91
|
+
|
|
92
|
+
positional arguments:
|
|
93
|
+
username github username
|
|
94
|
+
|
|
95
|
+
options:
|
|
96
|
+
-h, --help show this help message and exit
|
|
97
|
+
--dir DIR output directory (default: ./)
|
|
98
|
+
--format {tar,zip} archive format (default: zip)
|
|
99
|
+
--gists include gists
|
|
100
|
+
--history include commit history and branches (.git directory)
|
|
101
|
+
--list list repos only
|
|
102
|
+
--token prompt for auth token
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Usage Examples:
|
|
106
|
+
|
|
107
|
+
### Install from PyPI with pipx, Run:
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
pipx install githubtakeout
|
|
111
|
+
githubtakeout <github username>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Clone Repo, Create/Activate Virtual Environment, Install from Source, Run:
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
git clone git@github.com:cgoldberg/githubtakeout.git
|
|
118
|
+
cd ./githubtakeout
|
|
119
|
+
python3 -m venv venv
|
|
120
|
+
source venv/bin/activate
|
|
121
|
+
pip install .
|
|
122
|
+
githubtakeout <github username>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
[github-home]: https://github.com/cgoldberg
|
|
127
|
+
[github-repo]: https://github.com/cgoldberg/sudokubot
|
|
128
|
+
[github-pat]: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
|
|
129
|
+
[pypi-githubtakeout]: https://pypi.org/project/githubtakeout
|
|
130
|
+
[pypi-gitpython]: https://pypi.org/project/GitPython
|
|
131
|
+
[pypi-pygithub]: https://pypi.org/project/PyGithub
|
|
132
|
+
[pypi-rich]: https://pypi.org/project/rich
|
|
133
|
+
[mit-license]: https://raw.githubusercontent.com/cgoldberg/githubtakeout/refs/heads/master/LICENSE
|
|
@@ -1,107 +1,107 @@
|
|
|
1
|
-
# githubtakeout
|
|
2
|
-
|
|
3
|
-
## Archive Git Repos and Gists from GitHub
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
- Copyright (c) 2015-2025 [Corey Goldberg][github-home]
|
|
8
|
-
- Development: [GitHub][github-repo]
|
|
9
|
-
- Download/Install: [PyPI][pypi-githubtakeout]
|
|
10
|
-
- License: [MIT][mit-license]
|
|
11
|
-
|
|
12
|
-
----
|
|
13
|
-
|
|
14
|
-
## About:
|
|
15
|
-
|
|
16
|
-
`githubtakeout` is a data export tool for archiving Git repositories hosted on GitHub.
|
|
17
|
-
It clones a user's repos and creates an archive of each.
|
|
18
|
-
|
|
19
|
-
It supports public/private repos and public/secret gists. By default, it doesn't save
|
|
20
|
-
commit history or branches (`.git` directory), or Gist repositories (both can be enabled
|
|
21
|
-
with command line options).
|
|
22
|
-
|
|
23
|
-
When you run the program, archives of your repos will be saved in a directory named
|
|
24
|
-
`backups` inside your current working directory, unless a different location is specified
|
|
25
|
-
using the `--dir` option.
|
|
26
|
-
|
|
27
|
-
Archives are saved in compressed zip format (`.zip`) by default, but can also be saved
|
|
28
|
-
as tarballs (`.tar.gz`) using the `--format=tar` option.
|
|
29
|
-
|
|
30
|
-
## Requirements:
|
|
31
|
-
|
|
32
|
-
- Python 3.12+
|
|
33
|
-
- Git 1.7+
|
|
34
|
-
- Python packages:
|
|
35
|
-
- [GitPython][pypi-gitpython]
|
|
36
|
-
- [PyGithub][pypi-pygithub]
|
|
37
|
-
- [rich][pypi-rich]
|
|
38
|
-
|
|
39
|
-
## Installation:
|
|
40
|
-
|
|
41
|
-
Install from [PyPI][pypyi-githubtakeout]:
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
pip install githubtakeout
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Authentication:
|
|
48
|
-
|
|
49
|
-
By default, `githubtakeout` will only retrieve an account's public repos. To access private repos and secret gists,
|
|
50
|
-
you need to authenticate.
|
|
51
|
-
|
|
52
|
-
First, you must create a [personal access token][github-pat] on Github (either a fine-grained or classic personal
|
|
53
|
-
access token). Once you have a token, you can set the `GITHUB_TOKEN` environment variable:
|
|
54
|
-
|
|
55
|
-
```
|
|
56
|
-
$ export GITHUB_TOKEN=<access token>
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
If you prefer to be prompted for your token each time you run the program, use the `--token` argument.
|
|
60
|
-
|
|
61
|
-
### CLI Options:
|
|
62
|
-
|
|
63
|
-
```
|
|
64
|
-
usage: githubtakeout [-h] [--dir DIR] [--format {tar,zip}] [--gists] [--history] [--list] [--token] username
|
|
65
|
-
|
|
66
|
-
positional arguments:
|
|
67
|
-
username github username
|
|
68
|
-
|
|
69
|
-
options:
|
|
70
|
-
-h, --help show this help message and exit
|
|
71
|
-
--dir DIR output directory (default: ./)
|
|
72
|
-
--format {tar,zip} archive format (default: zip)
|
|
73
|
-
--gists include gists
|
|
74
|
-
--history include commit history and branches (.git directory)
|
|
75
|
-
--list list repos only
|
|
76
|
-
--token prompt for auth token
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
## Usage Examples:
|
|
80
|
-
|
|
81
|
-
### Install from PyPI with pipx, Run:
|
|
82
|
-
|
|
83
|
-
```
|
|
84
|
-
pipx install githubtakeout
|
|
85
|
-
githubtakeout <github username>
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### Clone Repo, Create/Activate Virtual Environment, Install from Source, Run:
|
|
89
|
-
|
|
90
|
-
```
|
|
91
|
-
git clone git@github.com:cgoldberg/githubtakeout.git
|
|
92
|
-
cd ./githubtakeout
|
|
93
|
-
python3 -m venv venv
|
|
94
|
-
source venv/bin/activate
|
|
95
|
-
pip install .
|
|
96
|
-
githubtakeout <github username>
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
[github-home]: https://github.com/cgoldberg
|
|
101
|
-
[github-repo]: https://github.com/cgoldberg/sudokubot
|
|
102
|
-
[github-pat]: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
|
|
103
|
-
[pypi-githubtakeout]: https://pypi.org/project/githubtakeout
|
|
104
|
-
[pypi-gitpython]: https://pypi.org/project/GitPython
|
|
105
|
-
[pypi-pygithub]: https://pypi.org/project/PyGithub
|
|
106
|
-
[pypi-rich]: https://pypi.org/project/rich
|
|
107
|
-
[mit-license]: https://raw.githubusercontent.com/cgoldberg/githubtakeout/refs/heads/master/LICENSE
|
|
1
|
+
# githubtakeout
|
|
2
|
+
|
|
3
|
+
## Archive Git Repos and Gists from GitHub
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
- Copyright (c) 2015-2025 [Corey Goldberg][github-home]
|
|
8
|
+
- Development: [GitHub][github-repo]
|
|
9
|
+
- Download/Install: [PyPI][pypi-githubtakeout]
|
|
10
|
+
- License: [MIT][mit-license]
|
|
11
|
+
|
|
12
|
+
----
|
|
13
|
+
|
|
14
|
+
## About:
|
|
15
|
+
|
|
16
|
+
`githubtakeout` is a data export tool for archiving Git repositories hosted on GitHub.
|
|
17
|
+
It clones a user's repos and creates an archive of each.
|
|
18
|
+
|
|
19
|
+
It supports public/private repos and public/secret gists. By default, it doesn't save
|
|
20
|
+
commit history or branches (`.git` directory), or Gist repositories (both can be enabled
|
|
21
|
+
with command line options).
|
|
22
|
+
|
|
23
|
+
When you run the program, archives of your repos will be saved in a directory named
|
|
24
|
+
`backups` inside your current working directory, unless a different location is specified
|
|
25
|
+
using the `--dir` option.
|
|
26
|
+
|
|
27
|
+
Archives are saved in compressed zip format (`.zip`) by default, but can also be saved
|
|
28
|
+
as tarballs (`.tar.gz`) using the `--format=tar` option.
|
|
29
|
+
|
|
30
|
+
## Requirements:
|
|
31
|
+
|
|
32
|
+
- Python 3.12+
|
|
33
|
+
- Git 1.7+
|
|
34
|
+
- Python packages:
|
|
35
|
+
- [GitPython][pypi-gitpython]
|
|
36
|
+
- [PyGithub][pypi-pygithub]
|
|
37
|
+
- [rich][pypi-rich]
|
|
38
|
+
|
|
39
|
+
## Installation:
|
|
40
|
+
|
|
41
|
+
Install from [PyPI][pypyi-githubtakeout]:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
pip install githubtakeout
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Authentication:
|
|
48
|
+
|
|
49
|
+
By default, `githubtakeout` will only retrieve an account's public repos. To access private repos and secret gists,
|
|
50
|
+
you need to authenticate.
|
|
51
|
+
|
|
52
|
+
First, you must create a [personal access token][github-pat] on Github (either a fine-grained or classic personal
|
|
53
|
+
access token). Once you have a token, you can set the `GITHUB_TOKEN` environment variable:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
$ export GITHUB_TOKEN=<access token>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
If you prefer to be prompted for your token each time you run the program, use the `--token` argument.
|
|
60
|
+
|
|
61
|
+
### CLI Options:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
usage: githubtakeout [-h] [--dir DIR] [--format {tar,zip}] [--gists] [--history] [--list] [--token] username
|
|
65
|
+
|
|
66
|
+
positional arguments:
|
|
67
|
+
username github username
|
|
68
|
+
|
|
69
|
+
options:
|
|
70
|
+
-h, --help show this help message and exit
|
|
71
|
+
--dir DIR output directory (default: ./)
|
|
72
|
+
--format {tar,zip} archive format (default: zip)
|
|
73
|
+
--gists include gists
|
|
74
|
+
--history include commit history and branches (.git directory)
|
|
75
|
+
--list list repos only
|
|
76
|
+
--token prompt for auth token
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Usage Examples:
|
|
80
|
+
|
|
81
|
+
### Install from PyPI with pipx, Run:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
pipx install githubtakeout
|
|
85
|
+
githubtakeout <github username>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Clone Repo, Create/Activate Virtual Environment, Install from Source, Run:
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
git clone git@github.com:cgoldberg/githubtakeout.git
|
|
92
|
+
cd ./githubtakeout
|
|
93
|
+
python3 -m venv venv
|
|
94
|
+
source venv/bin/activate
|
|
95
|
+
pip install .
|
|
96
|
+
githubtakeout <github username>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
[github-home]: https://github.com/cgoldberg
|
|
101
|
+
[github-repo]: https://github.com/cgoldberg/sudokubot
|
|
102
|
+
[github-pat]: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
|
|
103
|
+
[pypi-githubtakeout]: https://pypi.org/project/githubtakeout
|
|
104
|
+
[pypi-gitpython]: https://pypi.org/project/GitPython
|
|
105
|
+
[pypi-pygithub]: https://pypi.org/project/PyGithub
|
|
106
|
+
[pypi-rich]: https://pypi.org/project/rich
|
|
107
|
+
[mit-license]: https://raw.githubusercontent.com/cgoldberg/githubtakeout/refs/heads/master/LICENSE
|
|
@@ -1,56 +1,57 @@
|
|
|
1
|
-
[build-system]
|
|
2
|
-
requires = ["setuptools"]
|
|
3
|
-
build-backend = "setuptools.build_meta"
|
|
4
|
-
|
|
5
|
-
[project]
|
|
6
|
-
name = "githubtakeout"
|
|
7
|
-
version = "0.1.
|
|
8
|
-
description = "Archive public Git Repos and Gists from GitHub"
|
|
9
|
-
license = "MIT"
|
|
10
|
-
license-files = ["LICENSE"]
|
|
11
|
-
authors = [{name = "Corey Goldberg"}]
|
|
12
|
-
maintainers = [{name = "Corey Goldberg"}]
|
|
13
|
-
readme = "README.md"
|
|
14
|
-
requires-python = ">=3.12"
|
|
15
|
-
keywords = ["git", "github", "archive", "backup", "export", "takeout"]
|
|
16
|
-
classifiers = [
|
|
17
|
-
"Environment :: Console",
|
|
18
|
-
"Intended Audience :: Developers",
|
|
19
|
-
"Programming Language :: Python",
|
|
20
|
-
"Programming Language :: Python :: 3",
|
|
21
|
-
"Programming Language :: Python :: 3.12",
|
|
22
|
-
"Programming Language :: Python :: 3.13",
|
|
23
|
-
]
|
|
24
|
-
dependencies = [
|
|
25
|
-
"GitPython==3.1.45",
|
|
26
|
-
"PyGithub==2.
|
|
27
|
-
"rich==14.1.0",
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
docstring-code-
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "githubtakeout"
|
|
7
|
+
version = "0.1.9"
|
|
8
|
+
description = "Archive public Git Repos and Gists from GitHub"
|
|
9
|
+
license = "MIT"
|
|
10
|
+
license-files = ["LICENSE"]
|
|
11
|
+
authors = [{name = "Corey Goldberg"}]
|
|
12
|
+
maintainers = [{name = "Corey Goldberg"}]
|
|
13
|
+
readme = "README.md"
|
|
14
|
+
requires-python = ">=3.12"
|
|
15
|
+
keywords = ["git", "github", "archive", "backup", "export", "takeout"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Environment :: Console",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"Programming Language :: Python",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Programming Language :: Python :: 3.12",
|
|
22
|
+
"Programming Language :: Python :: 3.13",
|
|
23
|
+
]
|
|
24
|
+
dependencies = [
|
|
25
|
+
"GitPython==3.1.45",
|
|
26
|
+
"PyGithub==2.8.1",
|
|
27
|
+
"rich==14.1.0",
|
|
28
|
+
"tenacity==9.1.2",
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
[project.scripts]
|
|
32
|
+
githubtakeout = "githubtakeout:main"
|
|
33
|
+
|
|
34
|
+
[project.urls]
|
|
35
|
+
homepage = "https://github.com/cgoldberg/githubtakeout"
|
|
36
|
+
source = "https://github.com/cgoldberg/githubtakeout"
|
|
37
|
+
download = "https://pypi.org/project/githubtakeout"
|
|
38
|
+
|
|
39
|
+
[tool.setuptools]
|
|
40
|
+
package-dir = {"" = "src"}
|
|
41
|
+
|
|
42
|
+
[tool.black]
|
|
43
|
+
line-length = 88
|
|
44
|
+
target-version = ["py39", "py310", "py311", "py312", "py313"]
|
|
45
|
+
|
|
46
|
+
[tool.ruff]
|
|
47
|
+
line-length = 88
|
|
48
|
+
respect-gitignore = true
|
|
49
|
+
target-version = "py312"
|
|
50
|
+
|
|
51
|
+
[tool.ruff.lint]
|
|
52
|
+
extend-select = ["E4", "E7", "E9", "F", "I", "E501", "RUF022"]
|
|
53
|
+
fixable = ["ALL"]
|
|
54
|
+
|
|
55
|
+
[tool.ruff.format]
|
|
56
|
+
docstring-code-format = true
|
|
57
|
+
docstring-code-line-length = 88
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[egg_info]
|
|
2
|
-
tag_build =
|
|
3
|
-
tag_date = 0
|
|
4
|
-
|
|
1
|
+
[egg_info]
|
|
2
|
+
tag_build =
|
|
3
|
+
tag_date = 0
|
|
4
|
+
|