Skip to content

Commit 83e31af

Browse files
authored
feat(collector): collect more (>= 500 stars) colors (#148)
fix(policy): fix reverse order exceptions (#148) feat(command): add 'info' sub command for detailed info (#148) perf(test): improve test cases (#148)
1 parent 1dff0f3 commit 83e31af

File tree

10 files changed

+878
-84
lines changed

10 files changed

+878
-84
lines changed

COLORSCHEMES.md

Lines changed: 68 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11

2-
ColorSchemes List
3-
=================
2+
ColorSchemes List (41)
3+
======================
44

55
- [folke/tokyonight.nvim](https://github.com/folke/tokyonight.nvim) (stars: 4400, last update: 2023-10-25)
66
- tokyonight
77
- tokyonight-day
88
- tokyonight-moon
99
- tokyonight-night
1010
- tokyonight-storm
11-
- [catppuccin/nvim](https://github.com/catppuccin/nvim) (stars: 3700, last update: 2023-12-21)
11+
- [catppuccin/nvim](https://github.com/catppuccin/nvim) (stars: 3700, last update: 2023-12-22)
1212
- catppuccin
1313
- catppuccin-frappe
1414
- catppuccin-latte
@@ -19,27 +19,25 @@ ColorSchemes List
1919
- kanagawa-dragon
2020
- kanagawa-lotus
2121
- kanagawa-wave
22-
- [nlknguyen/papercolor-theme](https://github.com/nlknguyen/papercolor-theme) (stars: 2577, last update: 2022-06-08)
22+
- [nlknguyen/papercolor-theme](https://github.com/nlknguyen/papercolor-theme) (stars: 2578, last update: 2022-06-09)
2323
- PaperColor
24-
- [nordtheme/vim](https://github.com/nordtheme/vim) (stars: 2451, last update: 2023-05-03)
25-
- nord
26-
- [sainnhe/everforest](https://github.com/sainnhe/everforest) (stars: 2200, last update: 2023-10-24)
24+
- [sainnhe/everforest](https://github.com/sainnhe/everforest) (stars: 2200, last update: 2023-10-25)
2725
- everforest
2826
- [cocopon/iceberg.vim](https://github.com/cocopon/iceberg.vim) (stars: 2083, last update: 2022-11-23)
2927
- iceberg
30-
- [junegunn/seoul256.vim](https://github.com/junegunn/seoul256.vim) (stars: 1608, last update: 2023-05-03)
28+
- [junegunn/seoul256.vim](https://github.com/junegunn/seoul256.vim) (stars: 1609, last update: 2023-05-03)
3129
- seoul256
3230
- seoul256-light
3331
- [sainnhe/gruvbox-material](https://github.com/sainnhe/gruvbox-material) (stars: 1500, last update: 2023-11-22)
3432
- gruvbox-material
35-
- [rose-pine/neovim](https://github.com/rose-pine/neovim) (stars: 1400, last update: 2023-10-25)
33+
- [rose-pine/neovim](https://github.com/rose-pine/neovim) (stars: 1400, last update: 2023-10-26)
3634
- rose-pine
3735
- rose-pine-dawn
3836
- rose-pine-main
3937
- rose-pine-moon
40-
- [ku1ik/vim-monokai](https://github.com/ku1ik/vim-monokai) (stars: 1423, last update: 2022-02-09)
38+
- [ku1ik/vim-monokai](https://github.com/ku1ik/vim-monokai) (stars: 1422, last update: 2022-02-09)
4139
- monokai
42-
- [sainnhe/sonokai](https://github.com/sainnhe/sonokai) (stars: 1400, last update: 2023-10-24)
40+
- [sainnhe/sonokai](https://github.com/sainnhe/sonokai) (stars: 1400, last update: 2023-10-25)
4341
- sonokai
4442
- [dracula/vim](https://github.com/dracula/vim) (stars: 1300, last update: 2023-10-29)
4543
- dracula
@@ -70,18 +68,72 @@ ColorSchemes List
7068
- github_light_tritanopia
7169
- [ellisonleao/gruvbox.nvim](https://github.com/ellisonleao/gruvbox.nvim) (stars: 1300, last update: 2023-12-23)
7270
- gruvbox
73-
- [tomasiser/vim-code-dark](https://github.com/tomasiser/vim-code-dark) (stars: 877, last update: 2023-11-11)
71+
- [tomasiser/vim-code-dark](https://github.com/tomasiser/vim-code-dark) (stars: 877, last update: 2023-11-12)
7472
- codedark
75-
- [jnurmine/zenburn](https://github.com/jnurmine/zenburn) (stars: 863, last update: 2022-08-08)
73+
- [jnurmine/zenburn](https://github.com/jnurmine/zenburn) (stars: 862, last update: 2022-08-09)
7674
- zenburn
7775
- [romainl/apprentice](https://github.com/romainl/apprentice) (stars: 862, last update: 2023-02-15)
7876
- apprentice
79-
- [marko-cerovac/material.nvim](https://github.com/marko-cerovac/material.nvim) (stars: 843, last update: 2023-12-13)
77+
- [marko-cerovac/material.nvim](https://github.com/marko-cerovac/material.nvim) (stars: 843, last update: 2023-12-14)
8078
- material
8179
- material-darker
8280
- material-deep-ocean
8381
- material-lighter
8482
- material-oceanic
8583
- material-palenight
86-
- [nyoom-engineering/oxocarbon.nvim](https://github.com/nyoom-engineering/oxocarbon.nvim) (stars: 808, last update: 2023-11-27)
87-
- oxocarbon
84+
- [nyoom-engineering/oxocarbon.nvim](https://github.com/nyoom-engineering/oxocarbon.nvim) (stars: 808, last update: 2023-11-28)
85+
- oxocarbon
86+
- [sainnhe/edge](https://github.com/sainnhe/edge) (stars: 792, last update: 2023-10-25)
87+
- edge
88+
- [raphamorim/lucario](https://github.com/raphamorim/lucario) (stars: 780, last update: 2023-12-12)
89+
- lucario
90+
- [srcery-colors/srcery-vim](https://github.com/srcery-colors/srcery-vim) (stars: 774, last update: 2023-12-07)
91+
- srcery
92+
- [pineapplegiant/spaceduck](https://github.com/pineapplegiant/spaceduck) (stars: 757, last update: 2022-02-22)
93+
- spaceduck
94+
- [ajmwagar/vim-deus](https://github.com/ajmwagar/vim-deus) (stars: 726, last update: 2021-03-28)
95+
- deus
96+
- [bluz71/vim-nightfly-colors](https://github.com/bluz71/vim-nightfly-colors) (stars: 698, last update: 2023-12-26)
97+
- nightfly
98+
- [shaunsingh/nord.nvim](https://github.com/shaunsingh/nord.nvim) (stars: 692, last update: 2023-12-20)
99+
- nord
100+
- [bluz71/vim-moonfly-colors](https://github.com/bluz71/vim-moonfly-colors) (stars: 682, last update: 2023-12-26)
101+
- moonfly
102+
- [fenetikm/falcon](https://github.com/fenetikm/falcon) (stars: 675, last update: 2023-03-12)
103+
- falcon
104+
- [drewtempelmeyer/palenight.vim](https://github.com/drewtempelmeyer/palenight.vim) (stars: 647, last update: 2023-04-27)
105+
- palenight
106+
- [embark-theme/vim](https://github.com/embark-theme/vim) (stars: 594, last update: 2023-12-21)
107+
- embark
108+
- [preservim/vim-colors-pencil](https://github.com/preservim/vim-colors-pencil) (stars: 593, last update: 2022-05-07)
109+
- pencil
110+
- [challenger-deep-theme/vim](https://github.com/challenger-deep-theme/vim) (stars: 576, last update: 2022-04-25)
111+
- challenger_deep
112+
- [liuchengxu/space-vim-dark](https://github.com/liuchengxu/space-vim-dark) (stars: 563, last update: 2023-11-04)
113+
- space-vim-dark
114+
- [savq/melange-nvim](https://github.com/savq/melange-nvim) (stars: 530, last update: 2023-10-19)
115+
- melange
116+
- [lunacookies/vim-colors-xcode](https://github.com/lunacookies/vim-colors-xcode) (stars: 534, last update: 2023-11-06)
117+
- xcode
118+
- xcodedark
119+
- xcodedarkhc
120+
- xcodehc
121+
- xcodelight
122+
- xcodelighthc
123+
- xcodewwdc
124+
- [mcchrish/zenbones.nvim](https://github.com/mcchrish/zenbones.nvim) (stars: 504, last update: 2023-10-31)
125+
- duckbones
126+
- forestbones
127+
- kanagawabones
128+
- neobones
129+
- nordbones
130+
- randombones
131+
- rosebones
132+
- seoulbones
133+
- tokyobones
134+
- vimbones
135+
- zenbones
136+
- zenburned
137+
- zenwritten
138+
- [rigellute/rigel](https://github.com/rigellute/rigel) (stars: 505, last update: 2021-10-04)
139+
- rigel

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<p align="center">
66
<a href="https://github.com/neovim/neovim/releases/v0.8.0"><img alt="Neovim" src="https://img.shields.io/badge/Neovim-v0.8+-57A143?logo=neovim&logoColor=57A143" /></a>
7-
<a href="https://github.com/linrongbin16/commons.nvim"><img alt="commons.nvim" src="https://custom-icon-badges.demolab.com/badge/Power_by-commons.nvim-teal?logo=heart&logoColor=fff&labelColor=deeppink" /></a>
7+
<a href="https://github.com/linrongbin16/commons.nvim"><img alt="commons.nvim" src="https://custom-icon-badges.demolab.com/badge/Powered_by-commons.nvim-teal?logo=heart&logoColor=fff&labelColor=deeppink" /></a>
88
<a href="https://luarocks.org/modules/linrongbin16/colorbox.nvim"><img alt="luarocks" src="https://custom-icon-badges.demolab.com/luarocks/v/linrongbin16/colorbox.nvim?label=LuaRocks&labelColor=2C2D72&logo=tag&logoColor=fff&color=blue" /></a>
99
<a href="https://github.com/linrongbin16/gitlinker.nvim/actions/workflows/ci.yml"><img alt="ci.yml" src="https://img.shields.io/github/actions/workflow/status/linrongbin16/colorbox.nvim/ci.yml?label=GitHub%20CI&labelColor=181717&logo=github&logoColor=fff" /></a>
1010
<a href="https://app.codecov.io/github/linrongbin16/colorbox.nvim"><img alt="codecov" src="https://img.shields.io/codecov/c/github/linrongbin16/colorbox.nvim?logo=codecov&logoColor=F01F7A&label=Codecov" /></a>
@@ -39,7 +39,7 @@ It use offline github actions to weekly collect and update the most popular Vim/
3939
>
4040
> with below conditions:
4141
>
42-
> 1. Github stars &ge; 800.
42+
> 1. Github stars &ge; 500 (default config only enables stars &ge; 800, please modify the `filter` option to choose any colors (see [Configuration](#-configuration))).
4343
> 2. Last git commit in 3 years.
4444
> 3. For multiple plugins that contain the same color name, choose the one in following rules:
4545
> 1. **Awesome-neovim** wins **vimcolorsheme**, since they usually has modern Neovim features (lua, lsp, treesitter) and support more third-party plugins.
@@ -181,12 +181,20 @@ You can use command `Colorbox` to control the player with below subcommands:
181181
```lua
182182
require('colorbox').setup({
183183
-- Disable those colors you don't want from the candidates list.
184-
filter = "primary",
184+
-- By default only enable primary colorscheme and GitHub stars >= 800.
185+
filter = {
186+
"primary",
187+
function(color, spec)
188+
return spec.github_stars < 800
189+
end,
190+
},
185191

186192
-- Choose a colorscheme from the filtered candidates.
193+
-- By default randomly select color on nvim start.
187194
policy = "shuffle",
188195

189196
-- Decide when to switch to next colorscheme.
197+
-- By default randomly select color on nvim start.
190198
timing = "startup",
191199

192200
-- (Optional) setup plugin before running `colorscheme {color}`.

collect.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from tinydb import Query, TinyDB
2121

2222
# github
23-
GITHUB_STARS = 800
23+
GITHUB_STARS = 500
2424
LAST_GIT_COMMIT = 3 * 365 * 24 * 3600 # 3 years * 365 days * 24 hours * 3600 seconds
2525
BLACKLIST = [
2626
"rafi/awesome-vim-colorschemes",
@@ -230,7 +230,7 @@ def save(self) -> None:
230230
logging.debug(f"add new repo: {self}")
231231
else:
232232
ColorSpec.DB.update(obj, q.handle == self.handle)
233-
logging.debug(f"add(udpate) existed repo: {self}")
233+
logging.debug(f"add(update) existed repo: {self}")
234234

235235
def update_last_git_commit(self, last_git_commit: datetime.datetime) -> None:
236236
q = Query()
@@ -556,12 +556,15 @@ def build(self) -> None:
556556
# dedup candidates
557557
deduped_specs = self._dedup()
558558

559+
total = 0
559560
for spec in ColorSpec.all():
560561
if not spec in deduped_specs:
561562
logging.debug(f"remove for duplicate - repo:{spec}")
562563
spec.remove()
564+
else:
565+
total += 1
563566

564-
md = MdUtils(file_name="COLORSCHEMES", title="ColorSchemes List")
567+
md = MdUtils(file_name="COLORSCHEMES", title=f"ColorSchemes List ({total})")
565568
for spec in ColorSpec.all():
566569
logging.info(f"collect spec:{spec}")
567570
color_names = spec.get_vim_color_names()

0 commit comments

Comments
 (0)