NikGapps 3.15__tar.gz → 3.17__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.
Files changed (113) hide show
  1. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/git/GitlabManager.py +27 -11
  2. {nikgapps-3.15 → nikgapps-3.17/NikGapps.egg-info}/PKG-INFO +1 -1
  3. {nikgapps-3.15/NikGapps.egg-info → nikgapps-3.17}/PKG-INFO +1 -1
  4. {nikgapps-3.15 → nikgapps-3.17}/setup.py +1 -1
  5. {nikgapps-3.15 → nikgapps-3.17}/LICENSE +0 -0
  6. {nikgapps-3.15 → nikgapps-3.17}/MANIFEST.in +0 -0
  7. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/__init__.py +0 -0
  8. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/build/Build.py +0 -0
  9. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/build/NikGappsManager.py +0 -0
  10. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/build/NikGappsOverlays.py +0 -0
  11. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/build/NikGappsPackages.py +0 -0
  12. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/build/PackageConstants.py +0 -0
  13. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/build/Release.py +0 -0
  14. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/build/__init__.py +0 -0
  15. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/build_config.py +0 -0
  16. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/cache.py +0 -0
  17. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/config/NikGappsConfig.py +0 -0
  18. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/config/__init__.py +0 -0
  19. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/config_upload.py +0 -0
  20. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/copy_repos.py +0 -0
  21. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/AppSet.py +0 -0
  22. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/Args.py +0 -0
  23. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/Assets.py +0 -0
  24. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/B64.py +0 -0
  25. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/C.py +0 -0
  26. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/Cmd.py +0 -0
  27. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/Config.py +0 -0
  28. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/ConfigObj.py +0 -0
  29. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/FileOp.py +0 -0
  30. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/Json.py +0 -0
  31. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/P.py +0 -0
  32. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/Package.py +0 -0
  33. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/Statics.py +0 -0
  34. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/SystemStat.py +0 -0
  35. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/T.py +0 -0
  36. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/XmlOp.py +0 -0
  37. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/__init__.py +0 -0
  38. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/NikGappsZipSigner.jar +0 -0
  39. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/addon.sh +0 -0
  40. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/apksigner.jar +0 -0
  41. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/apktool_2.9.3.jar +0 -0
  42. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/appsets.json +0 -0
  43. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/bin/Darwin/aapt2 +0 -0
  44. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/bin/Linux/aapt2 +0 -0
  45. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/bin/Linux/dex-tools-2.2-SNAPSHOT-2021-10-31.zip +0 -0
  46. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/bin/Linux/jd-gui-1.6.6-min.jar +0 -0
  47. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/bin/Windows/AdbWinApi.dll +0 -0
  48. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/bin/Windows/AdbWinUsbApi.dll +0 -0
  49. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/bin/Windows/aapt.exe +0 -0
  50. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/bin/Windows/aapt2.exe +0 -0
  51. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/bin/Windows/aapt_64.exe +0 -0
  52. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/bin/Windows/adb.exe +0 -0
  53. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/busybox +0 -0
  54. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/cert.pk8 +0 -0
  55. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/cert.x509.pem +0 -0
  56. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/changelogs.yaml +0 -0
  57. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/config_versions.json +0 -0
  58. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/customize.sh +0 -0
  59. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/debloater.config +0 -0
  60. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/functions.sh +0 -0
  61. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/gofile.sh +0 -0
  62. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/header.sh +0 -0
  63. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/installer.sh +0 -0
  64. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/magisk-update-binary.sh +0 -0
  65. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/module.prop +0 -0
  66. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/mount.sh +0 -0
  67. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/mtg_mount.sh +0 -0
  68. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/nikgapps.config +0 -0
  69. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/nikgapps_functions.sh +0 -0
  70. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/packages.json +0 -0
  71. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/private_key.pem +0 -0
  72. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/uninstaller.sh +0 -0
  73. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/unmount.sh +0 -0
  74. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/update-binary-busybox +0 -0
  75. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/compression/CompOps.py +0 -0
  76. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/compression/Export.py +0 -0
  77. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/compression/Modes.py +0 -0
  78. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/compression/Tar.py +0 -0
  79. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/compression/Zip.py +0 -0
  80. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/compression/Zsh.py +0 -0
  81. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/compression/__init__.py +0 -0
  82. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/git/Git.py +0 -0
  83. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/git/GitOperations.py +0 -0
  84. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/git/GitStatics.py +0 -0
  85. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/git/GithubManager.py +0 -0
  86. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/git/TestGit.py +0 -0
  87. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/git/__init__.py +0 -0
  88. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/overlay/ApkMetaInfo.py +0 -0
  89. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/overlay/Bool.py +0 -0
  90. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/overlay/Library.py +0 -0
  91. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/overlay/Manifest.py +0 -0
  92. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/overlay/Overlay.py +0 -0
  93. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/overlay/Resources.py +0 -0
  94. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/overlay/String.py +0 -0
  95. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/overlay/StringArray.py +0 -0
  96. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/overlay/__init__.py +0 -0
  97. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/upload/CmdUpload.py +0 -0
  98. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/upload/GoFileUpload.py +0 -0
  99. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/upload/Upload.py +0 -0
  100. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/upload/__init__.py +0 -0
  101. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/web/Requests.py +0 -0
  102. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/web/TelegramApi.py +0 -0
  103. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/web/__init__.py +0 -0
  104. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/main.py +0 -0
  105. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/overlay_control.py +0 -0
  106. {nikgapps-3.15 → nikgapps-3.17}/NikGapps/test.py +0 -0
  107. {nikgapps-3.15 → nikgapps-3.17}/NikGapps.egg-info/SOURCES.txt +0 -0
  108. {nikgapps-3.15 → nikgapps-3.17}/NikGapps.egg-info/dependency_links.txt +0 -0
  109. {nikgapps-3.15 → nikgapps-3.17}/NikGapps.egg-info/entry_points.txt +0 -0
  110. {nikgapps-3.15 → nikgapps-3.17}/NikGapps.egg-info/requires.txt +0 -0
  111. {nikgapps-3.15 → nikgapps-3.17}/NikGapps.egg-info/top_level.txt +0 -0
  112. {nikgapps-3.15 → nikgapps-3.17}/README.md +0 -0
  113. {nikgapps-3.15 → nikgapps-3.17}/setup.cfg +0 -0
@@ -6,6 +6,7 @@ from pathlib import Path
6
6
  import gitlab
7
7
 
8
8
  from NikGapps.helper.FileOp import FileOp
9
+ from NikGapps.helper.P import P
9
10
  from NikGapps.helper.Statics import Statics
10
11
  from NikGapps.helper.git.GitOperations import GitOperations
11
12
 
@@ -29,6 +30,21 @@ class GitLabManager:
29
30
  self.create_and_commit_readme(project_id=project.id)
30
31
  return project
31
32
 
33
+ def create_lfs_repository(self, project_name, provide_owner_access=False, user_id=8064473, visibility='public',
34
+ extn_list=None):
35
+ """Creates a new repository with the given project name and attributes."""
36
+ if extn_list is None:
37
+ extn_list = []
38
+ project = self.gl.projects.create({'name': project_name, 'visibility': visibility})
39
+ if provide_owner_access:
40
+ self.provide_owner_access(project_id=project.id, user_id=user_id)
41
+ self.create_and_commit_readme(project_id=project.id)
42
+ gitattributes = ""
43
+ for extn in extn_list:
44
+ gitattributes += f"*.{extn} filter=lfs diff=lfs merge=lfs -text\n"
45
+ self.create_and_commit_file(project_id=project.id, file_path=".gitattributes", content=gitattributes)
46
+ return project
47
+
32
48
  def provide_owner_access(self, project_id, user_id):
33
49
  """Provides owner access to a repository for a particular user."""
34
50
  project = self.gl.projects.get(project_id)
@@ -36,7 +52,7 @@ class GitLabManager:
36
52
  'user_id': user_id,
37
53
  'access_level': 50
38
54
  })
39
- print(f"Owner access provided to user with ID {user_id}.")
55
+ P.green(f"Owner access provided to user with ID {user_id}.")
40
56
  return member
41
57
 
42
58
  def get_project(self, project_name):
@@ -64,8 +80,8 @@ class GitLabManager:
64
80
  ]
65
81
  }
66
82
  commit = project.commits.create(commit_data)
67
- print(f"README.md created and committed to the repository {project.name}.")
68
- print(commit)
83
+ P.green(f"README.md created and committed to the repository {project.name}.")
84
+ # print(commit)
69
85
  return commit
70
86
 
71
87
  def create_and_commit_file(self, project_id, branch_name="main", file_path="file.txt", content=""):
@@ -83,8 +99,8 @@ class GitLabManager:
83
99
  ]
84
100
  }
85
101
  commit = project.commits.create(commit_data)
86
- print(f"{file_path} created and committed to the repository {project.name}.")
87
- print(commit)
102
+ P.green(f"{file_path} created and committed to the repository {project.name}.")
103
+ # print(commit)
88
104
  return commit
89
105
 
90
106
  def create_gitlab_repository(self, project_name, visibility='public'):
@@ -147,13 +163,13 @@ class GitLabManager:
147
163
  new_repo_name = f"{repo_name}_{time.strftime('%Y%m%d')}"
148
164
  new_project = self.get_project(new_repo_name)
149
165
  if new_project is not None:
150
- print(f"Project {new_repo_name} already exists. Deleting...")
166
+ P.red(f"Project {new_repo_name} already exists. Deleting...")
151
167
  self.delete_project(new_project.id)
152
168
  project.name = new_repo_name
153
169
  project.path = new_repo_name
154
- print(f"Repository {repo_name} renaming to {new_repo_name}.")
170
+ P.yellow(f"Repository {repo_name} renaming to {new_repo_name}.")
155
171
  project.save()
156
- print(f"Repository {repo_name} renamed to {new_repo_name}.")
172
+ P.green(f"Repository {repo_name} renamed to {new_repo_name}.")
157
173
  return project
158
174
 
159
175
  def reset_repository(self, repo_name, gitattributes=None, user_id=8064473, sleep_for=10, delete_only=False):
@@ -162,13 +178,13 @@ class GitLabManager:
162
178
  project = self.get_project(repo_name)
163
179
  self.delete_project(project.id)
164
180
  if not delete_only:
165
- print(f"Waiting for {sleep_for} seconds for the project to be completely deleted...")
181
+ P.red(f"Waiting for {sleep_for} seconds for the project to be completely deleted...")
166
182
  time.sleep(sleep_for)
167
183
  project = self.create_repository(repo_name, provide_owner_access=True, user_id=user_id)
168
184
  if gitattributes is not None:
169
185
  commit = self.create_and_commit_file(project_id=project.id, file_path=".gitattributes",
170
186
  content=gitattributes)
171
- print(commit)
187
+ # print(commit)
172
188
  return project
173
189
  except Exception as e:
174
190
  print(f"Failed to reset repository: {e}")
@@ -226,7 +242,7 @@ class GitLabManager:
226
242
  if override_target:
227
243
  target_project = self.get_project(target_repo_name)
228
244
  if target_project is not None:
229
- print(f"Project {target_repo_name} already exists. Deleting...")
245
+ P.red(f"Project {target_repo_name} already exists. Deleting...")
230
246
  self.delete_project(target_project.id)
231
247
  if self.get_project(target_repo_name) is not None:
232
248
  print(f"Project {target_repo_name} already exists. Exiting...")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: NikGapps
3
- Version: 3.15
3
+ Version: 3.17
4
4
  Summary: A short description of your project
5
5
  Home-page: https://github.com/nikgapps/project
6
6
  Author: Nikhil Menghani
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: NikGapps
3
- Version: 3.15
3
+ Version: 3.17
4
4
  Summary: A short description of your project
5
5
  Home-page: https://github.com/nikgapps/project
6
6
  Author: Nikhil Menghani
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="NikGapps",
5
- version="3.15",
5
+ version="3.17",
6
6
  packages=find_packages(),
7
7
  include_package_data=True,
8
8
  package_data={
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes