browlite 1.0.0__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.
browlite-1.0.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 PineRootLabs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,154 @@
1
+ Metadata-Version: 2.1
2
+ Name: browlite
3
+ Version: 1.0.0
4
+ Summary: Navegador minimalista leve e rápido com foco em privacidade
5
+ Home-page: https://github.com/PineRootLabs/Browlite
6
+ Author: PineRootLabs
7
+ Author-email: DevDark249@gmail.com
8
+ License: MIT
9
+ Keywords: browser navegador minimalista python pyqt
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: End Users/Desktop
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.7
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Environment :: X11 Applications :: Qt
19
+ Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: PyQt5>=5.15.4
23
+ Requires-Dist: PyQtWebEngine>=5.15.5
24
+
25
+ [![Licença MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/PineRootLabs/Browlite/blob/main/LICENSE)
26
+ [![Versão Python](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)
27
+ [![GitHub stars](https://img.shields.io/github/stars/PineRootLabs/Browlite.svg)](https://github.com/PineRootLabs/Browlite/stargazers)
28
+
29
+ # 🌐 Browlite - Navegador Minimalista de Alto Desempenho
30
+
31
+ **Browlite** é um navegador web minimalista desenvolvido em Python, focado em privacidade, desempenho e customização. Projetado para ser leve e rápido, consome menos recursos que navegadores tradicionais.
32
+
33
+ 🔗 **Repositório Oficial**: [https://github.com/PineRootLabs/Browlite](https://github.com/PineRootLabs/Browlite)
34
+
35
+ ## ✨ Recursos Principais
36
+
37
+ - ✅ **Extremamente leve** (usa ~50% menos RAM que navegadores convencionais)
38
+ - ✅ **Bloqueio de anúncios e trackers** nativo
39
+ - ✅ **Multiplos mecanismos de busca** (Google, DuckDuckGo, Bing, etc.)
40
+ - ✅ **Modo escuro/light** configurável
41
+ - ✅ **Sistema de favoritos** com acesso via terminal
42
+ - ✅ **Interface minimalista** sem barras desnecessárias
43
+ - ✅ **Configuração flexível** via arquivos INI
44
+
45
+ ## 🛠️ Instalação
46
+
47
+ ### Pré-requisitos
48
+ - Python 3.7 ou superior
49
+ - Pip (gerenciador de pacotes Python)
50
+
51
+ ### Passo a Passo
52
+ ```bash
53
+ # Clone o repositório
54
+ git clone https://github.com/PineRootLabs/Browlite.git
55
+ cd Browlite
56
+
57
+ # Instale as dependências
58
+ pip install PyQt5 PyQtWebEngine
59
+
60
+ # Execute o navegador
61
+ python main.py
62
+
63
+ 🎛️ Configuração Inicial
64
+ Na primeira execução, o Browlite irá:
65
+
66
+ Perguntar qual modo de operação deseja usar:
67
+
68
+ 🛡️ Minimalista Seguro (equilíbrio entre recursos e desempenho)
69
+
70
+ ⚡ Extremamente Leve (máximo desempenho, menos recursos)
71
+
72
+ Solicitar a escolha do mecanismo de busca padrão
73
+
74
+ Os arquivos de configuração serão gerados automaticamente na pasta do projeto.
75
+
76
+ 📂 Estrutura de Arquivos
77
+
78
+ Browlite/
79
+ ├── main.py # Código principal
80
+ ├── config.ini # Configurações do usuário (gerado automaticamente)
81
+ ├── config_minimal.ini # Perfil Minimalista Seguro
82
+ ├── config_light.ini # Perfil Extremamente Leve
83
+ ├── favs.txt # Lista de favoritos (gerado automaticamente)
84
+ └── icons/ # Ícones dos mecanismos de busca
85
+ ├── google.png
86
+ ├── duckduckgo.png
87
+ ├── bing.png
88
+ ├── yahoo.png
89
+ ├── ecosia.png
90
+ ├── back.png
91
+ ├── forward.png
92
+ ├── refresh.png
93
+ └── home.png
94
+
95
+ 🕹️ Como Usar
96
+ Comandos Básicos
97
+ Comando Descrição
98
+ python main.py Inicia o navegador normalmente
99
+ python main.py -favs Mostra favoritos no terminal
100
+ python main.py [URL] Abre uma URL específica
101
+ Atalhos do Teclado
102
+ Atalho Ação
103
+ Ctrl+L Foca na barra de URL
104
+ Ctrl+D Adiciona página aos favoritos
105
+ Alt+←/→ Navega para trás/frente
106
+ F5 Recarrega a página
107
+ Gerenciamento de Favoritos
108
+ Adicione a página atual aos favoritos com Ctrl+D
109
+
110
+ Para acessar:
111
+
112
+ Via interface: Menu "Navegação" > "Favoritos"
113
+
114
+ Via terminal: Execute python main.py -favs
115
+
116
+ ⚙️ Personalização Avançada
117
+
118
+ Edite os arquivos .ini para ajustes personalizado:
119
+
120
+ Configurações Principais (config.ini)
121
+
122
+ [DEFAULT]
123
+ homepage = https://www.google.com ; Página inicial
124
+ dark_mode = true ; Tema escuro
125
+ block_ads = true ; Bloqueio de anúncios
126
+ default_search_engine = google ; Mecanismo de busca padrão
127
+ Mecanismos de Busca Suportados
128
+ Google (google)
129
+
130
+ DuckDuckGo (duckduckgo)
131
+
132
+ Bing (bing)
133
+
134
+ Yahoo (yahoo)
135
+
136
+ Ecosia (ecosia)
137
+
138
+ Para adicionar novos buscadores, edite o dicionário SEARCH_ENGINES no código.
139
+
140
+ 🤝 Agradecimentos Especiais
141
+ Este projeto contou com o suporte técnico e consultoria especializada do DeepSeek Chat durante o processo de desenvolvimento. Sua contribuição foi fundamental para:
142
+
143
+ Otimização de desempenho
144
+
145
+ Implementação de recursos-chave
146
+
147
+ Documentação técnica
148
+
149
+ "A inteligência artificial não substitui a criatividade humana, mas pode amplificá-la exponencialmente." - PineRootLabs
150
+
151
+ ✉️ Contato
152
+ Desenvolvido por Caio R. - DevDark249@gmail.com
153
+
154
+ 🔗 Repositório: https://github.com/PineRootLabs/Browlite
@@ -0,0 +1,130 @@
1
+ [![Licença MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/PineRootLabs/Browlite/blob/main/LICENSE)
2
+ [![Versão Python](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)
3
+ [![GitHub stars](https://img.shields.io/github/stars/PineRootLabs/Browlite.svg)](https://github.com/PineRootLabs/Browlite/stargazers)
4
+
5
+ # 🌐 Browlite - Navegador Minimalista de Alto Desempenho
6
+
7
+ **Browlite** é um navegador web minimalista desenvolvido em Python, focado em privacidade, desempenho e customização. Projetado para ser leve e rápido, consome menos recursos que navegadores tradicionais.
8
+
9
+ 🔗 **Repositório Oficial**: [https://github.com/PineRootLabs/Browlite](https://github.com/PineRootLabs/Browlite)
10
+
11
+ ## ✨ Recursos Principais
12
+
13
+ - ✅ **Extremamente leve** (usa ~50% menos RAM que navegadores convencionais)
14
+ - ✅ **Bloqueio de anúncios e trackers** nativo
15
+ - ✅ **Multiplos mecanismos de busca** (Google, DuckDuckGo, Bing, etc.)
16
+ - ✅ **Modo escuro/light** configurável
17
+ - ✅ **Sistema de favoritos** com acesso via terminal
18
+ - ✅ **Interface minimalista** sem barras desnecessárias
19
+ - ✅ **Configuração flexível** via arquivos INI
20
+
21
+ ## 🛠️ Instalação
22
+
23
+ ### Pré-requisitos
24
+ - Python 3.7 ou superior
25
+ - Pip (gerenciador de pacotes Python)
26
+
27
+ ### Passo a Passo
28
+ ```bash
29
+ # Clone o repositório
30
+ git clone https://github.com/PineRootLabs/Browlite.git
31
+ cd Browlite
32
+
33
+ # Instale as dependências
34
+ pip install PyQt5 PyQtWebEngine
35
+
36
+ # Execute o navegador
37
+ python main.py
38
+
39
+ 🎛️ Configuração Inicial
40
+ Na primeira execução, o Browlite irá:
41
+
42
+ Perguntar qual modo de operação deseja usar:
43
+
44
+ 🛡️ Minimalista Seguro (equilíbrio entre recursos e desempenho)
45
+
46
+ ⚡ Extremamente Leve (máximo desempenho, menos recursos)
47
+
48
+ Solicitar a escolha do mecanismo de busca padrão
49
+
50
+ Os arquivos de configuração serão gerados automaticamente na pasta do projeto.
51
+
52
+ 📂 Estrutura de Arquivos
53
+
54
+ Browlite/
55
+ ├── main.py # Código principal
56
+ ├── config.ini # Configurações do usuário (gerado automaticamente)
57
+ ├── config_minimal.ini # Perfil Minimalista Seguro
58
+ ├── config_light.ini # Perfil Extremamente Leve
59
+ ├── favs.txt # Lista de favoritos (gerado automaticamente)
60
+ └── icons/ # Ícones dos mecanismos de busca
61
+ ├── google.png
62
+ ├── duckduckgo.png
63
+ ├── bing.png
64
+ ├── yahoo.png
65
+ ├── ecosia.png
66
+ ├── back.png
67
+ ├── forward.png
68
+ ├── refresh.png
69
+ └── home.png
70
+
71
+ 🕹️ Como Usar
72
+ Comandos Básicos
73
+ Comando Descrição
74
+ python main.py Inicia o navegador normalmente
75
+ python main.py -favs Mostra favoritos no terminal
76
+ python main.py [URL] Abre uma URL específica
77
+ Atalhos do Teclado
78
+ Atalho Ação
79
+ Ctrl+L Foca na barra de URL
80
+ Ctrl+D Adiciona página aos favoritos
81
+ Alt+←/→ Navega para trás/frente
82
+ F5 Recarrega a página
83
+ Gerenciamento de Favoritos
84
+ Adicione a página atual aos favoritos com Ctrl+D
85
+
86
+ Para acessar:
87
+
88
+ Via interface: Menu "Navegação" > "Favoritos"
89
+
90
+ Via terminal: Execute python main.py -favs
91
+
92
+ ⚙️ Personalização Avançada
93
+
94
+ Edite os arquivos .ini para ajustes personalizado:
95
+
96
+ Configurações Principais (config.ini)
97
+
98
+ [DEFAULT]
99
+ homepage = https://www.google.com ; Página inicial
100
+ dark_mode = true ; Tema escuro
101
+ block_ads = true ; Bloqueio de anúncios
102
+ default_search_engine = google ; Mecanismo de busca padrão
103
+ Mecanismos de Busca Suportados
104
+ Google (google)
105
+
106
+ DuckDuckGo (duckduckgo)
107
+
108
+ Bing (bing)
109
+
110
+ Yahoo (yahoo)
111
+
112
+ Ecosia (ecosia)
113
+
114
+ Para adicionar novos buscadores, edite o dicionário SEARCH_ENGINES no código.
115
+
116
+ 🤝 Agradecimentos Especiais
117
+ Este projeto contou com o suporte técnico e consultoria especializada do DeepSeek Chat durante o processo de desenvolvimento. Sua contribuição foi fundamental para:
118
+
119
+ Otimização de desempenho
120
+
121
+ Implementação de recursos-chave
122
+
123
+ Documentação técnica
124
+
125
+ "A inteligência artificial não substitui a criatividade humana, mas pode amplificá-la exponencialmente." - PineRootLabs
126
+
127
+ ✉️ Contato
128
+ Desenvolvido por Caio R. - DevDark249@gmail.com
129
+
130
+ 🔗 Repositório: https://github.com/PineRootLabs/Browlite
@@ -0,0 +1,5 @@
1
+ __version__ = "1.0.0"
2
+ __author__ = "PineRootLabs"
3
+ __license__ = "MIT"
4
+
5
+ from .main import Browlite, main
@@ -0,0 +1,29 @@
1
+ import os
2
+ import configparser
3
+ from pathlib import Path
4
+
5
+ class ConfigManager:
6
+ def __init__(self):
7
+ self.app_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
8
+ self.config_path = os.path.join(self.app_dir, 'config.ini')
9
+ self._ensure_config()
10
+
11
+ def _ensure_config(self):
12
+ if not os.path.exists(self.config_path):
13
+ self._create_default_config()
14
+
15
+ def _create_default_config(self):
16
+ config = configparser.ConfigParser()
17
+ config['DEFAULT'] = {
18
+ 'homepage': 'https://www.google.com',
19
+ 'dark_mode': 'true',
20
+ 'block_ads': 'true',
21
+ 'default_search_engine': 'google'
22
+ }
23
+ with open(self.config_path, 'w') as f:
24
+ config.write(f)
25
+
26
+ def get_config(self):
27
+ config = configparser.ConfigParser()
28
+ config.read(self.config_path)
29
+ return config['DEFAULT']
@@ -0,0 +1,287 @@
1
+ #!/usr/bin/env python3
2
+ import sys
3
+ import os
4
+ import configparser
5
+ from pathlib import Path
6
+ from PyQt5.QtWidgets import (
7
+ QApplication, QMainWindow, QLineEdit, QVBoxLayout, QWidget,
8
+ QToolBar, QAction, QStatusBar, QProgressBar, QMenuBar,
9
+ QInputDialog, QMessageBox, QMenu
10
+ )
11
+ from PyQt5.QtWebEngineWidgets import QWebEngineView
12
+ from PyQt5.QtCore import QUrl, QSize
13
+ from PyQt5.QtGui import QIcon
14
+
15
+ class Browlite(QMainWindow):
16
+ def __init__(self, start_url=None):
17
+ super().__init__()
18
+
19
+ # Initialize paths
20
+ self.app_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
21
+ self.config_file = os.path.join(self.app_dir, 'config.ini')
22
+ self.favs_file = os.path.join(self.app_dir, 'favs.txt')
23
+
24
+ # Search engine configuration
25
+ self.search_engines = {
26
+ 'google': {
27
+ 'name': 'Google',
28
+ 'url': 'https://www.google.com/search?q={}',
29
+ 'icon': self.resource_path('icons/google.png')
30
+ },
31
+ 'duckduckgo': {
32
+ 'name': 'DuckDuckGo',
33
+ 'url': 'https://duckduckgo.com/?q={}',
34
+ 'icon': self.resource_path('icons/duckduckgo.png')
35
+ },
36
+ 'bing': {
37
+ 'name': 'Bing',
38
+ 'url': 'https://www.bing.com/search?q={}',
39
+ 'icon': self.resource_path('icons/bing.png')
40
+ },
41
+ 'yahoo': {
42
+ 'name': 'Yahoo',
43
+ 'url': 'https://search.yahoo.com/search?p={}',
44
+ 'icon': self.resource_path('icons/yahoo.png')
45
+ },
46
+ 'ecosia': {
47
+ 'name': 'Ecosia',
48
+ 'url': 'https://www.ecosia.org/search?q={}',
49
+ 'icon': self.resource_path('icons/ecosia.png')
50
+ }
51
+ }
52
+
53
+ # Load configuration
54
+ self.load_config()
55
+ self.load_favorites()
56
+
57
+ # Setup UI
58
+ self.init_ui()
59
+ self.apply_theme()
60
+
61
+ # Navigate to initial URL
62
+ initial_url = QUrl(start_url) if start_url else QUrl(self.homepage)
63
+ self.browser.setUrl(initial_url)
64
+
65
+ def resource_path(self, relative_path):
66
+ return os.path.join(self.app_dir, 'browlite', 'resources', relative_path)
67
+
68
+ def load_config(self):
69
+ self.config = configparser.ConfigParser()
70
+ if not os.path.exists(self.config_file):
71
+ self.create_default_config()
72
+ self.config.read(self.config_file)
73
+
74
+ self.homepage = self.config['DEFAULT'].get('homepage', 'https://www.google.com')
75
+ self.dark_mode = self.config['DEFAULT'].getboolean('dark_mode', True)
76
+ self.default_search = self.config['DEFAULT'].get('default_search_engine', 'google')
77
+
78
+ def create_default_config(self):
79
+ self.config['DEFAULT'] = {
80
+ 'homepage': 'https://www.google.com',
81
+ 'dark_mode': 'true',
82
+ 'default_search_engine': 'google'
83
+ }
84
+ with open(self.config_file, 'w') as f:
85
+ self.config.write(f)
86
+
87
+ def init_ui(self):
88
+ self.setWindowTitle("Browlite")
89
+ self.resize(1024, 768)
90
+ self.setMinimumSize(800, 600)
91
+ self.setSizePolicy(QWidget().sizePolicy())
92
+
93
+ self.browser = QWebEngineView()
94
+ self.urlbar = QLineEdit()
95
+
96
+ self.setup_toolbar()
97
+ self.setup_menu()
98
+ self.setup_statusbar()
99
+
100
+ layout = QVBoxLayout()
101
+ layout.setContentsMargins(0, 0, 0, 0)
102
+ layout.addWidget(self.browser)
103
+
104
+ container = QWidget()
105
+ container.setLayout(layout)
106
+ self.setCentralWidget(container)
107
+
108
+ self.urlbar.returnPressed.connect(self.navigate_to_url)
109
+ self.browser.urlChanged.connect(self.update_urlbar)
110
+ self.browser.loadProgress.connect(self.update_progress)
111
+
112
+ def setup_toolbar(self):
113
+ toolbar = QToolBar()
114
+ toolbar.setIconSize(QSize(24, 24))
115
+ self.addToolBar(toolbar)
116
+
117
+ nav_actions = [
118
+ ('back.png', "Back", self.browser.back),
119
+ ('forward.png', "Forward", self.browser.forward),
120
+ ('refresh.png', "Refresh", self.browser.reload),
121
+ ('home.png', "Home", self.go_home)
122
+ ]
123
+
124
+ for icon, text, callback in nav_actions:
125
+ action = QAction(QIcon(self.resource_path(f'icons/{icon}')), text, self)
126
+ action.triggered.connect(callback)
127
+ toolbar.addAction(action)
128
+
129
+ self.urlbar.setPlaceholderText("Enter URL or search term...")
130
+ toolbar.addWidget(self.urlbar)
131
+
132
+ self.search_menu = QMenu("Search Engine")
133
+ for engine_id, engine_data in self.search_engines.items():
134
+ action = QAction(QIcon(engine_data['icon']), engine_data['name'], self)
135
+ action.triggered.connect(lambda _, e=engine_id: self.set_search_engine(e))
136
+ self.search_menu.addAction(action)
137
+
138
+ toolbar.addAction(self.search_menu.menuAction())
139
+
140
+ def setup_menu(self):
141
+ menubar = self.menuBar()
142
+
143
+ file_menu = menubar.addMenu("File")
144
+ exit_action = QAction("Exit", self)
145
+ exit_action.triggered.connect(self.close)
146
+ file_menu.addAction(exit_action)
147
+
148
+ view_menu = menubar.addMenu("View")
149
+ self.dark_mode_action = QAction("Dark Mode", self, checkable=True)
150
+ self.dark_mode_action.setChecked(self.dark_mode)
151
+ self.dark_mode_action.toggled.connect(self.toggle_dark_mode)
152
+ view_menu.addAction(self.dark_mode_action)
153
+
154
+ def setup_statusbar(self):
155
+ self.statusbar = self.statusBar()
156
+ self.progress_bar = QProgressBar()
157
+ self.statusbar.addPermanentWidget(self.progress_bar)
158
+ self.progress_bar.hide()
159
+
160
+ def apply_theme(self):
161
+ if self.dark_mode:
162
+ self.setStyleSheet("""
163
+ QMainWindow { background-color: #2d2d2d; }
164
+ QToolBar { background-color: #34403d; border: none; }
165
+ QLineEdit {
166
+ background-color: #3b4f4b;
167
+ color: #e0fff7;
168
+ border: 1px solid #5fc3ad;
169
+ padding: 5px;
170
+ selection-background-color: #5fc3ad;
171
+ }
172
+ QStatusBar { background-color: #34403d; color: #aaffee; }
173
+ QProgressBar {
174
+ border: 1px solid #5fc3ad;
175
+ border-radius: 3px;
176
+ background-color: #2f3b38;
177
+ text-align: center;
178
+ }
179
+ QProgressBar::chunk { background-color: #5fc3ad; width: 10px; }
180
+ """)
181
+ else:
182
+ self.setStyleSheet("""
183
+ QMainWindow { background-color: #f8fefc; }
184
+ QToolBar { background-color: #e6f7f3; border: none; }
185
+ QLineEdit {
186
+ background-color: #ffffff;
187
+ color: #000000;
188
+ border: 1px solid #80d9c4;
189
+ padding: 5px;
190
+ selection-background-color: #5fc3ad;
191
+ }
192
+ QStatusBar { background-color: #e6f7f3; color: #337d6b; }
193
+ QProgressBar {
194
+ border: 1px solid #80d9c4;
195
+ border-radius: 3px;
196
+ background-color: #f0fefb;
197
+ text-align: center;
198
+ }
199
+ QProgressBar::chunk { background-color: #5fc3ad; width: 10px; }
200
+ """)
201
+
202
+ def toggle_dark_mode(self, checked):
203
+ self.dark_mode = checked
204
+ self.config['DEFAULT']['dark_mode'] = str(checked).lower()
205
+ with open(self.config_file, 'w') as f:
206
+ self.config.write(f)
207
+ self.apply_theme()
208
+
209
+ def set_search_engine(self, engine_id):
210
+ if engine_id in self.search_engines:
211
+ self.default_search = engine_id
212
+ self.config['DEFAULT']['default_search_engine'] = engine_id
213
+ with open(self.config_file, 'w') as f:
214
+ self.config.write(f)
215
+ QMessageBox.information(
216
+ self,
217
+ "Search Engine Changed",
218
+ f"Default search engine set to {self.search_engines[engine_id]['name']}"
219
+ )
220
+
221
+ def navigate_to_url(self):
222
+ url = self.urlbar.text().strip()
223
+ if not url:
224
+ return
225
+
226
+ if url == "-favs":
227
+ self.show_favorites()
228
+ elif url.startswith(('http://', 'https://')):
229
+ self.browser.setUrl(QUrl(url))
230
+ else:
231
+ search_url = self.search_engines[self.default_search]['url'].format(url)
232
+ self.browser.setUrl(QUrl(search_url))
233
+
234
+ def update_urlbar(self, q):
235
+ self.urlbar.setText(q.toString())
236
+ self.urlbar.setCursorPosition(0)
237
+
238
+ def update_progress(self, progress):
239
+ self.progress_bar.setValue(progress)
240
+ self.progress_bar.setVisible(progress < 100)
241
+
242
+ def go_home(self):
243
+ self.browser.setUrl(QUrl(self.homepage))
244
+
245
+ def load_favorites(self):
246
+ if not os.path.exists(self.favs_file):
247
+ self.favorites = []
248
+ return
249
+ with open(self.favs_file, 'r') as f:
250
+ self.favorites = [line.strip() for line in f if line.strip()]
251
+
252
+ def save_favorites(self):
253
+ with open(self.favs_file, 'w') as f:
254
+ f.write('\n'.join(self.favorites))
255
+
256
+ def show_favorites(self):
257
+ if not self.favorites:
258
+ QMessageBox.information(self, "Favorites", "No favorites saved yet.")
259
+ return
260
+
261
+ items = [f"{i+1}. {url}" for i, url in enumerate(self.favorites)]
262
+ item, ok = QInputDialog.getItem(
263
+ self, "Favorites", "Select a favorite:", items, 0, False)
264
+
265
+ if ok and item:
266
+ url = item.split(". ", 1)[1]
267
+ self.browser.setUrl(QUrl(url))
268
+
269
+ def closeEvent(self, event):
270
+ self.save_favorites()
271
+ event.accept()
272
+
273
+ def main():
274
+ os.environ['QT_QPA_PLATFORM'] = 'xcb'
275
+ app = QApplication(sys.argv)
276
+ app.setApplicationName("Browlite")
277
+ app.setApplicationVersion("1.0.0")
278
+
279
+ start_url = sys.argv[1] if len(sys.argv) > 1 else None
280
+
281
+ window = Browlite(start_url)
282
+ window.show()
283
+
284
+ sys.exit(app.exec_())
285
+
286
+ if __name__ == "__main__":
287
+ main()
@@ -0,0 +1,36 @@
1
+ /* Tema Escuro - Dark Mode*/
2
+ QMainWindow {
3
+ background-color: #2d2d2d;
4
+ }
5
+
6
+ QToolBar {
7
+ background-color: #34403d; /* verde escuro puxando pro menta */
8
+ border: none;
9
+ padding: 2px;
10
+ }
11
+
12
+ QLineEdit {
13
+ background-color: #3b4f4b;
14
+ color: #e0fff7;
15
+ border: 1px solid #5fc3ad; /* menta suave */
16
+ border-radius: 4px;
17
+ padding: 5px;
18
+ selection-background-color: #5fc3ad; /* menta */
19
+ }
20
+
21
+ QStatusBar {
22
+ background-color: #34403d;
23
+ color: #1a1a1a;
24
+ }
25
+
26
+ QProgressBar {
27
+ border: 1px solid #5fc3ad;
28
+ border-radius: 3px;
29
+ text-align: center;
30
+ background-color: #2f3b38;
31
+ }
32
+
33
+ QProgressBar::chunk {
34
+ background-color: #5fc3ad; /* menta principal */
35
+ width: 10px;
36
+ }
@@ -0,0 +1,37 @@
1
+ /* Tema Claro - Light Mode*/
2
+ QMainWindow {
3
+ background-color: #f8fefc; /* fundo bem clarinho com toque menta */
4
+ }
5
+
6
+ QToolBar {
7
+ background-color: #e6f7f3; /* um cinza esverdeado bem leve */
8
+ border: none;
9
+ padding: 2px;
10
+ }
11
+
12
+ QLineEdit {
13
+ background-color: #ffffff;
14
+ color: #000000;
15
+ border: 1px solid #80d9c4; /* menta suave */
16
+ border-radius: 4px;
17
+ padding: 5px;
18
+ selection-background-color: #5fc3ad; /* menta principal */
19
+ }
20
+
21
+ QStatusBar {
22
+ background-color: #e6f7f3;
23
+ color: #337d6b; /* tom escuro de menta pro texto */
24
+ }
25
+
26
+ QProgressBar {
27
+ border: 1px solid #80d9c4;
28
+ border-radius: 3px;
29
+ text-align: center;
30
+ background-color: #f0fefb; /* quase branco com menta de leve */
31
+ }
32
+
33
+ QProgressBar::chunk {
34
+ background-color: #5fc3ad; /* menta principal */
35
+ width: 10px;
36
+ }
37
+
@@ -0,0 +1,15 @@
1
+ import os
2
+
3
+ def resource_path(relative_path):
4
+ base_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
5
+ return os.path.join(base_path, relative_path)
6
+
7
+ def load_favorites(favs_file):
8
+ if not os.path.exists(favs_file):
9
+ return []
10
+ with open(favs_file, 'r') as f:
11
+ return [line.strip() for line in f if line.strip()]
12
+
13
+ def save_favorites(favs_file, favorites):
14
+ with open(favs_file, 'w') as f:
15
+ f.write('\n'.join(favorites))
@@ -0,0 +1,154 @@
1
+ Metadata-Version: 2.1
2
+ Name: browlite
3
+ Version: 1.0.0
4
+ Summary: Navegador minimalista leve e rápido com foco em privacidade
5
+ Home-page: https://github.com/PineRootLabs/Browlite
6
+ Author: PineRootLabs
7
+ Author-email: DevDark249@gmail.com
8
+ License: MIT
9
+ Keywords: browser navegador minimalista python pyqt
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: End Users/Desktop
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.7
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Environment :: X11 Applications :: Qt
19
+ Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: PyQt5>=5.15.4
23
+ Requires-Dist: PyQtWebEngine>=5.15.5
24
+
25
+ [![Licença MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/PineRootLabs/Browlite/blob/main/LICENSE)
26
+ [![Versão Python](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)
27
+ [![GitHub stars](https://img.shields.io/github/stars/PineRootLabs/Browlite.svg)](https://github.com/PineRootLabs/Browlite/stargazers)
28
+
29
+ # 🌐 Browlite - Navegador Minimalista de Alto Desempenho
30
+
31
+ **Browlite** é um navegador web minimalista desenvolvido em Python, focado em privacidade, desempenho e customização. Projetado para ser leve e rápido, consome menos recursos que navegadores tradicionais.
32
+
33
+ 🔗 **Repositório Oficial**: [https://github.com/PineRootLabs/Browlite](https://github.com/PineRootLabs/Browlite)
34
+
35
+ ## ✨ Recursos Principais
36
+
37
+ - ✅ **Extremamente leve** (usa ~50% menos RAM que navegadores convencionais)
38
+ - ✅ **Bloqueio de anúncios e trackers** nativo
39
+ - ✅ **Multiplos mecanismos de busca** (Google, DuckDuckGo, Bing, etc.)
40
+ - ✅ **Modo escuro/light** configurável
41
+ - ✅ **Sistema de favoritos** com acesso via terminal
42
+ - ✅ **Interface minimalista** sem barras desnecessárias
43
+ - ✅ **Configuração flexível** via arquivos INI
44
+
45
+ ## 🛠️ Instalação
46
+
47
+ ### Pré-requisitos
48
+ - Python 3.7 ou superior
49
+ - Pip (gerenciador de pacotes Python)
50
+
51
+ ### Passo a Passo
52
+ ```bash
53
+ # Clone o repositório
54
+ git clone https://github.com/PineRootLabs/Browlite.git
55
+ cd Browlite
56
+
57
+ # Instale as dependências
58
+ pip install PyQt5 PyQtWebEngine
59
+
60
+ # Execute o navegador
61
+ python main.py
62
+
63
+ 🎛️ Configuração Inicial
64
+ Na primeira execução, o Browlite irá:
65
+
66
+ Perguntar qual modo de operação deseja usar:
67
+
68
+ 🛡️ Minimalista Seguro (equilíbrio entre recursos e desempenho)
69
+
70
+ ⚡ Extremamente Leve (máximo desempenho, menos recursos)
71
+
72
+ Solicitar a escolha do mecanismo de busca padrão
73
+
74
+ Os arquivos de configuração serão gerados automaticamente na pasta do projeto.
75
+
76
+ 📂 Estrutura de Arquivos
77
+
78
+ Browlite/
79
+ ├── main.py # Código principal
80
+ ├── config.ini # Configurações do usuário (gerado automaticamente)
81
+ ├── config_minimal.ini # Perfil Minimalista Seguro
82
+ ├── config_light.ini # Perfil Extremamente Leve
83
+ ├── favs.txt # Lista de favoritos (gerado automaticamente)
84
+ └── icons/ # Ícones dos mecanismos de busca
85
+ ├── google.png
86
+ ├── duckduckgo.png
87
+ ├── bing.png
88
+ ├── yahoo.png
89
+ ├── ecosia.png
90
+ ├── back.png
91
+ ├── forward.png
92
+ ├── refresh.png
93
+ └── home.png
94
+
95
+ 🕹️ Como Usar
96
+ Comandos Básicos
97
+ Comando Descrição
98
+ python main.py Inicia o navegador normalmente
99
+ python main.py -favs Mostra favoritos no terminal
100
+ python main.py [URL] Abre uma URL específica
101
+ Atalhos do Teclado
102
+ Atalho Ação
103
+ Ctrl+L Foca na barra de URL
104
+ Ctrl+D Adiciona página aos favoritos
105
+ Alt+←/→ Navega para trás/frente
106
+ F5 Recarrega a página
107
+ Gerenciamento de Favoritos
108
+ Adicione a página atual aos favoritos com Ctrl+D
109
+
110
+ Para acessar:
111
+
112
+ Via interface: Menu "Navegação" > "Favoritos"
113
+
114
+ Via terminal: Execute python main.py -favs
115
+
116
+ ⚙️ Personalização Avançada
117
+
118
+ Edite os arquivos .ini para ajustes personalizado:
119
+
120
+ Configurações Principais (config.ini)
121
+
122
+ [DEFAULT]
123
+ homepage = https://www.google.com ; Página inicial
124
+ dark_mode = true ; Tema escuro
125
+ block_ads = true ; Bloqueio de anúncios
126
+ default_search_engine = google ; Mecanismo de busca padrão
127
+ Mecanismos de Busca Suportados
128
+ Google (google)
129
+
130
+ DuckDuckGo (duckduckgo)
131
+
132
+ Bing (bing)
133
+
134
+ Yahoo (yahoo)
135
+
136
+ Ecosia (ecosia)
137
+
138
+ Para adicionar novos buscadores, edite o dicionário SEARCH_ENGINES no código.
139
+
140
+ 🤝 Agradecimentos Especiais
141
+ Este projeto contou com o suporte técnico e consultoria especializada do DeepSeek Chat durante o processo de desenvolvimento. Sua contribuição foi fundamental para:
142
+
143
+ Otimização de desempenho
144
+
145
+ Implementação de recursos-chave
146
+
147
+ Documentação técnica
148
+
149
+ "A inteligência artificial não substitui a criatividade humana, mas pode amplificá-la exponencialmente." - PineRootLabs
150
+
151
+ ✉️ Contato
152
+ Desenvolvido por Caio R. - DevDark249@gmail.com
153
+
154
+ 🔗 Repositório: https://github.com/PineRootLabs/Browlite
@@ -0,0 +1,24 @@
1
+ LICENSE
2
+ README.md
3
+ setup.py
4
+ browlite/__init__.py
5
+ browlite/config.py
6
+ browlite/main.py
7
+ browlite/utils.py
8
+ browlite.egg-info/PKG-INFO
9
+ browlite.egg-info/SOURCES.txt
10
+ browlite.egg-info/dependency_links.txt
11
+ browlite.egg-info/entry_points.txt
12
+ browlite.egg-info/requires.txt
13
+ browlite.egg-info/top_level.txt
14
+ browlite/resources/icons/back.png
15
+ browlite/resources/icons/bing.png
16
+ browlite/resources/icons/duckduckgo.png
17
+ browlite/resources/icons/ecosia.png
18
+ browlite/resources/icons/forward.png
19
+ browlite/resources/icons/google.png
20
+ browlite/resources/icons/home.png
21
+ browlite/resources/icons/refresh.png
22
+ browlite/resources/icons/yahoo.png
23
+ browlite/resources/styles/dark.css
24
+ browlite/resources/styles/light.css
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ browlite = browlite.main:main
@@ -0,0 +1,2 @@
1
+ PyQt5>=5.15.4
2
+ PyQtWebEngine>=5.15.5
@@ -0,0 +1 @@
1
+ browlite
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,52 @@
1
+ from setuptools import setup, find_packages
2
+ import os
3
+
4
+ def get_version():
5
+ init_path = os.path.join(os.path.dirname(__file__), 'browlite', '__init__.py')
6
+ with open(init_path, 'r') as f:
7
+ for line in f:
8
+ if line.startswith('__version__'):
9
+ return line.split('=')[1].strip().strip('"\'')
10
+
11
+ setup(
12
+ name='browlite',
13
+ version=get_version(),
14
+ packages=find_packages(),
15
+ install_requires=[
16
+ 'PyQt5>=5.15.4',
17
+ 'PyQtWebEngine>=5.15.5',
18
+ ],
19
+ entry_points={
20
+ 'console_scripts': [
21
+ 'browlite=browlite.main:main',
22
+ ],
23
+ },
24
+ package_data={
25
+ 'browlite': [
26
+ 'resources/styles/*.css',
27
+ 'resources/icons/*.png',
28
+ '*.ini'
29
+ ],
30
+ },
31
+ include_package_data=True,
32
+ author='PineRootLabs',
33
+ author_email='DevDark249@gmail.com',
34
+ description='Navegador minimalista leve e rápido com foco em privacidade',
35
+ long_description=open('README.md', 'r', encoding='utf-8').read(),
36
+ long_description_content_type='text/markdown',
37
+ license='MIT',
38
+ keywords='browser navegador minimalista python pyqt',
39
+ url='https://github.com/PineRootLabs/Browlite',
40
+ classifiers=[
41
+ 'Development Status :: 4 - Beta',
42
+ 'Intended Audience :: End Users/Desktop',
43
+ 'License :: OSI Approved :: MIT License',
44
+ 'Programming Language :: Python :: 3',
45
+ 'Programming Language :: Python :: 3.7',
46
+ 'Programming Language :: Python :: 3.8',
47
+ 'Programming Language :: Python :: 3.9',
48
+ 'Operating System :: OS Independent',
49
+ 'Environment :: X11 Applications :: Qt',
50
+ 'Topic :: Internet :: WWW/HTTP :: Browsers',
51
+ ],
52
+ )