Skip to content

Commit 4769096

Browse files
authored
fix(collector): fix VCS (#230)
chore(colors): auto update colorschemes list (#230) --------- Co-authored-by: linrongbin16 <[email protected]>
1 parent 415a545 commit 4769096

File tree

17 files changed

+686
-1592
lines changed

17 files changed

+686
-1592
lines changed

COLORSCHEMES.md

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ColorSchemes List (54)
88
- tokyonight-moon
99
- tokyonight-night
1010
- tokyonight-storm
11-
- [catppuccin/nvim](https://github.com/catppuccin/nvim) (stars: 4700, last update: 2024-05-04)
11+
- [catppuccin/nvim](https://github.com/catppuccin/nvim) (stars: 4700, last update: 2024-05-08)
1212
- catppuccin
1313
- catppuccin-frappe
1414
- catppuccin-latte
@@ -27,13 +27,13 @@ ColorSchemes List (54)
2727
- nightfox
2828
- nordfox
2929
- terafox
30-
- [nlknguyen/papercolor-theme](https://github.com/nlknguyen/papercolor-theme) (stars: 2620, last update: 2024-03-12)
30+
- [nlknguyen/papercolor-theme](https://github.com/nlknguyen/papercolor-theme) (stars: 2628, last update: 2024-03-12)
3131
- PaperColor
32-
- [sainnhe/everforest](https://github.com/sainnhe/everforest) (stars: 2500, last update: 2024-03-27)
32+
- [sainnhe/everforest](https://github.com/sainnhe/everforest) (stars: 2500, last update: 2024-05-07)
3333
- everforest
34-
- [cocopon/iceberg.vim](https://github.com/cocopon/iceberg.vim) (stars: 2131, last update: 2022-11-23)
34+
- [cocopon/iceberg.vim](https://github.com/cocopon/iceberg.vim) (stars: 2136, last update: 2022-11-23)
3535
- iceberg
36-
- [projekt0n/github-nvim-theme](https://github.com/projekt0n/github-nvim-theme) (stars: 2000, last update: 2024-05-03)
36+
- [projekt0n/github-nvim-theme](https://github.com/projekt0n/github-nvim-theme) (stars: 2000, last update: 2024-05-08)
3737
- github_dark
3838
- github_dark_colorblind
3939
- github_dark_default
@@ -46,44 +46,44 @@ ColorSchemes List (54)
4646
- github_light_default
4747
- github_light_high_contrast
4848
- github_light_tritanopia
49-
- [rakr/vim-one](https://github.com/rakr/vim-one) (stars: 1979, last update: 2020-12-14)
49+
- [rakr/vim-one](https://github.com/rakr/vim-one) (stars: 1982, last update: 2020-12-14)
5050
- one
51-
- [rose-pine/neovim](https://github.com/rose-pine/neovim) (stars: 1900, last update: 2024-04-18)
51+
- [rose-pine/neovim](https://github.com/rose-pine/neovim) (stars: 1900, last update: 2024-05-10)
5252
- rose-pine
5353
- rose-pine-dawn
5454
- rose-pine-main
5555
- rose-pine-moon
56-
- [nanotech/jellybeans.vim](https://github.com/nanotech/jellybeans.vim) (stars: 1765, last update: 2019-06-21)
56+
- [nanotech/jellybeans.vim](https://github.com/nanotech/jellybeans.vim) (stars: 1768, last update: 2019-06-21)
5757
- jellybeans
5858
- [sainnhe/gruvbox-material](https://github.com/sainnhe/gruvbox-material) (stars: 1700, last update: 2024-03-27)
5959
- gruvbox-material
60-
- [junegunn/seoul256.vim](https://github.com/junegunn/seoul256.vim) (stars: 1631, last update: 2023-05-03)
60+
- [ayu-theme/ayu-vim](https://github.com/ayu-theme/ayu-vim) (stars: 1634, last update: 2020-05-29)
61+
- ayu
62+
- [junegunn/seoul256.vim](https://github.com/junegunn/seoul256.vim) (stars: 1634, last update: 2023-05-03)
6163
- seoul256
6264
- seoul256-light
63-
- [ayu-theme/ayu-vim](https://github.com/ayu-theme/ayu-vim) (stars: 1629, last update: 2020-05-29)
64-
- ayu
65-
- [ellisonleao/gruvbox.nvim](https://github.com/ellisonleao/gruvbox.nvim) (stars: 1600, last update: 2024-05-03)
65+
- [ellisonleao/gruvbox.nvim](https://github.com/ellisonleao/gruvbox.nvim) (stars: 1600, last update: 2024-05-07)
6666
- gruvbox
6767
- [sainnhe/sonokai](https://github.com/sainnhe/sonokai) (stars: 1500, last update: 2024-03-27)
6868
- sonokai
69-
- [ku1ik/vim-monokai](https://github.com/ku1ik/vim-monokai) (stars: 1424, last update: 2022-02-09)
69+
- [ku1ik/vim-monokai](https://github.com/ku1ik/vim-monokai) (stars: 1423, last update: 2022-02-09)
7070
- monokai
71-
- [navarasu/onedark.nvim](https://github.com/navarasu/onedark.nvim) (stars: 1400, last update: 2024-01-29)
71+
- [navarasu/onedark.nvim](https://github.com/navarasu/onedark.nvim) (stars: 1400, last update: 2024-05-03)
7272
- onedark
7373
- [dracula/vim](https://github.com/dracula/vim) (stars: 1300, last update: 2024-04-14)
7474
- dracula
75-
- [sjl/badwolf](https://github.com/sjl/badwolf) (stars: 1241, last update: 2024-03-15)
75+
- [sjl/badwolf](https://github.com/sjl/badwolf) (stars: 1244, last update: 2024-05-08)
7676
- badwolf
7777
- goodwolf
78-
- [whatyouhide/vim-gotham](https://github.com/whatyouhide/vim-gotham) (stars: 1218, last update: 2023-01-19)
78+
- [whatyouhide/vim-gotham](https://github.com/whatyouhide/vim-gotham) (stars: 1220, last update: 2023-01-19)
7979
- gotham
8080
- gotham256
81-
- [jacoborus/tender.vim](https://github.com/jacoborus/tender.vim) (stars: 1107, last update: 2024-04-21)
81+
- [jacoborus/tender.vim](https://github.com/jacoborus/tender.vim) (stars: 1110, last update: 2024-04-21)
8282
- tender
8383
- [mhartington/oceanic-next](https://github.com/mhartington/oceanic-next) (stars: 1100, last update: 2023-05-01)
8484
- OceanicNext
8585
- OceanicNextLight
86-
- [lifepillar/vim-solarized8](https://github.com/lifepillar/vim-solarized8) (stars: 977, last update: 2024-01-22)
86+
- [lifepillar/vim-solarized8](https://github.com/lifepillar/vim-solarized8) (stars: 976, last update: 2024-01-22)
8787
- solarized8
8888
- solarized8_flat
8989
- solarized8_high
@@ -99,38 +99,41 @@ ColorSchemes List (54)
9999
- material-palenight
100100
- [tomasiser/vim-code-dark](https://github.com/tomasiser/vim-code-dark) (stars: 907, last update: 2024-04-11)
101101
- codedark
102-
- [jnurmine/zenburn](https://github.com/jnurmine/zenburn) (stars: 878, last update: 2022-08-08)
102+
- [jnurmine/zenburn](https://github.com/jnurmine/zenburn) (stars: 879, last update: 2022-08-08)
103103
- zenburn
104-
- [romainl/apprentice](https://github.com/romainl/apprentice) (stars: 868, last update: 2023-02-15)
104+
- [romainl/apprentice](https://github.com/romainl/apprentice) (stars: 869, last update: 2023-02-15)
105105
- apprentice
106106
- [sainnhe/edge](https://github.com/sainnhe/edge) (stars: 830, last update: 2024-03-27)
107107
- edge
108-
- [srcery-colors/srcery-vim](https://github.com/srcery-colors/srcery-vim) (stars: 802, last update: 2024-03-26)
108+
- [srcery-colors/srcery-vim](https://github.com/srcery-colors/srcery-vim) (stars: 804, last update: 2024-03-26)
109109
- srcery
110110
- [raphamorim/lucario](https://github.com/raphamorim/lucario) (stars: 788, last update: 2024-01-02)
111111
- lucario
112-
- [pineapplegiant/spaceduck](https://github.com/pineapplegiant/spaceduck) (stars: 776, last update: 2022-02-21)
112+
- [pineapplegiant/spaceduck](https://github.com/pineapplegiant/spaceduck) (stars: 783, last update: 2022-02-21)
113113
- spaceduck
114114
- [bluz71/vim-nightfly-colors](https://github.com/bluz71/vim-nightfly-colors) (stars: 765, last update: 2024-04-20)
115115
- nightfly
116116
- [bluz71/vim-moonfly-colors](https://github.com/bluz71/vim-moonfly-colors) (stars: 747, last update: 2024-04-20)
117117
- moonfly
118118
- [shaunsingh/nord.nvim](https://github.com/shaunsingh/nord.nvim) (stars: 747, last update: 2023-12-20)
119119
- nord
120-
- [ajmwagar/vim-deus](https://github.com/ajmwagar/vim-deus) (stars: 745, last update: 2021-03-28)
120+
- [ajmwagar/vim-deus](https://github.com/ajmwagar/vim-deus) (stars: 747, last update: 2021-03-28)
121121
- deus
122122
- [fenetikm/falcon](https://github.com/fenetikm/falcon) (stars: 702, last update: 2023-03-12)
123123
- falcon
124-
- [drewtempelmeyer/palenight.vim](https://github.com/drewtempelmeyer/palenight.vim) (stars: 648, last update: 2023-04-27)
124+
- [drewtempelmeyer/palenight.vim](https://github.com/drewtempelmeyer/palenight.vim) (stars: 649, last update: 2023-04-27)
125125
- palenight
126126
- [embark-theme/vim](https://github.com/embark-theme/vim) (stars: 633, last update: 2024-02-14)
127127
- embark
128128
- [savq/melange-nvim](https://github.com/savq/melange-nvim) (stars: 620, last update: 2024-02-16)
129129
- melange
130-
- [mofiqul/vscode.nvim](https://github.com/mofiqul/vscode.nvim) (stars: 613, last update: 2024-04-26)
130+
- [mofiqul/vscode.nvim](https://github.com/mofiqul/vscode.nvim) (stars: 613, last update: 2024-05-09)
131131
- vscode
132132
- [preservim/vim-colors-pencil](https://github.com/preservim/vim-colors-pencil) (stars: 599, last update: 2022-05-07)
133133
- pencil
134+
- [tjdevries/colorbuddy.nvim](https://github.com/tjdevries/colorbuddy.nvim) (stars: 598, last update: 2024-05-08)
135+
- colorbuddy
136+
- gruvbuddy
134137
- [mcchrish/zenbones.nvim](https://github.com/mcchrish/zenbones.nvim) (stars: 597, last update: 2024-03-30)
135138
- duckbones
136139
- forestbones
@@ -145,16 +148,13 @@ ColorSchemes List (54)
145148
- zenbones
146149
- zenburned
147150
- zenwritten
148-
- [tjdevries/colorbuddy.nvim](https://github.com/tjdevries/colorbuddy.nvim) (stars: 588, last update: 2024-03-20)
149-
- colorbuddy
150-
- gruvbuddy
151-
- [challenger-deep-theme/vim](https://github.com/challenger-deep-theme/vim) (stars: 583, last update: 2022-04-25)
152-
- challenger_deep
153-
- [liuchengxu/space-vim-dark](https://github.com/liuchengxu/space-vim-dark) (stars: 580, last update: 2023-11-04)
151+
- [liuchengxu/space-vim-dark](https://github.com/liuchengxu/space-vim-dark) (stars: 586, last update: 2023-11-04)
154152
- space-vim-dark
153+
- [challenger-deep-theme/vim](https://github.com/challenger-deep-theme/vim) (stars: 584, last update: 2022-04-25)
154+
- challenger_deep
155155
- [alexvzyl/nordic.nvim](https://github.com/alexvzyl/nordic.nvim) (stars: 570, last update: 2024-04-14)
156156
- nordic
157-
- [lunacookies/vim-colors-xcode](https://github.com/lunacookies/vim-colors-xcode) (stars: 554, last update: 2023-11-06)
157+
- [lunacookies/vim-colors-xcode](https://github.com/lunacookies/vim-colors-xcode) (stars: 559, last update: 2023-11-06)
158158
- xcode
159159
- xcodedark
160160
- xcodedarkhc
@@ -165,17 +165,17 @@ ColorSchemes List (54)
165165
- [kristijanhusak/vim-hybrid-material](https://github.com/kristijanhusak/vim-hybrid-material) (stars: 544, last update: 2020-06-16)
166166
- hybrid_material
167167
- hybrid_reverse
168-
- [wadackel/vim-dogrun](https://github.com/wadackel/vim-dogrun) (stars: 517, last update: 2024-04-21)
169-
- dogrun
170-
- [craftzdog/solarized-osaka.nvim](https://github.com/craftzdog/solarized-osaka.nvim) (stars: 509, last update: 2024-04-02)
168+
- [craftzdog/solarized-osaka.nvim](https://github.com/craftzdog/solarized-osaka.nvim) (stars: 528, last update: 2024-04-02)
171169
- solarized-osaka
172170
- solarized-osaka-day
173171
- solarized-osaka-moon
174172
- solarized-osaka-night
175173
- solarized-osaka-storm
176-
- [rigellute/rigel](https://github.com/rigellute/rigel) (stars: 508, last update: 2024-01-11)
177-
- rigel
178-
- [lifepillar/vim-gruvbox8](https://github.com/lifepillar/vim-gruvbox8) (stars: 507, last update: 2023-08-04)
174+
- [wadackel/vim-dogrun](https://github.com/wadackel/vim-dogrun) (stars: 524, last update: 2024-05-10)
175+
- dogrun
176+
- [lifepillar/vim-gruvbox8](https://github.com/lifepillar/vim-gruvbox8) (stars: 513, last update: 2023-08-04)
179177
- gruvbox8
180178
- gruvbox8_hard
181-
- gruvbox8_soft
179+
- gruvbox8_soft
180+
- [rigellute/rigel](https://github.com/rigellute/rigel) (stars: 510, last update: 2024-01-11)
181+
- rigel

collect.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -377,36 +377,32 @@ def _pages(self) -> typing.Iterable[str]:
377377
i = 0
378378
while True:
379379
if i == 0:
380-
yield "https://vimcolorschemes.com/top"
380+
yield "https://vimcolorschemes.com/i/top"
381381
else:
382-
yield f"https://vimcolorschemes.com/top/page/{i+1}"
382+
yield f"https://vimcolorschemes.com/i/top/p.{i+1}"
383383
i += 1
384384

385385
def _parse_spec(
386386
self, element: WebElement, page_url: str
387387
) -> typing.Optional[ColorSpec]:
388388
logging.debug(f"parsing (vsc) spec element:{element}, page url:{page_url}")
389389
try:
390-
url = element.find_element(
391-
By.XPATH, "./a[@class='card__link']"
392-
).get_attribute("href")
390+
a_elem = element.find_element(
391+
By.XPATH, "./a[starts-with(@class,'repositoryCard')]"
392+
)
393+
url = a_elem.get_attribute("href")
393394
if url.endswith("/"):
394395
url = url[:-1]
395396
logging.debug(f"parsing (vsc) spec handle_elem:{url}")
396397
handle = "/".join(url.split("/")[-2:])
397398
logging.debug(f"parsing (vsc) spec handle:{handle}")
398399
github_stars = int(
399-
element.find_element(
400+
a_elem.find_element(
400401
By.XPATH,
401-
"./a/section/header[@class='meta-header']//div[@class='meta-header__statistic']//b",
402+
"./div[starts-with(@class,'repositoryTitle')]//div[starts-with(@class,'repositoryTitle_stats')]//p[starts-with(@class,'repositoryTitle_stat')]//strong",
402403
).text
403404
)
404405
logging.debug(f"parsing (vsc) spec github_stars:{github_stars}")
405-
creates_updates = element.find_elements(
406-
By.XPATH,
407-
"./a/section/footer[@class='meta-footer']//div[@class='meta-footer__column']//p[@class='meta-footer__row']",
408-
)
409-
logging.debug(f"parsing (vsc) spec creates_updates:{creates_updates}")
410406
return ColorSpec(
411407
handle,
412408
github_stars,
@@ -424,7 +420,7 @@ def fetch(self) -> None:
424420
driver.get(page_url)
425421
driver.execute_script("window.scrollBy(0,document.body.scrollHeight)")
426422
need_more_scan = False
427-
for element in find_elements(driver, "//article[@class='card']"):
423+
for element in find_elements(driver, "//article"):
428424
spec = self._parse_spec(element, page_url)
429425
self.counter = self.counter + 1
430426
logging.debug(f"vsc repo-{self.counter}:{spec}")

0 commit comments

Comments
 (0)