You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--delay: duration = 1sec# Delay between API calls.
139
+
--github: string# API Token for Github.
140
+
--gitlab: string# API Token for Gitlab.
141
+
--codeberg: string# API Token for Codeberg.
142
+
--delay: duration = 2sec# Delay between API calls.
140
143
--source: string = "../themes.json"# Themes data.
141
144
--output: string = "./themes.json"# New data with themes.
142
145
--timezone: string = "UTC0"# Timezone for git calls.
@@ -149,22 +152,40 @@ export def main [
149
152
150
153
letlink=$item.repository
151
154
155
+
print$"Cloning ($link)."
156
+
152
157
letinfo=if ($link|str contains'github') {
153
158
sleep$delay
154
-
$link|parse_link|github$token
159
+
$link|parse_link|github$github
155
160
} else if ($link|str contains'gitlab') {
156
161
sleep$delay
157
-
$link|parse_link|gitlab$token
162
+
$link|parse_link|gitlab$gitlab
158
163
} else if ($link|str contains'codeberg') {
159
164
sleep$delay
160
-
$link|parse_link|codeberg$token
165
+
$link|parse_link|codeberg$codeberg
161
166
} else {
162
-
$link|parse_link|clone
167
+
print"Using git cloning."
168
+
$link|parse_link|clone$link
163
169
}
164
170
165
-
{
166
-
...$item
167
-
...$info
171
+
if ($info|is-empty) {
172
+
print$"Could not clone this repository."
173
+
print""
174
+
} else {
175
+
print""
176
+
{
177
+
...$item
178
+
...$info
179
+
}
168
180
}
169
181
}
182
+
183
+
$data|save--force$output
184
+
185
+
print"Replace the themes in the source directory? If no, will output the themes as JSON instead. To confirm, type either the word 'yes' or character 'y'."
0 commit comments