gites 0.1.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.
- gites-0.1.0/LICENSE +21 -0
- gites-0.1.0/PKG-INFO +207 -0
- gites-0.1.0/README.md +192 -0
- gites-0.1.0/gites.egg-info/PKG-INFO +207 -0
- gites-0.1.0/gites.egg-info/SOURCES.txt +7 -0
- gites-0.1.0/gites.egg-info/dependency_links.txt +1 -0
- gites-0.1.0/gites.egg-info/top_level.txt +1 -0
- gites-0.1.0/setup.cfg +4 -0
- gites-0.1.0/setup.py +21 -0
gites-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Pak Kin LAU
|
|
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.
|
gites-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: gites
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: gites is the home of all developers. It provides bulk clone, bulk push, bulk pull etc. Contact me with my discord ID: pakkin.lau
|
|
5
|
+
Home-page: https://github.com/pakkinlau/gites
|
|
6
|
+
Author: Pak Kin LAU
|
|
7
|
+
Author-email: kinlau529@gmail.com
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
|
|
16
|
+
# Package: gites
|
|
17
|
+
|
|
18
|
+

|
|
19
|
+
Image: The photos of "gites".
|
|
20
|
+
|
|
21
|
+
While I am personally use github as a cloud drive to sync and maintain a lot of personal repos. I found the process of typing git command everyday is very repetitive. And such workflow should be streamlined into a single click.
|
|
22
|
+
|
|
23
|
+
The goal of this package is to mimic the user experience of using a google drive or one drive. This package tries to memorize your github repo names and their link and record it into a single document, and also the commands are streamlined to be one-clicked. In such way, it save your time on synchronzing the packages when developing your projects.
|
|
24
|
+
|
|
25
|
+
## Solutions comparison:
|
|
26
|
+
|
|
27
|
+
Compare with `gitpython`:
|
|
28
|
+
|
|
29
|
+
| Feature / Capability | This Package | gitpython Library |
|
|
30
|
+
|---------------------------------|---------------------------|---------------------------|
|
|
31
|
+
| Manage JSON file | ✔️ Custom JSON handling | ❌ JSON handling only |
|
|
32
|
+
| Create Git repositories | ✔️ | ✔️ |
|
|
33
|
+
| Commit changes | ✔️ | ✔️ |
|
|
34
|
+
| Push changes to remote | ✔️ | ✔️ |
|
|
35
|
+
| Pull changes from remote | ❌ (Not mentioned) | ✔️ |
|
|
36
|
+
| Sync with one click | ✔️ Custom implementation | ❌ (Not mentioned) |
|
|
37
|
+
| Subprocess management | ✔️ | ❌ |
|
|
38
|
+
| Pre-commit hooks | ✔️ Custom implementation | ❌ |
|
|
39
|
+
| Custom timing functionality | ✔️ | ❌ |
|
|
40
|
+
| Comprehensive error handling | ✔️ | ✔️ |
|
|
41
|
+
| JSON configuration options | ✔️ Custom implementation | ❌ |
|
|
42
|
+
| Flexibility for expansion | ✔️ | ✔️ |
|
|
43
|
+
| Popularity and community support| ❌ (Not mentioned) | ✔️ Well-established |
|
|
44
|
+
| |
|
|
45
|
+
|
|
46
|
+
Compare with `vscode source control`:
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
| Feature | This Package | VS Code Source Control |
|
|
50
|
+
|---------------------|----------------------|------------------------|
|
|
51
|
+
| JSON Management | ✔️ | ❌ |
|
|
52
|
+
| One-Click Sync | ✔️ | ✔️ |
|
|
53
|
+
| Git Integration | ✔️ | ✔️ |
|
|
54
|
+
| Commit Management | ✔️ | ✔️ |
|
|
55
|
+
| Branch Management | ✔️ | ✔️ |
|
|
56
|
+
| Diff Viewer | ✔️ | ✔️ |
|
|
57
|
+
| History Tracking | ✔️ | ✔️ |
|
|
58
|
+
| Conflict Resolution| ✔️ | ✔️ |
|
|
59
|
+
| User-Friendly UI | ✔️ | ✔️ |
|
|
60
|
+
| Customization | ✔️ | ✔️ |
|
|
61
|
+
| Remote Repo Support | ✔️ | ✔️ |
|
|
62
|
+
| Real-time Updates | ❌ | ✔️ |
|
|
63
|
+
| Collaboration | ❌ | ✔️ |
|
|
64
|
+
| Performance | Depends on Implem. | ✔️ |
|
|
65
|
+
|
|
66
|
+
(Note: We will add real-time update, progress tracking bar to the package in the future to make the package to be more competitive)
|
|
67
|
+
|
|
68
|
+
## Functionalities of the package:
|
|
69
|
+
|
|
70
|
+
- JSON data store:
|
|
71
|
+
- Memorize what are the repos that you owns and their remote link. You are save it in a particular location and clone all your repos all at once with that JSON as a memory.
|
|
72
|
+
>>
|
|
73
|
+
- Bulkclone:
|
|
74
|
+
- Users could clone a list of repos from their json file, which mimic the download actions of using a cloud storage
|
|
75
|
+
>>
|
|
76
|
+
- Bulkfetch/pull:
|
|
77
|
+
- We will build it later.
|
|
78
|
+
>>
|
|
79
|
+
- Auto-large-file-management:
|
|
80
|
+
- Very often, we might incidently include large size file in our commit, it would stucks the commit-push process. and The package would provide a set of hooks on each of your repos, which provide versatile ability of handling file size error. If there is any large size file detected, that file would be shown in the summary window.
|
|
81
|
+
>>
|
|
82
|
+
- Auto-large-file-packing-and-push:
|
|
83
|
+
- If there are large files, our package also included a functionality that providing hooks to all repos. Implementing the pre-commit hook to prevent files larger than 100MB from being committed. This feature ensures that large and unnecessary files do not clutter your repository and slow down your Git workflow.
|
|
84
|
+
>>
|
|
85
|
+
- Bulk-push:
|
|
86
|
+
- Once you have specified the root folder, that root folder can be considered as your own google drive. You can just sync all the changes with ease, by one click.
|
|
87
|
+
>>
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
## The journey of auto-packing your repository
|
|
91
|
+
|
|
92
|
+
### Step 1 (optional): Setup the default location of the `gites-config.json` file
|
|
93
|
+
- `gites-config.json` would keep up all the records required to execute the gitflow commands. If you put it inside this package, as you upgrade the package, your data would lose.
|
|
94
|
+
- You should locate this datastore file on another repo folder. So the datastore file would also included in the sync process.
|
|
95
|
+
- If you don't do this step, the `gites-config.json` will be located in `home/pgf-package/gites-config.json`
|
|
96
|
+
|
|
97
|
+
### Step 2a (necessary): Specify the root folder location
|
|
98
|
+
- All the progress will be done around the root folder. This information will be stored in the json.
|
|
99
|
+
- You might do it this way:
|
|
100
|
+
|
|
101
|
+
```python
|
|
102
|
+
abc.update_root_into('.....')
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Step 2b (optional): Initialize the `gites-config.json` file
|
|
106
|
+
- When cloning, you need to provide both the folder name, and the remote repo link for each repo.
|
|
107
|
+
- If you don't do that, the package will create an empty package for you in other actions if it cannot find the json in that location.
|
|
108
|
+
- If that is your first time using this package, you should follow these step to update your datastore json:
|
|
109
|
+
|
|
110
|
+
```python
|
|
111
|
+
# Testing unit:
|
|
112
|
+
if __name__ == "__main__":
|
|
113
|
+
|
|
114
|
+
root_directory = os.path.join(os.path.expanduser("~"), "All_Github_Repos")
|
|
115
|
+
list_of_repo = {
|
|
116
|
+
# "Git management": "https://github.com/pakkinlau/your-repo.git", # A repo should not clone itself.
|
|
117
|
+
"Guides": "https://github.com/pakkinlau/guides.git",
|
|
118
|
+
"Textual notes": "https://github.com/pakkinlau/textual-notes.git",
|
|
119
|
+
"Tutorial template": "https://github.com/pakkinlau/tutorial-template.git",
|
|
120
|
+
"Video materials": "https://github.com/pakkinlau/video-materials.git",
|
|
121
|
+
"JS webpage coding gym": "https://github.com/pakkinlau/js-webpage-coding-gym.git",
|
|
122
|
+
"Python coding gym": "https://github.com/pakkinlau/python-coding-gym.git",
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
# Determine the path to the JSON file in the same directory as the script
|
|
126
|
+
json_file_path = default_json_path
|
|
127
|
+
|
|
128
|
+
# test json writing + updating
|
|
129
|
+
update_repo_info(list_of_repo)
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
And the resulting json datastore would be like this:
|
|
133
|
+
```json
|
|
134
|
+
{
|
|
135
|
+
"repositories": [
|
|
136
|
+
{
|
|
137
|
+
"name": "Guides",
|
|
138
|
+
"remote_url": "https://github.com/pakkinlau/guides.git"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"name": "Textual notes",
|
|
142
|
+
"remote_url": "https://github.com/pakkinlau/textual-notes.git"
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
"root_directory": "/home/kin/All_Github_Repos"
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Step 3 (optional): Bulk clone all repos from remote
|
|
150
|
+
- With the datastore json, you can start clone all of your repos from remote.
|
|
151
|
+
- After processing, a summary of updated/no-effect/failed repos list will be displayed.
|
|
152
|
+
|
|
153
|
+
### Step 4 (optional): Bulk fetch-pull all of your repos
|
|
154
|
+
- This function is still working in progress.
|
|
155
|
+
- With that, you can look at the updates of all repos in one-clik.
|
|
156
|
+
- After processing, a summary of updated/no-effect/failed repos list will be displayed.
|
|
157
|
+
|
|
158
|
+
### Step 5 (optional): Bulk push all of your repos
|
|
159
|
+
- The package would search all the repos in the root folder that you have specified. And try to execute commit-push for each repos.
|
|
160
|
+
|
|
161
|
+
The successful push will give you back this summary message:
|
|
162
|
+

|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
## Terminal operations:
|
|
166
|
+
|
|
167
|
+
- Installation of the package
|
|
168
|
+
```bash
|
|
169
|
+
pip install autogit
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
- Ensuring your terminal has already logged in your github account:
|
|
173
|
+
```bash
|
|
174
|
+
git abcdefg
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
- Bulk push for all repos in the root folder you specified location:
|
|
178
|
+
```bash
|
|
179
|
+
abc bulk push
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
- Setup the `gites-config.json` within terminal:
|
|
183
|
+
```bash
|
|
184
|
+
agit init
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
## Future development
|
|
189
|
+
|
|
190
|
+
1. Consider varying needs from the diversity of potential users. Adding / editing the package to provide more methods.
|
|
191
|
+
Such as:
|
|
192
|
+
- Renaming a repo. `RenameManager()`
|
|
193
|
+
- Hard resolve conflicts for a repo (one-side overwrite): When remote and local is not consistent. Delete either one and then overwrite.
|
|
194
|
+
|
|
195
|
+
2. Documentation: Use sphinx and readthedoc to produce an effective documentation to the user. Highlight, screenshot the features of the package as an image, or a video.
|
|
196
|
+
|
|
197
|
+
3. Improves the work summary message output from the package.
|
|
198
|
+
|
|
199
|
+
## Contributing
|
|
200
|
+
|
|
201
|
+
Contributions to this repository are highly encouraged! If you have ideas for improvements, additional functionalities, or bug fixes, feel free to open an issue or submit a pull request. Let's collaborate to make Git management even more powerful and user-friendly.
|
|
202
|
+
|
|
203
|
+
## License
|
|
204
|
+
|
|
205
|
+
This repository is open-source and available under the [MIT License](LICENSE). You are welcome to use, modify, and distribute the code as per the terms of the license.
|
|
206
|
+
|
|
207
|
+
Enjoy using the Git-management package! 🚀
|
gites-0.1.0/README.md
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# Package: gites
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
Image: The photos of "gites".
|
|
5
|
+
|
|
6
|
+
While I am personally use github as a cloud drive to sync and maintain a lot of personal repos. I found the process of typing git command everyday is very repetitive. And such workflow should be streamlined into a single click.
|
|
7
|
+
|
|
8
|
+
The goal of this package is to mimic the user experience of using a google drive or one drive. This package tries to memorize your github repo names and their link and record it into a single document, and also the commands are streamlined to be one-clicked. In such way, it save your time on synchronzing the packages when developing your projects.
|
|
9
|
+
|
|
10
|
+
## Solutions comparison:
|
|
11
|
+
|
|
12
|
+
Compare with `gitpython`:
|
|
13
|
+
|
|
14
|
+
| Feature / Capability | This Package | gitpython Library |
|
|
15
|
+
|---------------------------------|---------------------------|---------------------------|
|
|
16
|
+
| Manage JSON file | ✔️ Custom JSON handling | ❌ JSON handling only |
|
|
17
|
+
| Create Git repositories | ✔️ | ✔️ |
|
|
18
|
+
| Commit changes | ✔️ | ✔️ |
|
|
19
|
+
| Push changes to remote | ✔️ | ✔️ |
|
|
20
|
+
| Pull changes from remote | ❌ (Not mentioned) | ✔️ |
|
|
21
|
+
| Sync with one click | ✔️ Custom implementation | ❌ (Not mentioned) |
|
|
22
|
+
| Subprocess management | ✔️ | ❌ |
|
|
23
|
+
| Pre-commit hooks | ✔️ Custom implementation | ❌ |
|
|
24
|
+
| Custom timing functionality | ✔️ | ❌ |
|
|
25
|
+
| Comprehensive error handling | ✔️ | ✔️ |
|
|
26
|
+
| JSON configuration options | ✔️ Custom implementation | ❌ |
|
|
27
|
+
| Flexibility for expansion | ✔️ | ✔️ |
|
|
28
|
+
| Popularity and community support| ❌ (Not mentioned) | ✔️ Well-established |
|
|
29
|
+
| |
|
|
30
|
+
|
|
31
|
+
Compare with `vscode source control`:
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
| Feature | This Package | VS Code Source Control |
|
|
35
|
+
|---------------------|----------------------|------------------------|
|
|
36
|
+
| JSON Management | ✔️ | ❌ |
|
|
37
|
+
| One-Click Sync | ✔️ | ✔️ |
|
|
38
|
+
| Git Integration | ✔️ | ✔️ |
|
|
39
|
+
| Commit Management | ✔️ | ✔️ |
|
|
40
|
+
| Branch Management | ✔️ | ✔️ |
|
|
41
|
+
| Diff Viewer | ✔️ | ✔️ |
|
|
42
|
+
| History Tracking | ✔️ | ✔️ |
|
|
43
|
+
| Conflict Resolution| ✔️ | ✔️ |
|
|
44
|
+
| User-Friendly UI | ✔️ | ✔️ |
|
|
45
|
+
| Customization | ✔️ | ✔️ |
|
|
46
|
+
| Remote Repo Support | ✔️ | ✔️ |
|
|
47
|
+
| Real-time Updates | ❌ | ✔️ |
|
|
48
|
+
| Collaboration | ❌ | ✔️ |
|
|
49
|
+
| Performance | Depends on Implem. | ✔️ |
|
|
50
|
+
|
|
51
|
+
(Note: We will add real-time update, progress tracking bar to the package in the future to make the package to be more competitive)
|
|
52
|
+
|
|
53
|
+
## Functionalities of the package:
|
|
54
|
+
|
|
55
|
+
- JSON data store:
|
|
56
|
+
- Memorize what are the repos that you owns and their remote link. You are save it in a particular location and clone all your repos all at once with that JSON as a memory.
|
|
57
|
+
>>
|
|
58
|
+
- Bulkclone:
|
|
59
|
+
- Users could clone a list of repos from their json file, which mimic the download actions of using a cloud storage
|
|
60
|
+
>>
|
|
61
|
+
- Bulkfetch/pull:
|
|
62
|
+
- We will build it later.
|
|
63
|
+
>>
|
|
64
|
+
- Auto-large-file-management:
|
|
65
|
+
- Very often, we might incidently include large size file in our commit, it would stucks the commit-push process. and The package would provide a set of hooks on each of your repos, which provide versatile ability of handling file size error. If there is any large size file detected, that file would be shown in the summary window.
|
|
66
|
+
>>
|
|
67
|
+
- Auto-large-file-packing-and-push:
|
|
68
|
+
- If there are large files, our package also included a functionality that providing hooks to all repos. Implementing the pre-commit hook to prevent files larger than 100MB from being committed. This feature ensures that large and unnecessary files do not clutter your repository and slow down your Git workflow.
|
|
69
|
+
>>
|
|
70
|
+
- Bulk-push:
|
|
71
|
+
- Once you have specified the root folder, that root folder can be considered as your own google drive. You can just sync all the changes with ease, by one click.
|
|
72
|
+
>>
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
## The journey of auto-packing your repository
|
|
76
|
+
|
|
77
|
+
### Step 1 (optional): Setup the default location of the `gites-config.json` file
|
|
78
|
+
- `gites-config.json` would keep up all the records required to execute the gitflow commands. If you put it inside this package, as you upgrade the package, your data would lose.
|
|
79
|
+
- You should locate this datastore file on another repo folder. So the datastore file would also included in the sync process.
|
|
80
|
+
- If you don't do this step, the `gites-config.json` will be located in `home/pgf-package/gites-config.json`
|
|
81
|
+
|
|
82
|
+
### Step 2a (necessary): Specify the root folder location
|
|
83
|
+
- All the progress will be done around the root folder. This information will be stored in the json.
|
|
84
|
+
- You might do it this way:
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
abc.update_root_into('.....')
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Step 2b (optional): Initialize the `gites-config.json` file
|
|
91
|
+
- When cloning, you need to provide both the folder name, and the remote repo link for each repo.
|
|
92
|
+
- If you don't do that, the package will create an empty package for you in other actions if it cannot find the json in that location.
|
|
93
|
+
- If that is your first time using this package, you should follow these step to update your datastore json:
|
|
94
|
+
|
|
95
|
+
```python
|
|
96
|
+
# Testing unit:
|
|
97
|
+
if __name__ == "__main__":
|
|
98
|
+
|
|
99
|
+
root_directory = os.path.join(os.path.expanduser("~"), "All_Github_Repos")
|
|
100
|
+
list_of_repo = {
|
|
101
|
+
# "Git management": "https://github.com/pakkinlau/your-repo.git", # A repo should not clone itself.
|
|
102
|
+
"Guides": "https://github.com/pakkinlau/guides.git",
|
|
103
|
+
"Textual notes": "https://github.com/pakkinlau/textual-notes.git",
|
|
104
|
+
"Tutorial template": "https://github.com/pakkinlau/tutorial-template.git",
|
|
105
|
+
"Video materials": "https://github.com/pakkinlau/video-materials.git",
|
|
106
|
+
"JS webpage coding gym": "https://github.com/pakkinlau/js-webpage-coding-gym.git",
|
|
107
|
+
"Python coding gym": "https://github.com/pakkinlau/python-coding-gym.git",
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
# Determine the path to the JSON file in the same directory as the script
|
|
111
|
+
json_file_path = default_json_path
|
|
112
|
+
|
|
113
|
+
# test json writing + updating
|
|
114
|
+
update_repo_info(list_of_repo)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
And the resulting json datastore would be like this:
|
|
118
|
+
```json
|
|
119
|
+
{
|
|
120
|
+
"repositories": [
|
|
121
|
+
{
|
|
122
|
+
"name": "Guides",
|
|
123
|
+
"remote_url": "https://github.com/pakkinlau/guides.git"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "Textual notes",
|
|
127
|
+
"remote_url": "https://github.com/pakkinlau/textual-notes.git"
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
"root_directory": "/home/kin/All_Github_Repos"
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Step 3 (optional): Bulk clone all repos from remote
|
|
135
|
+
- With the datastore json, you can start clone all of your repos from remote.
|
|
136
|
+
- After processing, a summary of updated/no-effect/failed repos list will be displayed.
|
|
137
|
+
|
|
138
|
+
### Step 4 (optional): Bulk fetch-pull all of your repos
|
|
139
|
+
- This function is still working in progress.
|
|
140
|
+
- With that, you can look at the updates of all repos in one-clik.
|
|
141
|
+
- After processing, a summary of updated/no-effect/failed repos list will be displayed.
|
|
142
|
+
|
|
143
|
+
### Step 5 (optional): Bulk push all of your repos
|
|
144
|
+
- The package would search all the repos in the root folder that you have specified. And try to execute commit-push for each repos.
|
|
145
|
+
|
|
146
|
+
The successful push will give you back this summary message:
|
|
147
|
+

|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
## Terminal operations:
|
|
151
|
+
|
|
152
|
+
- Installation of the package
|
|
153
|
+
```bash
|
|
154
|
+
pip install autogit
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
- Ensuring your terminal has already logged in your github account:
|
|
158
|
+
```bash
|
|
159
|
+
git abcdefg
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
- Bulk push for all repos in the root folder you specified location:
|
|
163
|
+
```bash
|
|
164
|
+
abc bulk push
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
- Setup the `gites-config.json` within terminal:
|
|
168
|
+
```bash
|
|
169
|
+
agit init
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
## Future development
|
|
174
|
+
|
|
175
|
+
1. Consider varying needs from the diversity of potential users. Adding / editing the package to provide more methods.
|
|
176
|
+
Such as:
|
|
177
|
+
- Renaming a repo. `RenameManager()`
|
|
178
|
+
- Hard resolve conflicts for a repo (one-side overwrite): When remote and local is not consistent. Delete either one and then overwrite.
|
|
179
|
+
|
|
180
|
+
2. Documentation: Use sphinx and readthedoc to produce an effective documentation to the user. Highlight, screenshot the features of the package as an image, or a video.
|
|
181
|
+
|
|
182
|
+
3. Improves the work summary message output from the package.
|
|
183
|
+
|
|
184
|
+
## Contributing
|
|
185
|
+
|
|
186
|
+
Contributions to this repository are highly encouraged! If you have ideas for improvements, additional functionalities, or bug fixes, feel free to open an issue or submit a pull request. Let's collaborate to make Git management even more powerful and user-friendly.
|
|
187
|
+
|
|
188
|
+
## License
|
|
189
|
+
|
|
190
|
+
This repository is open-source and available under the [MIT License](LICENSE). You are welcome to use, modify, and distribute the code as per the terms of the license.
|
|
191
|
+
|
|
192
|
+
Enjoy using the Git-management package! 🚀
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: gites
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: gites is the home of all developers. It provides bulk clone, bulk push, bulk pull etc. Contact me with my discord ID: pakkin.lau
|
|
5
|
+
Home-page: https://github.com/pakkinlau/gites
|
|
6
|
+
Author: Pak Kin LAU
|
|
7
|
+
Author-email: kinlau529@gmail.com
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
|
|
16
|
+
# Package: gites
|
|
17
|
+
|
|
18
|
+

|
|
19
|
+
Image: The photos of "gites".
|
|
20
|
+
|
|
21
|
+
While I am personally use github as a cloud drive to sync and maintain a lot of personal repos. I found the process of typing git command everyday is very repetitive. And such workflow should be streamlined into a single click.
|
|
22
|
+
|
|
23
|
+
The goal of this package is to mimic the user experience of using a google drive or one drive. This package tries to memorize your github repo names and their link and record it into a single document, and also the commands are streamlined to be one-clicked. In such way, it save your time on synchronzing the packages when developing your projects.
|
|
24
|
+
|
|
25
|
+
## Solutions comparison:
|
|
26
|
+
|
|
27
|
+
Compare with `gitpython`:
|
|
28
|
+
|
|
29
|
+
| Feature / Capability | This Package | gitpython Library |
|
|
30
|
+
|---------------------------------|---------------------------|---------------------------|
|
|
31
|
+
| Manage JSON file | ✔️ Custom JSON handling | ❌ JSON handling only |
|
|
32
|
+
| Create Git repositories | ✔️ | ✔️ |
|
|
33
|
+
| Commit changes | ✔️ | ✔️ |
|
|
34
|
+
| Push changes to remote | ✔️ | ✔️ |
|
|
35
|
+
| Pull changes from remote | ❌ (Not mentioned) | ✔️ |
|
|
36
|
+
| Sync with one click | ✔️ Custom implementation | ❌ (Not mentioned) |
|
|
37
|
+
| Subprocess management | ✔️ | ❌ |
|
|
38
|
+
| Pre-commit hooks | ✔️ Custom implementation | ❌ |
|
|
39
|
+
| Custom timing functionality | ✔️ | ❌ |
|
|
40
|
+
| Comprehensive error handling | ✔️ | ✔️ |
|
|
41
|
+
| JSON configuration options | ✔️ Custom implementation | ❌ |
|
|
42
|
+
| Flexibility for expansion | ✔️ | ✔️ |
|
|
43
|
+
| Popularity and community support| ❌ (Not mentioned) | ✔️ Well-established |
|
|
44
|
+
| |
|
|
45
|
+
|
|
46
|
+
Compare with `vscode source control`:
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
| Feature | This Package | VS Code Source Control |
|
|
50
|
+
|---------------------|----------------------|------------------------|
|
|
51
|
+
| JSON Management | ✔️ | ❌ |
|
|
52
|
+
| One-Click Sync | ✔️ | ✔️ |
|
|
53
|
+
| Git Integration | ✔️ | ✔️ |
|
|
54
|
+
| Commit Management | ✔️ | ✔️ |
|
|
55
|
+
| Branch Management | ✔️ | ✔️ |
|
|
56
|
+
| Diff Viewer | ✔️ | ✔️ |
|
|
57
|
+
| History Tracking | ✔️ | ✔️ |
|
|
58
|
+
| Conflict Resolution| ✔️ | ✔️ |
|
|
59
|
+
| User-Friendly UI | ✔️ | ✔️ |
|
|
60
|
+
| Customization | ✔️ | ✔️ |
|
|
61
|
+
| Remote Repo Support | ✔️ | ✔️ |
|
|
62
|
+
| Real-time Updates | ❌ | ✔️ |
|
|
63
|
+
| Collaboration | ❌ | ✔️ |
|
|
64
|
+
| Performance | Depends on Implem. | ✔️ |
|
|
65
|
+
|
|
66
|
+
(Note: We will add real-time update, progress tracking bar to the package in the future to make the package to be more competitive)
|
|
67
|
+
|
|
68
|
+
## Functionalities of the package:
|
|
69
|
+
|
|
70
|
+
- JSON data store:
|
|
71
|
+
- Memorize what are the repos that you owns and their remote link. You are save it in a particular location and clone all your repos all at once with that JSON as a memory.
|
|
72
|
+
>>
|
|
73
|
+
- Bulkclone:
|
|
74
|
+
- Users could clone a list of repos from their json file, which mimic the download actions of using a cloud storage
|
|
75
|
+
>>
|
|
76
|
+
- Bulkfetch/pull:
|
|
77
|
+
- We will build it later.
|
|
78
|
+
>>
|
|
79
|
+
- Auto-large-file-management:
|
|
80
|
+
- Very often, we might incidently include large size file in our commit, it would stucks the commit-push process. and The package would provide a set of hooks on each of your repos, which provide versatile ability of handling file size error. If there is any large size file detected, that file would be shown in the summary window.
|
|
81
|
+
>>
|
|
82
|
+
- Auto-large-file-packing-and-push:
|
|
83
|
+
- If there are large files, our package also included a functionality that providing hooks to all repos. Implementing the pre-commit hook to prevent files larger than 100MB from being committed. This feature ensures that large and unnecessary files do not clutter your repository and slow down your Git workflow.
|
|
84
|
+
>>
|
|
85
|
+
- Bulk-push:
|
|
86
|
+
- Once you have specified the root folder, that root folder can be considered as your own google drive. You can just sync all the changes with ease, by one click.
|
|
87
|
+
>>
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
## The journey of auto-packing your repository
|
|
91
|
+
|
|
92
|
+
### Step 1 (optional): Setup the default location of the `gites-config.json` file
|
|
93
|
+
- `gites-config.json` would keep up all the records required to execute the gitflow commands. If you put it inside this package, as you upgrade the package, your data would lose.
|
|
94
|
+
- You should locate this datastore file on another repo folder. So the datastore file would also included in the sync process.
|
|
95
|
+
- If you don't do this step, the `gites-config.json` will be located in `home/pgf-package/gites-config.json`
|
|
96
|
+
|
|
97
|
+
### Step 2a (necessary): Specify the root folder location
|
|
98
|
+
- All the progress will be done around the root folder. This information will be stored in the json.
|
|
99
|
+
- You might do it this way:
|
|
100
|
+
|
|
101
|
+
```python
|
|
102
|
+
abc.update_root_into('.....')
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Step 2b (optional): Initialize the `gites-config.json` file
|
|
106
|
+
- When cloning, you need to provide both the folder name, and the remote repo link for each repo.
|
|
107
|
+
- If you don't do that, the package will create an empty package for you in other actions if it cannot find the json in that location.
|
|
108
|
+
- If that is your first time using this package, you should follow these step to update your datastore json:
|
|
109
|
+
|
|
110
|
+
```python
|
|
111
|
+
# Testing unit:
|
|
112
|
+
if __name__ == "__main__":
|
|
113
|
+
|
|
114
|
+
root_directory = os.path.join(os.path.expanduser("~"), "All_Github_Repos")
|
|
115
|
+
list_of_repo = {
|
|
116
|
+
# "Git management": "https://github.com/pakkinlau/your-repo.git", # A repo should not clone itself.
|
|
117
|
+
"Guides": "https://github.com/pakkinlau/guides.git",
|
|
118
|
+
"Textual notes": "https://github.com/pakkinlau/textual-notes.git",
|
|
119
|
+
"Tutorial template": "https://github.com/pakkinlau/tutorial-template.git",
|
|
120
|
+
"Video materials": "https://github.com/pakkinlau/video-materials.git",
|
|
121
|
+
"JS webpage coding gym": "https://github.com/pakkinlau/js-webpage-coding-gym.git",
|
|
122
|
+
"Python coding gym": "https://github.com/pakkinlau/python-coding-gym.git",
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
# Determine the path to the JSON file in the same directory as the script
|
|
126
|
+
json_file_path = default_json_path
|
|
127
|
+
|
|
128
|
+
# test json writing + updating
|
|
129
|
+
update_repo_info(list_of_repo)
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
And the resulting json datastore would be like this:
|
|
133
|
+
```json
|
|
134
|
+
{
|
|
135
|
+
"repositories": [
|
|
136
|
+
{
|
|
137
|
+
"name": "Guides",
|
|
138
|
+
"remote_url": "https://github.com/pakkinlau/guides.git"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"name": "Textual notes",
|
|
142
|
+
"remote_url": "https://github.com/pakkinlau/textual-notes.git"
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
"root_directory": "/home/kin/All_Github_Repos"
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Step 3 (optional): Bulk clone all repos from remote
|
|
150
|
+
- With the datastore json, you can start clone all of your repos from remote.
|
|
151
|
+
- After processing, a summary of updated/no-effect/failed repos list will be displayed.
|
|
152
|
+
|
|
153
|
+
### Step 4 (optional): Bulk fetch-pull all of your repos
|
|
154
|
+
- This function is still working in progress.
|
|
155
|
+
- With that, you can look at the updates of all repos in one-clik.
|
|
156
|
+
- After processing, a summary of updated/no-effect/failed repos list will be displayed.
|
|
157
|
+
|
|
158
|
+
### Step 5 (optional): Bulk push all of your repos
|
|
159
|
+
- The package would search all the repos in the root folder that you have specified. And try to execute commit-push for each repos.
|
|
160
|
+
|
|
161
|
+
The successful push will give you back this summary message:
|
|
162
|
+

|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
## Terminal operations:
|
|
166
|
+
|
|
167
|
+
- Installation of the package
|
|
168
|
+
```bash
|
|
169
|
+
pip install autogit
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
- Ensuring your terminal has already logged in your github account:
|
|
173
|
+
```bash
|
|
174
|
+
git abcdefg
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
- Bulk push for all repos in the root folder you specified location:
|
|
178
|
+
```bash
|
|
179
|
+
abc bulk push
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
- Setup the `gites-config.json` within terminal:
|
|
183
|
+
```bash
|
|
184
|
+
agit init
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
## Future development
|
|
189
|
+
|
|
190
|
+
1. Consider varying needs from the diversity of potential users. Adding / editing the package to provide more methods.
|
|
191
|
+
Such as:
|
|
192
|
+
- Renaming a repo. `RenameManager()`
|
|
193
|
+
- Hard resolve conflicts for a repo (one-side overwrite): When remote and local is not consistent. Delete either one and then overwrite.
|
|
194
|
+
|
|
195
|
+
2. Documentation: Use sphinx and readthedoc to produce an effective documentation to the user. Highlight, screenshot the features of the package as an image, or a video.
|
|
196
|
+
|
|
197
|
+
3. Improves the work summary message output from the package.
|
|
198
|
+
|
|
199
|
+
## Contributing
|
|
200
|
+
|
|
201
|
+
Contributions to this repository are highly encouraged! If you have ideas for improvements, additional functionalities, or bug fixes, feel free to open an issue or submit a pull request. Let's collaborate to make Git management even more powerful and user-friendly.
|
|
202
|
+
|
|
203
|
+
## License
|
|
204
|
+
|
|
205
|
+
This repository is open-source and available under the [MIT License](LICENSE). You are welcome to use, modify, and distribute the code as per the terms of the license.
|
|
206
|
+
|
|
207
|
+
Enjoy using the Git-management package! 🚀
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
gites-0.1.0/setup.cfg
ADDED
gites-0.1.0/setup.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
setup(
|
|
4
|
+
name='gites',
|
|
5
|
+
version='0.1.0',
|
|
6
|
+
description='gites is the home of all developers. It provides bulk clone, bulk push, bulk pull etc. Contact me with my discord ID: pakkin.lau',
|
|
7
|
+
long_description=open('README.md').read(),
|
|
8
|
+
long_description_content_type='text/markdown',
|
|
9
|
+
author='Pak Kin LAU',
|
|
10
|
+
author_email='kinlau529@gmail.com',
|
|
11
|
+
url='https://github.com/pakkinlau/gites',
|
|
12
|
+
packages=find_packages(),
|
|
13
|
+
install_requires=[],
|
|
14
|
+
classifiers=[
|
|
15
|
+
'Development Status :: 3 - Alpha',
|
|
16
|
+
'Intended Audience :: Developers',
|
|
17
|
+
'License :: OSI Approved :: MIT License',
|
|
18
|
+
'Programming Language :: Python :: 3',
|
|
19
|
+
'Programming Language :: Python :: 3.8',
|
|
20
|
+
],
|
|
21
|
+
)
|