Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove noise from json file : fixed web_scrapper #43

Merged
merged 4 commits into from
Feb 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ Heres the default config table
transparent = false,
term_colors = true,
dim_inactive = false,
disable_telescope_themes = {},
styles = {
heading = {
h1 = {},
Expand Down
7 changes: 6 additions & 1 deletion lua/telescope/_extensions/themes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ local function get_theme()
theme_dir = theme_dir .. "lua/themer/modules/themes"

local fd = scan.scan_dir(theme_dir)

if fd then
for _, file in ipairs(fd) do
if string.find(file, "lua") then
table.insert(themes, (file:gsub(theme_dir .. ".", ""):gsub(".lua", "")))
local theme = file:gsub(theme_dir .. ".", ""):gsub(".lua", "")
local disable_themes = require("themer.config")("get").disable_telescope_themes
if not vim.tbl_contains(disable_themes, theme) then
table.insert(themes, theme)
end
end
end
end
Expand Down
1 change: 1 addition & 0 deletions lua/themer/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ local options = {
transparent = false,
term_colors = true,
dim_inactive = false,
disable_telescope_themes = {},
styles = {
heading = {
h1 = {},
Expand Down
4 changes: 0 additions & 4 deletions python/json/color_schemes.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"dracula/vim": "https://github.com/dracula/vim",
"Mofiqul/dracula.nvim": "https://github.com/Mofiqul/dracula.nvim",
"yashguptaz/calvera-dark.nvim": "https://github.com/yashguptaz/calvera-dark.nvim",
"VSCode Calvara Dark": "https://github.com/saurabhdaware/vscode-calvera-dark",
"nxvu699134/vn-night.nvim": "https://github.com/nxvu699134/vn-night.nvim",
"adisen99/codeschool.nvim": "https://github.com/adisen99/codeschool.nvim",
"projekt0n/github-nvim-theme": "https://github.com/projekt0n/github-nvim-theme",
Expand All @@ -55,16 +54,13 @@
"FrenzyExists/aquarium-vim": "https://github.com/FrenzyExists/aquarium-vim",
"EdenEast/nightfox.nvim": "https://github.com/EdenEast/nightfox.nvim",
"kvrohit/substrata.nvim": "https://github.com/kvrohit/substrata.nvim",
"arzg/vim-substrata": "https://github.com/arzg/vim-substrata",
"ldelossa/vimdark": "https://github.com/ldelossa/vimdark",
"mangeshrex/uwu.vim": "https://github.com/Mangeshrex/uwu.vim",
"adisen99/apprentice.nvim": "https://github.com/adisen99/apprentice.nvim",
"Apprentice": "https://github.com/romainl/Apprentice",
"olimorris/onedarkpro.nvim": "https://github.com/olimorris/onedarkpro.nvim",
"rmehri01/onenord.nvim": "https://github.com/rmehri01/onenord.nvim",
"RishabhRD/gruvy": "https://github.com/RishabhRD/gruvy",
"minischeme": "https://github.com/echasnovski/mini.nvim#plugin-colorscheme",
"echasnovski/mini.nvim": "https://github.com/echasnovski/mini.nvim",
"luisiacc/gruvbox-baby": "https://github.com/luisiacc/gruvbox-baby",
"titanzero/zephyrium": "https://github.com/titanzero/zephyrium",
"rebelot/kanagawa.nvim": "https://github.com/rebelot/kanagawa.nvim",
Expand Down
5 changes: 3 additions & 2 deletions python/web_scrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ def extract_color_scheme_regex(self, url: str) -> None:
data = pattern.findall(req.text)

for i in data:
# get Name Repo/name and url of the color scheme
pattern = re.compile(r"\[(.*?)\]\((.*?)\)", re.DOTALL | re.MULTILINE)
# ignore everything after " - " onwards
pattern = re.compile(r"- \[(.*?)\]\((.*?)\)", re.DOTALL | re.MULTILINE)
name_url = pattern.findall(i)

# Add everything into self.contianer - OrdeeredDict
for j in name_url:
self.container[j[0]] = j[1]
Expand Down