Skip to content

Commit 5e5ad2f

Browse files
author
Simon Rivera
committed
removing configuration files from the repo
1 parent 8be3464 commit 5e5ad2f

File tree

5 files changed

+136
-233
lines changed

5 files changed

+136
-233
lines changed

.gitignore

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
venv/
2-
__pycache__/
3-
build/
4-
search.spec
5-
config/
6-
search.py
7-
utils.py
1+
venv/
2+
__pycache__/
3+
build/
4+
search.spec
5+
config/
6+
search.py
7+
utils.py

installation.ps1

+70-70
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,70 @@
1-
$installationPath = "$($Env:Programfiles)"
2-
$currentPath = "$(Get-Location)"
3-
$programPath = $currentPath + "\dist\search"
4-
$verifyPath = $installationPath + "\search\"
5-
6-
If (Test-Path $verifyPath) {
7-
try {
8-
Remove-Item $verifyPath -Recurse
9-
Write-Host "Previous installation removed" -ForegroundColor Green
10-
} catch {
11-
Write-Host "Could not remove the previous installation" -ForegroundColor Red
12-
Exit 1
13-
}
14-
15-
if (Test-Path $programPath) {
16-
try {
17-
Copy-Item -Path $programPath -Destination $verifyPath -Recurse
18-
Write-Host "moved program" -ForegroundColor Green
19-
} catch {
20-
Write-Host "Could not move the program" -ForegroundColor Red
21-
Exit 1
22-
}
23-
24-
try {
25-
$oldpath = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).path
26-
27-
if ($oldpath.split(';') -like $verifyPath) {
28-
Write-Host "the environment variable already exists" -ForegroundColor Cyan
29-
} else {
30-
$newpath = "$oldpath;$verifyPath"
31-
Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value $newpath
32-
Write-Host "Environment variable created" -ForegroundColor Green
33-
}
34-
} catch {
35-
Host "We could not create your environment variable you will have to do it manually." -ForegroundColor Red
36-
}
37-
} else {
38-
Write-Host "program files do not exist" -ForegroundColor Red
39-
Exit 1
40-
}
41-
} Else {
42-
if (Test-Path $programPath) {
43-
try {
44-
Copy-Item -Path $programPath -Destination $verifyPath -Recurse
45-
Write-Host "moved program" -ForegroundColor Green
46-
} catch {
47-
Write-Host "Could not move the program" -ForegroundColor Red
48-
Exit 1
49-
}
50-
51-
try {
52-
$oldpath = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).path
53-
54-
if ($oldpath.split(';') -like $verifyPath) {
55-
Write-Host "the environment variable already exists" -ForegroundColor Cyan
56-
} else {
57-
$newpath = "$oldpath;$verifyPath"
58-
Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value $newpath
59-
Write-Host "Environment variable created" -ForegroundColor Green
60-
}
61-
} catch {
62-
Host "We could not create your environment variable you will have to do it manually." -ForegroundColor Red
63-
}
64-
} else {
65-
Write-Host "program files do not exist" -ForegroundColor Red
66-
Exit 1
67-
}
68-
}
69-
70-
Write-Host "Installation process completed" -ForegroundColor Cyan
1+
$installationPath = "$($Env:Programfiles)"
2+
$currentPath = "$(Get-Location)"
3+
$programPath = $currentPath + "\dist\search"
4+
$verifyPath = $installationPath + "\search\"
5+
6+
If (Test-Path $verifyPath) {
7+
try {
8+
Remove-Item $verifyPath -Recurse
9+
Write-Host "Previous installation removed" -ForegroundColor Green
10+
} catch {
11+
Write-Host "Could not remove the previous installation" -ForegroundColor Red
12+
Exit 1
13+
}
14+
15+
if (Test-Path $programPath) {
16+
try {
17+
Copy-Item -Path $programPath -Destination $verifyPath -Recurse
18+
Write-Host "moved program" -ForegroundColor Green
19+
} catch {
20+
Write-Host "Could not move the program" -ForegroundColor Red
21+
Exit 1
22+
}
23+
24+
try {
25+
$oldpath = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).path
26+
27+
if ($oldpath.split(';') -like $verifyPath) {
28+
Write-Host "the environment variable already exists" -ForegroundColor Cyan
29+
} else {
30+
$newpath = "$oldpath;$verifyPath"
31+
Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value $newpath
32+
Write-Host "Environment variable created" -ForegroundColor Green
33+
}
34+
} catch {
35+
Host "We could not create your environment variable you will have to do it manually." -ForegroundColor Red
36+
}
37+
} else {
38+
Write-Host "program files do not exist" -ForegroundColor Red
39+
Exit 1
40+
}
41+
} Else {
42+
if (Test-Path $programPath) {
43+
try {
44+
Copy-Item -Path $programPath -Destination $verifyPath -Recurse
45+
Write-Host "moved program" -ForegroundColor Green
46+
} catch {
47+
Write-Host "Could not move the program" -ForegroundColor Red
48+
Exit 1
49+
}
50+
51+
try {
52+
$oldpath = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).path
53+
54+
if ($oldpath.split(';') -like $verifyPath) {
55+
Write-Host "the environment variable already exists" -ForegroundColor Cyan
56+
} else {
57+
$newpath = "$oldpath;$verifyPath"
58+
Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value $newpath
59+
Write-Host "Environment variable created" -ForegroundColor Green
60+
}
61+
} catch {
62+
Host "We could not create your environment variable you will have to do it manually." -ForegroundColor Red
63+
}
64+
} else {
65+
Write-Host "program files do not exist" -ForegroundColor Red
66+
Exit 1
67+
}
68+
}
69+
70+
Write-Host "Installation process completed" -ForegroundColor Cyan

readme.md

+59-59
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
1-
# search-web-terminal
2-
3-
## Getting Started
4-
5-
Simple terminal program to open the browser and generate a search in windows.
6-
7-
## Content
8-
9-
### How to install
10-
11-
1. you must first clone the [repository](https://github.com/simonriv/search-web-terminal).
12-
2. Open an instance of your installed terminal or windows powershell as administrator and go to the repository you just cloned, then run the installation.ps1 file.
13-
3. then close and reopen the terminal to refresh the environment variables.
14-
15-
If the installation mentions that I can't add the path to the path you will have to do it manually.
16-
Now you can use it using the word search.
17-
18-
### How to use
19-
20-
using the word `search` and passing the parameters `--browser` and `--engine` you can create a configuration file with your search preferences, these preferences are the browser you use and the search engine, in the browser are the following options:
21-
22-
* chrome
23-
* opera
24-
* firefox
25-
* brave
26-
* edge
27-
* explorer
28-
29-
and in the search engine these are the options:
30-
31-
* Google
32-
* Bing
33-
* DuckDuckGo
34-
* Yahoo
35-
36-
you can also pass the parameters with the diminutive `-b` `-e`, for example:
37-
38-
```sh
39-
search --browser firefox --engine google
40-
41-
search -b opera -e bing
42-
```
43-
44-
using the word `search` you can pass as an argument an address, for example:
45-
46-
```sh
47-
search www.github.com/simonriv
48-
```
49-
50-
this will open your previously configured browser and run the address you passed as an argument, if you don't type the www no problem the software will complete it.
51-
52-
you can also search by terms, for example:
53-
54-
```sh
55-
search hello world in python
56-
```
57-
58-
This will search your previously configured search engine for what you have typed.
59-
1+
# search-web-terminal
2+
3+
## Getting Started
4+
5+
Simple terminal program to open the browser and generate a search in windows.
6+
7+
## Content
8+
9+
### How to install
10+
11+
1. you must first clone the [repository](https://github.com/simonriv/search-web-terminal).
12+
2. Open an instance of your installed terminal or windows powershell as administrator and go to the repository you just cloned, then run the installation.ps1 file.
13+
3. then close and reopen the terminal to refresh the environment variables.
14+
15+
If the installation mentions that I can't add the path to the path you will have to do it manually.
16+
Now you can use it using the word search.
17+
18+
### How to use
19+
20+
using the word `search` and passing the parameters `--browser` and `--engine` you can create a configuration file with your search preferences, these preferences are the browser you use and the search engine, in the browser are the following options:
21+
22+
* chrome
23+
* opera
24+
* firefox
25+
* brave
26+
* edge
27+
* explorer
28+
29+
and in the search engine these are the options:
30+
31+
* Google
32+
* Bing
33+
* DuckDuckGo
34+
* Yahoo
35+
36+
you can also pass the parameters with the diminutive `-b` `-e`, for example:
37+
38+
```sh
39+
search --browser firefox --engine google
40+
41+
search -b opera -e bing
42+
```
43+
44+
using the word `search` you can pass as an argument an address, for example:
45+
46+
```sh
47+
search www.github.com/simonriv
48+
```
49+
50+
this will open your previously configured browser and run the address you passed as an argument, if you don't type the www no problem the software will complete it.
51+
52+
you can also search by terms, for example:
53+
54+
```sh
55+
search hello world in python
56+
```
57+
58+
This will search your previously configured search engine for what you have typed.
59+

search.py

-29
This file was deleted.

utils.py

-68
This file was deleted.

0 commit comments

Comments
 (0)